Exemple #1
0
        protected async Task CommandAsync(CancellationToken cancellationToken)
        {
            using (IServiceScope scope = new ServiceCollection().AddCoreServices(cancellationToken, typeof(HeroesProfileProvider)).BuildServiceProvider().CreateScope())
            {
                SaltySadism saltySadism = scope.ServiceProvider.GetRequiredService <SaltySadism>();

                await saltySadism.RunAsync();
            }
        }
Exemple #2
0
        protected async Task CommandAsync(CancellationToken cancellationToken)
        {
            using (IServiceScope scope = new ServiceCollection().AddCoreServices(cancellationToken, typeof(ReplayDirectoryProvider)).BuildServiceProvider(new ServiceProviderOptions {
                ValidateScopes = true, ValidateOnBuild = true
            }).CreateScope())
            {
                SaltySadism saltySadism = scope.ServiceProvider.GetRequiredService <SaltySadism>();

                await saltySadism.RunAsync();
            }
        }