Example #1
0
 public FileStorageEventStoreInternalTrackingClient(IEventStreamTrackedReactiveReader client, IEventsSerializer eventSerializer,
                                                    IMetadataSerializer metadataSerializer)
 {
     this.Client             = client;
     this.EventSerializer    = eventSerializer;
     this.MetadataSerializer = metadataSerializer;
 }
Example #2
0
    /// <summary>
    /// Create a new EventStoreDB producer instance
    /// </summary>
    /// <param name="eventStoreClient">EventStoreDB gRPC client</param>
    /// <param name="serializer">Optional: event serializer instance</param>
    /// <param name="metaSerializer">Optional: metadata serializer instance</param>
    public EventStoreProducer(
        EventStoreClient eventStoreClient,
        IEventSerializer?serializer        = null,
        IMetadataSerializer?metaSerializer = null
        ) : base(TracingOptions)
    {
        _client         = Ensure.NotNull(eventStoreClient);
        _serializer     = serializer ?? DefaultEventSerializer.Instance;
        _metaSerializer = metaSerializer ?? DefaultMetadataSerializer.Instance;

        ReadyNow();
    }
Example #3
0
 public EsdbEventStore(
     EventStoreClient client,
     IEventSerializer?serializer        = null,
     IMetadataSerializer?metaSerializer = null,
     ILogger <EsdbEventStore>?logger    = null
     )
 {
     _logger         = logger;
     _client         = Ensure.NotNull(client);
     _serializer     = serializer ?? DefaultEventSerializer.Instance;
     _metaSerializer = metaSerializer ?? DefaultMetadataSerializer.Instance;
 }
Example #4
0
 public TypedEventStore(IEventStore eventStore, IEventsSerializer eventsSerializer, IMetadataSerializer metadataSerializer, ILogger logger)
 {
     this.EventStore         = eventStore;
     this.EventsSerializer   = eventsSerializer;
     this.MetadataSerializer = metadataSerializer;
     this.Logger             = logger;
 }
Example #5
0
 public static void SetDefaultSerializer(IMetadataSerializer serializer)
 => Instance = serializer;
Example #6
0
 protected EventStoreSubscriptionBase(EventStoreClient eventStoreClient, T options, ConsumePipe consumePipe)
     : base(options, consumePipe)
 {
     EventStoreClient = Ensure.NotNull(eventStoreClient);
     _metaSerializer  = Options.MetadataSerializer ?? DefaultMetadataSerializer.Instance;
 }