internal EventStoreSubscription(Guid correlationId, string streamId, SubscriptionsChannel subscriptionsChannel, Action<ResolvedEvent> eventAppeared, Action subscriptionDropped) { Ensure.NotEmptyGuid(correlationId, "correlationId"); Ensure.NotNull(streamId, "stream"); Ensure.NotNull(subscriptionsChannel, "subscriptionsChannel"); Ensure.NotNull(eventAppeared, "eventAppeared"); _correlationId = correlationId; _streamId = streamId; _subscriptionsChannel = subscriptionsChannel; _eventAppeared = eventAppeared; _subscriptionDropped = subscriptionDropped ?? (() => { }); }
/// <summary> /// Constructs a new instance of a <see cref="EventStoreConnection"/> /// </summary> /// <param name="settings">The <see cref="ConnectionSettings"/> containing the settings for this connection.</param> private EventStoreConnection(ConnectionSettings settings) { _settings = settings; LogManager.RegisterLogger(settings.Log); _log = LogManager.GetLogger(); _connector = new TcpConnector(); _subscriptionsChannel = new SubscriptionsChannel(_connector); }