public static DIHelper AddTariffService(this DIHelper services) { services.AddCoreDbContextService(); services.TryAddSingleton <TariffServiceStorage>(); services.TryAddScoped <ITariffService, TariffService>(); services.TryAddScoped <IConfigureOptions <TariffService>, ConfigureTariffService>(); return(services); }
public static DIHelper AddAzService(this DIHelper services) { services.AddCoreDbContextService(); services.TryAddScoped <DbAzService>(); services.TryAddScoped <IAzService, CachedAzService>(); services.TryAddSingleton <AzServiceCache>(); services.TryAddSingleton(typeof(ICacheNotify <>), typeof(KafkaCache <>)); return(services); }
public static DIHelper AddQuotaService(this DIHelper services) { services.AddCoreDbContextService(); services.TryAddSingleton(typeof(ICacheNotify <>), typeof(KafkaCache <>)); services.TryAddSingleton <QuotaServiceCache>(); services.TryAddScoped <DbQuotaService>(); services.TryAddScoped <IQuotaService, CachedQuotaService>(); services.TryAddScoped <IConfigureOptions <DbQuotaService>, ConfigureDbQuotaService>(); services.TryAddScoped <IConfigureOptions <CachedQuotaService>, ConfigureCachedQuotaService>(); return(services); }