Updated `CommandManager` to mark the `_envelopeReceiverService` field and its constructor as obsolete, recommending the use of `MediatR`. Added a new obsolete property `EnvelopeReceiver` for accessing the service. In `Program.cs`, added warning suppression for the obsolete member during command manager runner registration.
26 lines
754 B
C#
26 lines
754 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
namespace EnvelopeGenerator.Terminal;
|
|
|
|
public class Program
|
|
{
|
|
static async Task<int> Main(string[] args)
|
|
{
|
|
var builder = Host.CreateApplicationBuilder(args);
|
|
|
|
builder.Configuration
|
|
.SetBasePath(AppContext.BaseDirectory)
|
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
|
|
|
var config = builder.Configuration;
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
builder.Services.AddCommandManagerRunner(config);
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
var app = builder.Build();
|
|
|
|
return await app.RunCommandManagerRunner(args);
|
|
}
|
|
} |