/// <summary> /// Initializes a new instance of the <see cref="DocumentDbEventStore{TKey}"/> class. /// </summary> /// <param name="persistence">The <see cref="IPersistence">persistence</see> associated with the event store.</param> /// <param name="configuration">The <see cref="DocumentDbEventStoreConfiguration">configuration</see> used by the event store.</param> public DocumentDbEventStore(IPersistence persistence, DocumentDbEventStoreConfiguration configuration) : base(persistence) { Arg.NotNull(configuration, nameof(configuration)); Configuration = configuration; client = configuration.CreateClient(); eventSerializer = new JsonMessageSerializer <IEvent>(configuration.MessageTypeResolver, configuration.JsonSerializer); }
/// <summary> /// Initializes a new instance of the <see cref="DocumentDbEventStore"/> class. /// </summary> /// <param name="persistence">The <see cref="IPersistence">persistence</see> associated with the event store.</param> /// <param name="configuration">The <see cref="DocumentDbEventStoreConfiguration">configuration</see> used by the event store.</param> public DocumentDbEventStore(IPersistence persistence, DocumentDbEventStoreConfiguration configuration) : base(persistence, configuration) { }