Ejemplo n.º 1
0
        public RepositoryContainer(ICosmosWatcherOption watcherOption, CosmosClient cosmosClient, ILoggerFactory loggerFactory, ILogger <RepositoryContainer> logger)
        {
            watcherOption.VerifyNotNull(nameof(watcherOption)).Verify();
            cosmosClient.VerifyNotNull(nameof(cosmosClient));
            loggerFactory.VerifyNotNull(nameof(loggerFactory));
            logger.VerifyNotNull(nameof(logger));

            _watcherOption = watcherOption;
            _cosmosClient  = cosmosClient;
            _loggerFactory = loggerFactory;
            _logger        = logger;
        }
Ejemplo n.º 2
0
        public CosmosWatcherRepository(ICosmosWatcherOption watcherOption, ILoggerFactory loggerFactory)
        {
            watcherOption.VerifyNotNull(nameof(watcherOption)).Verify();
            loggerFactory.VerifyNotNull(nameof(loggerFactory));

            _watcherOption = watcherOption;
            _logger        = loggerFactory.CreateLogger <CosmosWatcherRepository>();

            _cosmosClient = new CosmosClient(watcherOption.GetResolvedConnectionString());

            Database  = new RepositoryDatabase(_cosmosClient, loggerFactory.CreateLogger <RepositoryDatabase>());
            Container = new RepositoryContainer(watcherOption, _cosmosClient, loggerFactory, loggerFactory.CreateLogger <RepositoryContainer>());
        }
Ejemplo n.º 3
0
        public AgentController(ICosmosWatcherOption option, IWatcherRepository watcherRepository, ILogger <AgentController> logger)
        {
            option.VerifyNotNull(nameof(option));
            watcherRepository.VerifyNotNull(nameof(watcherRepository));
            logger.VerifyNotNull(nameof(logger));

            _option            = option;
            _watcherRepository = watcherRepository;
            _logger            = logger;

            _agentContainer  = _watcherRepository.Container.Get <AgentRecord>();
            _targetContainer = _watcherRepository.Container.Get <TargetRecord>();
        }
Ejemplo n.º 4
0
 public AgentTests()
 {
     _watcherOption = new TestOptionBuilder().Build($"DatabaseName={_databaseName}");
 }
Ejemplo n.º 5
0
 public AgentControllerInitialStateTests()
 {
     _watcherOption = new TestOptionBuilder().Build($"DatabaseName={_databaseName}");
 }
Ejemplo n.º 6
0
 public MonitorActivity(IOption option, ICosmosWatcherOption watcherOption, ILogger <MonitorActivity> logger)
 {
     _option        = option;
     _watcherOption = watcherOption;
     _logger        = logger;
 }
Ejemplo n.º 7
0
 public TargetRecordTests()
 {
     _watcherOption = new TestOptionBuilder().Build($"DatabaseName={_databaseName}");
 }
 public AgentControllerRegisterTests()
 {
     _watcherOption = new TestOptionBuilder().Build($"DatabaseName={_databaseName}");
 }