Beispiel #1
0
        public CassandraRoleStore(
            TSession session,
            IOptionsSnapshot <CassandraOptions> snapshot,
            ILoggerFactory loggerFactory,
            IdentityErrorDescriber errorDescriber           = null,
            CassandraErrorDescriber cassandraErrorDescriber = null)
        {
            ErrorDescriber          = errorDescriber;
            CassandraErrorDescriber = cassandraErrorDescriber;
            Session = session ?? throw new ArgumentNullException(nameof(session));

            _mapper   = new Mapper(session);
            _table    = new Table <TRole>(session);
            _snapshot = snapshot;
            _logger   = loggerFactory.CreateLogger(typeof(CassandraRoleStore <,>).GetTypeInfo().Name);
        }
Beispiel #2
0
        public CassandraUserStore(
            TSession session,
            IOptionsSnapshot <CassandraOptions> snapshot,
            ILogger <CassandraUserStore <TUser, TSession> > logger,
            IdentityErrorDescriber errorDescriber           = null,
            CassandraErrorDescriber cassandraErrorDescriber = null)
        {
            ErrorDescriber          = errorDescriber;
            CassandraErrorDescriber = cassandraErrorDescriber;
            Session = session ?? throw new ArgumentNullException(nameof(session));

            _mapper     = new Mapper(session);
            _usersTable = new Table <TUser>(session);
            _snapshot   = snapshot;
            _logger     = logger;
        }