public void Register <T>(T eventSource) where T : class, IEventSource { if (_commandContext == null) { _commandContext = _commandContextProvider.Get(); } if (eventSource != null) { _eventSources.Add(eventSource); } }
private void RegisterInternal <T>(T eventSource, bool isMaxVersion) where T : class, IEventSourceBase { if (eventSource != null && !_eventSources.ContainsKey(eventSource)) { Logger.Debug("Register event source Id '{0}', Version '{1}', Type '{2}'", eventSource.StringId, eventSource.Version, eventSource.GetType().Name); _eventSources.Add(eventSource, isMaxVersion); } if (_commandContext == null) { _commandContext = _commandContextProvider.Get(); } }
public void Register <T>(T eventSource) where T : class, IEventSource { if (eventSource != null && !_eventSources.Contains(eventSource)) { Logger.Debug("Register event source Id '{0}', Version '{1}', Type '{2}'", eventSource.Id, eventSource.Version, eventSource.GetType().Name); _eventSources.Add(eventSource); } if (_commandContext == null) { _commandContext = _commandContextProvider.Get(); } }