Exemplo n.º 1
0
        public void Register <T>(T eventSource) where T : class, IEventSource
        {
            if (_commandContext == null)
            {
                _commandContext = _commandContextProvider.Get();
            }

            if (eventSource != null)
            {
                _eventSources.Add(eventSource);
            }
        }
Exemplo n.º 2
0
        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();
            }
        }
Exemplo n.º 3
0
        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();
            }
        }