Esempio n. 1
0
 public SnapshotReaderCosmosDB(
     ICosmosDBClient cosmosDbClient,
     ICosmosDBConfigurations cosmosDBConfigurations,
     IEventDeserializer deserializer)
 {
     _cosmosDbClient         = cosmosDbClient ?? throw new ArgumentNullException(nameof(cosmosDbClient));
     _cosmosDBConfigurations = cosmosDBConfigurations ?? throw new ArgumentNullException(nameof(cosmosDBConfigurations));
     _deserializer           = deserializer ?? throw new ArgumentNullException(nameof(deserializer));
 }
Esempio n. 2
0
 public AppendToStreamAsyncHandler(IEventSerializer eventSerializer,
                                   ICosmosDBClient cosmosClient,
                                   ICosmosDBConfigurations cosmosDBConfigurations,
                                   IOperationDispatcher operationDispatcher)
 {
     _eventSerializer        = eventSerializer ?? throw new ArgumentNullException(nameof(eventSerializer));
     _cosmosClient           = cosmosClient ?? throw new ArgumentNullException(nameof(cosmosClient));
     _cosmosDBConfigurations = cosmosDBConfigurations ?? throw new ArgumentNullException(nameof(cosmosDBConfigurations));
     _operationDispatcher    = operationDispatcher ?? throw new ArgumentNullException(nameof(operationDispatcher));
 }
Esempio n. 3
0
        public CosmosDBConnection(IEventSerializer eventSerializer,
                                  ICosmosDBClient cosmosClient,
                                  ICosmosDBConfigurations cosmosDBConfigurations,
                                  IOperationDispatcher operationDispatcher)
        {
            _eventSerializer        = eventSerializer ?? throw new ArgumentNullException(nameof(eventSerializer));
            _cosmosClient           = cosmosClient ?? throw new ArgumentNullException(nameof(cosmosClient));
            _cosmosDBConfigurations = cosmosDBConfigurations ?? throw new ArgumentNullException(nameof(cosmosDBConfigurations));
            _operationDispatcher    = operationDispatcher ?? throw new ArgumentNullException(nameof(operationDispatcher));

            RegisterHandlers();
        }
Esempio n. 4
0
 public SnapshotterCosmosDB(IAggregateRootRepository <TAggregateRoot> rootRepository,
                            IAggregateChangeTracker changeTracker,
                            ICosmosDBClient cosmosDbClient,
                            ICosmosDBConfigurations cosmosDBConfigurations,
                            IEventSerializer eventSerializer)
 {
     _rootRepository         = rootRepository ?? throw new ArgumentNullException(nameof(rootRepository));
     _changeTracker          = changeTracker ?? throw new ArgumentNullException(nameof(changeTracker));
     _cosmosDbClient         = cosmosDbClient ?? throw new ArgumentNullException(nameof(cosmosDbClient));
     _cosmosDBConfigurations = cosmosDBConfigurations ?? throw new ArgumentNullException(nameof(cosmosDBConfigurations));
     _eventSerializer        = eventSerializer ?? throw new ArgumentNullException(nameof(eventSerializer));
 }
 internal GetStreamDocumentByIdAsyncHandler(ICosmosDBClient cosmosClient,
                                            ICosmosDBConfigurations cosmosDBConfigurations)
 {
     _cosmosClient           = cosmosClient;
     _cosmosDBConfigurations = cosmosDBConfigurations;
 }
Esempio n. 6
0
 public GetEventDocumentsForwardHandler(ICosmosDBClient cosmosClient,
                                        ICosmosDBConfigurations cosmosDBConfigurations)
 {
     _cosmosClient           = cosmosClient;
     _cosmosDBConfigurations = cosmosDBConfigurations;
 }