public AuthenticateUserCommandHandler(IMediator mediator, IDocumentContext documentContext, IRedisContext redisContext, ICoreConfiguration coreConfiguration)
 {
     _mediator          = mediator;
     _coreConfiguration = coreConfiguration;
     _documentContext   = documentContext;
     _redisContext      = redisContext;
 }
 public ForgotPasswordCommandHandler(IMediator mediator, ICoreConfiguration coreConfiguration, IRedisContext redisContext, IEmailService emailService)
 {
     _mediator          = mediator;
     _coreConfiguration = coreConfiguration;
     _redisContext      = redisContext;
     _emailService      = emailService;
 }
Example #3
0
 public ResetPasswordCommandHandler(IMediator mediator, ICoreConfiguration coreConfiguration, IRedisContext redisContext, IDocumentContext documentContext)
 {
     _mediator          = mediator;
     _coreConfiguration = coreConfiguration;
     _redisContext      = redisContext;
     _documentContext   = documentContext;
 }
Example #4
0
        // private readonly ILogger<HomeController> _logger;

        public HomeController(IConfiguration config, IFirstDI first, IRedisContext cache, IRegexRule regexRule)
        {
            _config    = config;
            _first     = first;
            _cache     = cache;
            _regexRule = regexRule;
        }
Example #5
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IWebHostEnvironment env,
                              IApplicationLifetime applicationLifetime,
                              ILogger <Startup> logger,
                              IRedisContext redis)
        {
            _logger = logger;
            _redis  = redis;
            app.UseCors(x =>
            {
                x.AllowAnyHeader();
                x.AllowAnyMethod();
                x.WithOrigins(
                    "http://localhost:8081",
                    "http://localhost:8082",
                    "http://localhost:8083",
                    "http://localhost:8084",
                    "app://."
                    );
                x.AllowCredentials();
            });

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseDefaultFiles();
            app.UseStaticFiles();

            app.UseHangfireDashboard("/job");
            app.UseHangfireServer(new BackgroundJobServerOptions
            {
                ServerName = "docker ui job server"
            });

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.MapHub <BaseHub>("/pull");
            });

            app.UseSwagger();
            app.UseSwaggerUI(options =>
            {
                options.SwaggerEndpoint("../swagger/v1/swagger.json", "Docker Gui V1");
            });
            if (applicationLifetime == null)
            {
                throw new Exception("applicationLifetime do not null");
            }
            applicationLifetime.ApplicationStarted.Register(OnStarted);
            applicationLifetime.ApplicationStopped.Register(OnStopped);
        }
Example #6
0
        protected static void ClearDb(IRedisContext redisContext, TestContext testContext)
        {
            var concreteContext = (RedisTestContext)redisContext;

            Assert.IsTrue(concreteContext.IsLocal);
            var keys = RedisTestContext.Retry(() => redisContext.GetKeys("*"), 5);

            redisContext.Delete(keys.ToArray());
        }
Example #7
0
        public IndexModule(IRedisContext context)
        {
            this.RequiresAuthentication();


            Get["/helloworld"] = o =>
            {
                context.HelloWorld();
                return(HttpStatusCode.OK);
            };
        }
Example #8
0
 public Sentry(
     ILogger <Sentry> log,
     IRedisContext redis,
     IMySqlContext dbContext,
     IMapper mapper)
 {
     _log       = log;
     _redis     = redis;
     _dbContext = dbContext;
     _mapper    = mapper;
 }
Example #9
0
 public RedisContextTests()
 {
     MockConn   = new Mock <IConnectionMultiplexer>();
     MockDB     = new Mock <IDatabase>();
     MockServer = new Mock <IServer>();
     MockConn.Setup(m => m.GetDatabase(It.IsAny <int>(), It.IsAny <object>())).Returns(MockDB.Object);
     MockConn.Setup(m => m.GetServer(It.IsAny <string>(), It.IsAny <object>())).Returns(MockServer.Object);
     MockOpt = new Mock <IOptions <DatabaseOptions> >();
     MockOpt.Setup(m => m.Value).Returns(new DatabaseOptions {
         Database = -1
     });
     RedisContext = new RedisContext(MockConn.Object, MockOpt.Object);
 }
 public ConnectionReadOnlyRepository(IMongoContext mongoContext, IRedisContext redisContext)
     : base(redisContext)
 {
     _mongoContext = mongoContext;
 }
 public ConnectionController(IMediator bus, IConnectionReadOnlyRepository connectionReadOnlyRepository, IRedisContext redisContext)
 {
     _bus = bus;
     _connectionReadOnlyRepository = connectionReadOnlyRepository;
 }
 public PointReadOnlyRepository(IMongoContext mongoContext, IRedisContext redisContext)
     : base(redisContext)
 {
     _mongoContext = mongoContext;
 }
 public ConnectionRepository(IMongoContext mongoContext, IRedisContext redisContext)
     : base(mongoContext, MongoCollections.Connection)
 {
     _redisContext = redisContext;
 }
Example #14
0
 public CustomerController(ICustomerManager customerManager, IRedisContext <Customer> customerRedisManager)
 {
     _customerManager      = customerManager;
     _customerRedisManager = customerRedisManager;
 }
Example #15
0
 public ProductsCache(IRedisContext context, ICacheSerializer cacheResializer)
 {
     _context         = context ?? throw new ArgumentNullException(nameof(context));
     _cacheResializer = cacheResializer ?? throw new ArgumentNullException(nameof(cacheResializer));
 }
 public GetResetRequestQueryHandler(IMediator mediator, IRedisContext redisContext)
 {
     _mediator     = mediator;
     _redisContext = redisContext;
 }
Example #17
0
 protected RedisQueryHandlerBase(IRedisContext redisContext)
 {
     RedisContext = redisContext;
 }
Example #18
0
 public AuthenticationService(IRedisContext context)
 {
     _context = context;
 }
 public LatestMessagesService(IRedisContext context,
                              ILatestMessageRepository latestMessageRepository)
 {
     _context = context;
     _latestMessageRepository = latestMessageRepository;
 }
 public UserRefreshTokenQueryHandler(IRedisContext redisContext) : base(redisContext)
 {
 }
Example #21
0
 /// <summary>登录信息存储</summary>
 public LoginService(IRedisContext redisContext)
 {
     _database = redisContext.Database;
 }
Example #22
0
 public TransactionRepository(IRedisContext ctx) : base(ctx)
 {
 }
Example #23
0
 public PointController(IMediator bus, IPointReadOnlyRepository pointReadOnlyRepository, IRedisContext redisContext)
 {
     _bus = bus;
     _pointReadOnlyRepository = pointReadOnlyRepository;
     _redisContext            = redisContext;
 }
Example #24
0
 public StatusUpdater(IRedisContext context)
 {
     _context = context;
 }
Example #25
0
 public RedisRepository(IRedisContext redisContext)
 {
     _redisContext = redisContext;
 }
 public WeatherForecastController(ILogger <WeatherForecastController> logger, IRedisContext <WeatherForecast> redisContext)
 {
     _logger       = logger;
     _redisContext = redisContext;
 }
Example #27
0
 public SequenceService(IRedisContext redisContext) => _database = redisContext.Database;
 public RouteController(IMediator mediator, IRouteReadOnlyRepository routeReadOnlyRepository, IRedisContext redisContext)
 {
     _mediator = mediator;
     _routeReadOnlyRepository = routeReadOnlyRepository;
     _redisContext            = redisContext;
 }
Example #29
0
 public LatestRegisteredUsersService(IRedisContext context)
 {
     _context = context;
 }
Example #30
0
 public Worker(ILogger <Worker> logger, IRedisContext <WeatherForecast> redisContext)
 {
     _logger       = logger;
     _redisContext = redisContext;
     _random       = new Random();
 }