Files
microsoft--semantic-kernel/dotnet/samples/Demos/ProcessWithDapr/Program.cs
T
wehub-resource-sync b957a53def
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:21:23 +08:00

41 lines
853 B
C#

// Copyright (c) Microsoft. All rights reserved.
using Microsoft.SemanticKernel;
var builder = WebApplication.CreateBuilder(args);
// Configure logging
builder.Services.AddLogging((logging) =>
{
logging.AddConsole();
logging.AddDebug();
});
// Configure the Kernel with DI. This is required for dependency injection to work with processes.
builder.Services.AddKernel();
// Configure Dapr
builder.Services.AddActors(static options =>
{
// Register the actors required to run Processes
options.AddProcessActors();
});
builder.Services.AddControllers();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
// Configure the HTTP request pipeline.
app.UseHttpsRedirection();
app.UseAuthorization();
}
app.MapControllers();
app.MapActorsHandlers();
app.Run();