mirror of https://github.com/dapr/dotnet-sdk.git
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
// ------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
// ------------------------------------------------------------
|
|
|
|
namespace DaprDemoActor
|
|
{
|
|
using Dapr.Actors.AspNetCore;
|
|
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
/// <summary>
|
|
/// Class for host.
|
|
/// </summary>
|
|
public class Program
|
|
{
|
|
/// <summary>
|
|
/// Entry point.
|
|
/// </summary>
|
|
/// <param name="args">Arguments.</param>
|
|
public static void Main(string[] args)
|
|
{
|
|
CreateWebHostBuilder(args).Build().Run();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates a IWebHostBuilder.
|
|
/// </summary>
|
|
/// <param name="args">Arguments.</param>
|
|
/// <returns>IWebHostBuilder instance.</returns>
|
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.UseStartup<Startup>()
|
|
.UseActors(actorRuntime =>
|
|
{
|
|
actorRuntime.RegisterActor<DemoActor>();
|
|
});
|
|
}
|
|
}
|