public LogEventProvider(
     ILogEventRepository logEventRepository,
     IOptionsMonitor <CentralizedLogOptions> options)
 {
     _logEventRepository = logEventRepository;
     _options            = options;
 }
Example #2
0
        public LogEventService(
            ILoggerFactory loggerFactory,
            ILogEventRepository repository)
        {
            EnsureThat.EnsureArg.IsNotNull(loggerFactory, nameof(loggerFactory));
            EnsureThat.EnsureArg.IsNotNull(repository, nameof(repository));

            this.logger     = loggerFactory.CreateLogger <LogEventService>();
            this.repository = repository;
        }
Example #3
0
        public LogEventRepositoryTests()
        {
            this.Services
            .AddNaos("Product", "Capability", new[] { "All" }, n => n
                     .AddOperations(o => o
                                    .AddLogging(
                                        l => l.UseAzureLogAnalytics(), // registers loganalytics sink
                                        correlationId: $"TEST{IdGenerator.Instance.Next}"))
                     .AddJobScheduling());

            this.ServiceProvider = this.Services.BuildServiceProvider();
            this.sut             = this.ServiceProvider.GetService <ILogEventRepository>();
        }
        public LogEventRepositoryTests()
        {
            var configuration = NaosConfigurationFactory.Create();

            this.services
            .AddNaos(configuration, "Product", "Capability", new[] { "All" }, n => n
                     .AddOperations(o => o
                                    .AddLogging(
                                        l => l.UseAzureLogAnalytics(), // registers ILogEventRepository
                                        correlationId: $"TEST{RandomGenerator.GenerateString(9, true)}"))
                     .AddJobScheduling());

            this.ServiceProvider = this.services.BuildServiceProvider();
            this.sut             = this.ServiceProvider.GetService <ILogEventRepository>();
        }
        public NaosOperationsLogEventsController(
            ILoggerFactory loggerFactory,
            ILogEventRepository repository,
            ILogEventService service,
            IFilterContextAccessor filterContext)
        {
            EnsureThat.EnsureArg.IsNotNull(loggerFactory, nameof(loggerFactory));
            EnsureThat.EnsureArg.IsNotNull(repository, nameof(repository));
            EnsureThat.EnsureArg.IsNotNull(service, nameof(service));

            this.logger        = loggerFactory.CreateLogger <NaosOperationsLogEventsController>();
            this.filterContext = filterContext.Context ?? new FilterContext();
            this.repository    = repository;
            this.service       = service;
        }
Example #6
0
        /// <summary>
        /// Construtor utilizado para instanciar as classes que serão testadas
        /// </summary>
        public RepositoriesTest()
        {
            appConfiguration = new AppConfiguration();
            var contextDB = new TheCatDBContext(appConfiguration);

            breedsBase = new Breeds("abys", "Abyssinian");
            breedsBase.SetOrigin("Egypt");
            breedsBase.SetTemperament("Active, Energetic, Independent, Intelligent, Gentle");
            breedsBase.SetDescription("The Abyssinian is easy to care for, and a joy to have in your home. They’re affectionate cats and love both people and other animals.");

            categoryBase = new Category(1, "hats");

            imageUrlBase = new ImageUrl("393", "https://cdn2.thecatapi.com/images/393.jpg");
            imageUrlBase.SetWidth(1024);
            imageUrlBase.SetHeight(654);
            imageUrlBase.SetBreeds(breedsBase);
            imageUrlBase.SetCategory(categoryBase);

            imageUrlRepository = new ImageUrlRepository(contextDB);
            breedsRepository   = new BreedsRepository(contextDB, imageUrlRepository);
            categoryRepository = new CategoryRepository(contextDB);
            logEventRepository = new LogEventRepository(contextDB);
        }
Example #7
0
 public LogService(ISourceRepository sourceRepository, IBatchRepository batchRepository, ILogEventRepository eventRepository)
 {
     _sourceRepository = sourceRepository;
     _batchRepository = batchRepository;
     _eventRepository = eventRepository;
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogEventUnitOfWork"/> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 public LogEventUnitOfWork(ILogEventRepository repository)
 {
     this.repository = repository;
 }
Example #9
0
 public LogService(ILogEventRepository repository)
 {
     _repository = repository;
 }
 public QueryableRepositoryTests(ITestOutputHelper output) : base(output)
 {
     _identityRepository = new IdentityRepository(_configuration);
     _dailyRepository    = new DailyLogEventRepository(_configuration);
 }
Example #11
0
 public LogService(ISourceRepository sourceRepository, IBatchRepository batchRepository, ILogEventRepository eventRepository)
 {
     _sourceRepository = sourceRepository;
     _batchRepository  = batchRepository;
     _eventRepository  = eventRepository;
 }
 public ReadOnlyRepositoryTests(ITestOutputHelper output) : base(output)
 {
     _identityRepository = new IdentityRepository(_configuration);
     _dailyRepository    = new DailyLogEventRepository(_configuration);
     _employeeRepository = new EmployeeRepository(_configuration);
 }
 public QueryTests(ITestOutputHelper output) : base(output)
 {
     _dailyRepository    = new DailyLogEventRepository(_configuration);
     _employeeRepository = new EmployeeRepository(_configuration);
 }
Example #14
0
 public LogEventService(ILogEventRepository iLogEventRepository)
 {
     this._iLogEventRepository = iLogEventRepository;
 }