コード例 #1
0
ファイル: Publisher.cs プロジェクト: Codestellation/Emisstar
        public Publisher(PublisherSettings settings, IHandlerSource handlerSource, IDispatcher[] dispatchers)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            if (handlerSource == null)
            {
                throw new ArgumentNullException("handlerSource");
            }

            if (dispatchers == null)
            {
                throw new ArgumentNullException("dispatchers");
            }

            if (dispatchers.Any(x => ReferenceEquals(x, null)))
            {
                throw new ArgumentException("At least one of dispatches is null.", "dispatchers");
            }

            _settings = settings;
            _handlerSource = handlerSource;
            _dispatchers = dispatchers;
        }
コード例 #2
0
ファイル: Builder.cs プロジェクト: Codestellation/Emisstar
 internal PublisherBuilder(IServiceRegistry container)
 {
     _container = container;
     _settings = new PublisherSettings();
 }