コード例 #1
0
 public UserManagerModule(IServiceProvider services)
 {
     _db        = services.GetRequiredService <EFContext>();
     _validator = services.GetRequiredService <IValidator>();
     _dota      = services.GetRequiredService <IDotaAssistans>();
     _logger    = services.GetRequiredService <ILogger>();
 }
コード例 #2
0
 public DotaModule(IServiceProvider services)
 {
     _dota      = services.GetService <IDotaAssistans>();
     _db        = services.GetRequiredService <EFContext>();
     _validator = services.GetRequiredService <IValidator>();
     _logger    = services.GetRequiredService <ILogger>();
     _draw      = services.GetRequiredService <IDraw <DotaGameResult> >();
 }
コード例 #3
0
        public DotaImageDrawService(IServiceProvider service)
        {
            var providerDelegat = service.GetRequiredService <Func <StorageContains, IStorage <Image> > >();

            _logger           = service.GetRequiredService <ILogger>();
            _dota             = service.GetRequiredService <IDotaAssistans>();
            _heroImageStorage = providerDelegat(StorageContains.DotaHero);
            _itemImageStorage = providerDelegat(StorageContains.DotaItem);
        }