mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor renames
This commit is contained in:
parent
a87628a9dd
commit
679cf67107
2 changed files with 7 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ namespace FilterLists.Agent.Infrastructure.DependencyInjection
|
|||
{
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static void RegisterAgentServices(this IServiceCollection services)
|
||||
public static void ConfigureServices(this IServiceCollection services)
|
||||
{
|
||||
services.AddConfiguration();
|
||||
services.AddLoggingCustom();
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public static class Program
|
|||
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
BuildServiceProvider();
|
||||
Setup();
|
||||
|
||||
var parser = _serviceProvider.GetService<Parser>();
|
||||
var mediator = _serviceProvider.GetService<IMediator>();
|
||||
|
||||
await parser.ParseArguments<CommandLineOptions>(args).MapResult(async o =>
|
||||
{
|
||||
if (o.ArchiveLists)
|
||||
|
|
@ -31,17 +31,17 @@ await parser.ParseArguments<CommandLineOptions>(args).MapResult(async o =>
|
|||
e => Task.FromResult(0)
|
||||
);
|
||||
|
||||
FlushApplicationInsights();
|
||||
Teardown();
|
||||
}
|
||||
|
||||
private static void BuildServiceProvider()
|
||||
private static void Setup()
|
||||
{
|
||||
var serviceCollection = new ServiceCollection();
|
||||
serviceCollection.RegisterAgentServices();
|
||||
serviceCollection.ConfigureServices();
|
||||
_serviceProvider = serviceCollection.BuildServiceProvider();
|
||||
}
|
||||
|
||||
private static void FlushApplicationInsights()
|
||||
private static void Teardown()
|
||||
{
|
||||
var telemetryClient = _serviceProvider.GetService<TelemetryClient>();
|
||||
telemetryClient.Flush();
|
||||
|
|
|
|||
Loading…
Reference in a new issue