public static DIHelper AddModuleProvider(this DIHelper services) { if (services.TryAddScoped <ModuleProvider>()) { return(services .AddCoreSettingsService() .AddHelpers()); } return(services); }
public static DIHelper AddCommonMethods(this DIHelper services) { services.TryAddScoped <CommonMethods>(); return(services .AddCoreSettingsService() .AddCommonLinkUtilityService() .AddEmailValidationKeyProviderService() .AddApiSystemHelper() .AddTenantManagerService() .AddUserFormatter() .AddUserManagerWrapperService() .AddSettingsManagerService() .AddSecurityContextService() .AddHostedSolutionService()); }
public static DIHelper AddUserService(this DIHelper services) { services.TryAddSingleton(typeof(ICacheNotify <>), typeof(KafkaCache <>)); services .AddCoreSettingsService() .AddLoggerService() .AddUserDbContextService(); services.TryAddScoped <EFUserService>(); services.TryAddScoped <IUserService, CachedUserService>(); services.TryAddScoped <IConfigureOptions <EFUserService>, ConfigureEFUserService>(); services.TryAddScoped <IConfigureOptions <CachedUserService>, ConfigureCachedUserService>(); services.TryAddSingleton <UserServiceCache>(); return(services); }
public static DIHelper AddCoreSettingsController(this DIHelper services) { return(services .AddCoreSettingsService()); }
public static DIHelper AddCoreConfigurationService(this DIHelper services) { services.TryAddScoped <CoreConfiguration>(); return(services .AddCoreSettingsService()); }