Пример #1
0
 public Repository(IDbContextFactory dbContextFactory, EventBag eventBag,
                   IBoltOnClock boltOnClock)
 {
     DbContext    = dbContextFactory.Get <TDbContext>();
     DbSets       = DbContext.Set <TEntity>();
     _eventBag    = eventBag;
     _boltOnClock = boltOnClock;
 }
Пример #2
0
 public Repository(TCosmosDbOptions options, EventBag eventBag,
                   IBoltOnClock boltOnClock, string collectionName = null)
 {
     DatabaseName   = options.DatabaseName;
     _eventBag      = eventBag;
     _boltOnClock   = boltOnClock;
     CollectionName = collectionName ?? typeof(TEntity).Name.Pluralize();
     DocumentClient = new DocumentClient(new Uri(options.Uri), options.AuthorizationKey,
                                         new JsonSerializerSettings
     {
         TypeNameHandling = TypeNameHandling.Auto
     });
     DocumentCollectionUri = UriFactory.CreateDocumentCollectionUri(DatabaseName, CollectionName);
 }
Пример #3
0
        static MediatorIntegration2Tests()
        {
            if (!MediatorTestHelper.IsIntegrationTestsEnabled)
            {
                return;
            }

            _serviceCollection = new ServiceCollection();
            _serviceCollection.AddLogging();
            _serviceCollection.BoltOn();
            _serviceProvider = _serviceCollection.BuildServiceProvider();
            _serviceProvider.TightenBolts();
            _boltOnClock = _serviceProvider.GetService <IBoltOnClock>();
            _sut         = _serviceProvider.GetService <IMediator>();
        }
Пример #4
0
 public StopwatchInterceptor(IBoltOnLogger <StopwatchInterceptor> logger, IBoltOnClock boltOnClock)
 {
     _logger      = logger;
     _boltOnClock = boltOnClock;
 }
Пример #5
0
 public StudentRepository(IDbContextFactory dbContextFactory, EventBag eventBag, IBoltOnClock boltOnClock)
     : base(dbContextFactory, eventBag, boltOnClock)
 {
 }