Beispiel #1
0
        public RoleClaimsProviderTest(ITestOutputHelper output)
        {
            var logger = Substitute.For <ILogger <RoleClaimsProvider> >();

            logger.When(x => x.Log <object>(Arg.Any <LogLevel>(), Arg.Any <EventId>(), Arg.Any <object>(), Arg.Any <Exception>(), Arg.Any <Func <object, Exception, string> >()))
            .Do(x =>
            {
                output.WriteLine("Current threadid: " + Task.CurrentId);
            });
            roleClaimsProvider = new RoleClaimsProvider(Substitute.For <DataInfrastructure>(), logger);
            this.output        = output;
        }
Beispiel #2
0
 public TimedHostedService(RoleClaimsProvider roleClaimsProvider, ILogger <TimedHostedService> timedHostedServiceLogger)
 {
     this.roleClaimsProvider       = roleClaimsProvider;
     this.timedHostedServiceLogger = timedHostedServiceLogger;
 }
Beispiel #3
0
 public RoleStore(IDatabaseConnectionFactory databaseConnectionFactory)
 {
     _rolesTable      = new RolesProvider(databaseConnectionFactory);
     _roleClaimsTable = new RoleClaimsProvider(databaseConnectionFactory);
 }
 public ValuesController(RoleClaimsProvider roleClaimsProvider)
 {
     this.roleClaimsProvider = roleClaimsProvider;
 }