Example #1
0
 public CommandProcessor(IPublisher publisher, ISubscriberCreator subscriberCreator)
 {
     if (publisher == null)
     {
         throw new NullReferenceException("Publisher should not be null");
     }
     if (subscriberCreator == null)
     {
         throw new NullReferenceException("Subscriber creator should not be null");
     }
     _publisher         = publisher;
     _subscriberCreator = subscriberCreator;
 }
Example #2
0
 public CommandProcessor(IPublisher publisher, ISubscriberCreator subscriberCreator, TextReader textReader)
 {
     if (publisher == null)
     {
         throw new NullReferenceException("Publisher should not be null");
     }
     if (subscriberCreator == null)
     {
         throw new NullReferenceException("Subscriber creator should not be null");
     }
     if (textReader == null)
     {
         throw new NullReferenceException("Text reader should not be null");
     }
     _publisher = publisher;
     _subscriberCreator = subscriberCreator;
     _textReader = textReader;
 }