public ClientAppRepo( IUsersContextFactory contextFactory, IConfigValueProvider configValueProvider) { _contextFactory = Preconditions.ThrowIfNull(contextFactory, nameof(contextFactory)); _configValueProvider = Preconditions.ThrowIfNull(configValueProvider, nameof(configValueProvider)); }
public DefaultApplicationCreator( IUsersContextFactory usersContextFactory, IConfiguration configuration) { _usersContextFactory = Preconditions.ThrowIfNull(usersContextFactory, nameof(usersContextFactory)); _configuration = Preconditions.ThrowIfNull(configuration, nameof(configuration)); }
public ClientAppRepo( IUsersContextFactory contextFactory, IConfigurationRoot config) { _contextFactory = Preconditions.ThrowIfNull(contextFactory, nameof(contextFactory)); Preconditions.ThrowIfNull(config, nameof(config)); _duration = new Lazy <int>( () => { // Get the config value, defaulting to 1 hour if (!int.TryParse( config.GetSection("BearerTokenTimeoutMinutes") .Value, out int duration)) { duration = DefaultDuration; } return(duration); }); _defaultOperationalContextUri = new Lazy <string>( () => config.GetSection("DefaultOperationalContextUri") .Value); _defaultAppName = new Lazy <string>( () => config.GetSection("DefaultApplicationName") .Value); _defaultClaimSetName = new Lazy <string>( () => config.GetSection("DefaultClaimSetName") .Value); }
/// <summary> /// Initializes a new instance of the <see cref="EmailScheduler"/> class. /// </summary> public EmailScheduler(NewsFeedService newsFeedService, UserService userService, IUsersContextFactory usersContextFactory, NewsLetterNotification notification) : base(Name) { this.newsFeedService = newsFeedService; this.userService = userService; this.usersContextFactory = usersContextFactory; this.notification = notification; }
public DefaultApplicationCreator( IUsersContextFactory usersContextFactory, ITemplateDatabaseLeaQuery templateDatabaseLeaQuery, IConfigValueProvider configValueProvider) { _usersContextFactory = Preconditions.ThrowIfNull(usersContextFactory, nameof(usersContextFactory)); _templateDatabaseLeaQuery = Preconditions.ThrowIfNull(templateDatabaseLeaQuery, nameof(templateDatabaseLeaQuery)); _configValueProvider = Preconditions.ThrowIfNull(configValueProvider, nameof(configValueProvider)); }
public AddressService( IUsersContextFactory usersSessionFactory, Func <INoSqlSession> mongoDbSessionFactory, IActionsContextFactory actionSessionFactory, IBus bus) { this.usersSessionFactory = usersSessionFactory; this.noSqlSessionFactory = mongoDbSessionFactory; this.actionSessionFactory = actionSessionFactory; this.bus = bus; }
public ChatService( IUsersContextFactory usersSessionFactory, Func <INoSqlSession> mongoDbSessionFactory, IVotingContextFactory votingSessionFactory, ICache cache) { this.usersSessionFactory = usersSessionFactory; this.noSqlSessionFactory = mongoDbSessionFactory; this.votingSessionFactory = votingSessionFactory; this.cache = cache; }
public ProjectService( IActionsContextFactory actionSessionFactory, Func <INoSqlSession> noSqlSessionFactory, IUsersContextFactory userSessionFactory, ICache cache, IBus bus) { this.noSqlSessionFactory = noSqlSessionFactory; this.actionSessionFactory = actionSessionFactory; this.userSessionFactory = userSessionFactory; this.bus = bus; this.cache = cache; }
protected override void Arrange() { _transaction = new TransactionScope(); Factory = Stub <IUsersContextFactory>(); A.CallTo(() => Factory.CreateContext()) .Returns(new SqlServerUsersContext()); SystemUnderTest = new AccessTokenClientRepo(Factory); TestFixtureContext = new SqlServerUsersContext(); }
public SponsorService( IUsersContextFactory usersSessionFactory, Func <INoSqlSession> mongoDbSessionFactory, IActionsContextFactory actionSessionFactory, OrganizationService organizationService, ICache cache, IBus bus, ILogger logger) { this.usersSessionFactory = usersSessionFactory; this.noSqlSessionFactory = mongoDbSessionFactory; this.actionSessionFactory = actionSessionFactory; this.organizationService = organizationService; this.cache = cache; this.bus = bus; this.logger = logger; }
public NotificationService( IActionsContextFactory actionsSessionFactory, IUsersContextFactory usersSessionFactory, ProjectService projectService, OrganizationService organizationService, Func <INoSqlSession> noSqlSessionFactory, IVotingContextFactory votingSessionFactory, ILogger logger) { this.actionsSessionFactory = actionsSessionFactory; this.usersSessionFactory = usersSessionFactory; this.projectService = projectService; this.noSqlSessionFactory = noSqlSessionFactory; this.votingSessionFactory = votingSessionFactory; this.organizationService = organizationService; this.logger = logger; }
public AccessTokenClientRepo( IUsersContextFactory contextFactory, IConfigurationRoot config) { _contextFactory = Preconditions.ThrowIfNull(contextFactory, nameof(contextFactory)); _duration = new Lazy <int>( () => { // Get the config value, defaulting to 1 hour if (!int.TryParse( config.GetSection("BearerTokenTimeoutMinutes") .Value, out int duration)) { duration = DefaultDuration; } return(duration); }); }
protected override void Arrange() { _transaction = new TransactionScope(); Factory = Stub <IUsersContextFactory>(); var config = new ConfigurationBuilder() .SetBasePath(TestContext.CurrentContext.TestDirectory) .AddJsonFile("appsettings.json", optional: true) .AddEnvironmentVariables() .Build(); var connectionStringProvider = new ConfigConnectionStringsProvider(config); A.CallTo(() => Factory.CreateContext()) .Returns(new SqlServerUsersContext(connectionStringProvider.GetConnectionString("EdFi_Admin"))); SystemUnderTest = new AccessTokenClientRepo(Factory, config); TestFixtureContext = new SqlServerUsersContext(connectionStringProvider.GetConnectionString("EdFi_Admin")); }
public ChangePasswordNotification(IMailSender mailSender, ILogger logger, IActionsContextFactory context, IUsersContextFactory usersContextFactory) : base(mailSender, logger, context, usersContextFactory) { }
public NewsLetterNotification(IMailSender mailSender, ILogger logger, IActionsContextFactory context, IUsersContextFactory usersContextFactory) : base(mailSender, logger, context, usersContextFactory) { }
public UserConfirmedNotification(IMailSender mailSender, ILogger logger, IActionsContextFactory context, IUsersContextFactory usersContextFactory) : base(mailSender, logger, context, usersContextFactory) { IncludeUnsubscribe = false; }
public AdminProfileNamesPublisher(IUsersContextFactory usersContextFactory, IProfileResourceNamesProvider profileResourceNamesProvider) { _usersContextFactory = Preconditions.ThrowIfNull(usersContextFactory, nameof(usersContextFactory)); _profileResourceNamesProvider = Preconditions.ThrowIfNull(profileResourceNamesProvider, nameof(profileResourceNamesProvider)); }
public PrivateMessage(IMailSender mailSender, ILogger logger, IActionsContextFactory context, IUsersContextFactory usersContextFactory) : base(mailSender, logger, context, usersContextFactory) { }
public NotificationTaskServiceBase(IMailSender mailSender, ILogger logger, IActionsContextFactory actionsContextFactory, IUsersContextFactory usersContextFactory) : base(mailSender, null, logger) { this.actionsContextFactory = actionsContextFactory; this.usersContextFactory = usersContextFactory; }
public AccessTokenClientRepo(IUsersContextFactory contextFactory) { _contextFactory = Preconditions.ThrowIfNull(contextFactory, nameof(contextFactory)); }
public ObjectCreatedNotification(IMailSender mailSender, ILogger logger, IActionsContextFactory context, IUsersContextFactory usersContextFactory) : base(mailSender, logger, context, usersContextFactory) { IncludeUnsubscribe = true; }