示例#1
0
        private ApplicationWatcherService CreateApplicationWatcherServiceForGetLogs(IRegistryService registryService,
                                                                                    IFileWrapperService fileWrapperService, IOptions <RegistryOptions> registryOptions)
        {
            var logger = Mock.Of <ILogger <ApplicationWatcherService> >();

            return(new ApplicationWatcherService(registryService, Mock.Of <IProcessService>(),
                                                 fileWrapperService, Mock.Of <IGrpcClientService>(),
                                                 registryOptions, Mock.Of <IOptions <HealthCheckOptions> >(), Mock.Of <IOptions <GrpcOptions> >(),
                                                 logger));
        }
示例#2
0
        public ApplicationWatcherService(IRegistryService registryService, IProcessService processService, IFileWrapperService fileWrapperService,
                                         IGrpcClientService grpcClient,
                                         IOptions <RegistryOptions> registryOptions, IOptions <HealthCheckOptions> healthCheckOptions, IOptions <GrpcOptions> grpcOptions,
                                         ILogger <ApplicationWatcherService> logger)
        {
            _registryService    = registryService;
            _processService     = processService;
            _fileWrapperService = fileWrapperService;
            _grpcClient         = grpcClient;

            _registryOptions    = registryOptions.Value;
            _healthCheckOptions = healthCheckOptions.Value;
            _grpcOptions        = grpcOptions.Value;

            _logger = logger;
        }