public PortalSettingsServiceTests Setup() { var options = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; using (var store = new ApplicationDbContext(options)) { store.Database.EnsureCreated(); } var context = new ApplicationDbContext(options); var hostingEnvironment = Substitute.For <IHostingEnvironment>(); hostingEnvironment.ContentRootPath = @"c:\temp\"; var userManager = Substitute.For <UserManager <ApplicationUser> >( Substitute.For <IUserStore <ApplicationUser> >(), Substitute.For <IOptions <IdentityOptions> >(), Substitute.For <IPasswordHasher <ApplicationUser> >(), new IUserValidator <ApplicationUser> [0], new IPasswordValidator <ApplicationUser> [0], Substitute.For <ILookupNormalizer>(), Substitute.For <IdentityErrorDescriber>(), Substitute.For <IServiceProvider>(), Substitute.For <ILogger <UserManager <ApplicationUser> > >()); var settings = Substitute.For <IOptions <PortalSettings> >(); runtimeSettingsService = new PortalSettingsService(hostingEnvironment, context, userManager, settings); return(this); }
private int expiredIDNoOfDays = -90; // Porvided Default Value to make sure existing implementation will not break if Configuration does not exist; public SecurityService(ISecurityRepository repository, IDatastoreValidationRepository validationRepository, ICacheService cacheInstance, ILogService logService, IPortalSettingsService portalSettingsService, IPasswordHistoryService passwordHistoryService) //IMessageService messageService, { repositoryInstance = repository; validationRepositoryInstance = validationRepository; cacheService = cacheInstance; logger = logService; portalSettingsServiceInstance = portalSettingsService; passwordHistoryServiceInstance = passwordHistoryService; }
public HealthChecksService(ISyrinxCamundaClientService camundaService, IMemoryCacheService memoryCacheService, IPortalSettingsStore portalSettingsStore, IPortalSettingsService portalSettingsService, IModuleStore moduleStore) { this.camundaService = camundaService; this.memoryCacheService = memoryCacheService; this.portalSettingsStore = portalSettingsStore; this.portalSettingsService = portalSettingsService; this.moduleStore = moduleStore; }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurationController" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="logging">The logging.</param> /// <param name="portalSettings">The portal settings.</param> /// <param name="portalSettingsService">The portal settings service.</param> /// <param name="runtimeLoader">The runtime loader.</param> public ConfigurationController( IAs4SettingsService settingsService, ILogging logging, IOptions <PortalSettings> portalSettings, IPortalSettingsService portalSettingsService, IRuntimeLoader runtimeLoader) { this.settingsService = settingsService; this.portalSettings = portalSettings; this.portalSettingsService = portalSettingsService; this.runtimeLoader = runtimeLoader; }
public PortalSettingsController(IPortalSettingsService portalSettingsService) { portalSettingsServiceInstance = portalSettingsService; }
public SettingsController(IOperationService operationService, IPortalSettingsService portalSettingsService) : base(operationService) { this.portalSettingsService = portalSettingsService; }
public ReportService(IReportsRepository reportsRepository, IPortalSettingsService portalSettingsServiceInstance) { _reportsRepo = reportsRepository; portalSettingsService = portalSettingsServiceInstance; }
public ProjectService(IProjectStore projectStore, IPortalSettingsService portalSettingsService, IMemoryCacheService memoryCacheService) { this.projectStore = projectStore; this.portalSettingsService = portalSettingsService; this.memoryCacheService = memoryCacheService; }
/// <summary>Initializes a new instance of the <see cref="FeaturesController" /> class.</summary> /// <param name="portalSettingsService">The portal settings service, or <c>null</c>.</param> /// <param name="moduleSettingsService">The module settings service, or <c>null</c>.</param> internal FeaturesController(IPortalSettingsService portalSettingsService, IModuleSettingsService moduleSettingsService) { this.portalSettingsService = portalSettingsService; this.moduleSettingsService = moduleSettingsService; }
/// <summary>Gets the portal settings service.</summary> /// <param name="moduleId">The portal ID.</param> /// <returns>A <see cref="IPortalSettingsService" /> instance.</returns> private IPortalSettingsService GetPortalSettingsService(int moduleId) { if (this.portalSettingsService == null) { this.portalSettingsService = new PortalSettingsService(new ModuleController().GetModule(moduleId).PortalID); } return this.portalSettingsService; }