Exemplo n.º 1
0
 public void ChangePublisher
 (
     IPublisherStrategy publisherStrategy,
     Publisher newPublisher
 )
 {
     if (publisherStrategy.CanChangePublisher(_publisher, newPublisher))
     {
         _publisher   = newPublisher;
         _publisherId = newPublisher.Id;
     }
 }
Exemplo n.º 2
0
 protected ExchangeMeta()
 {
     // Unless otherwise specified, the default publisher strategy will be used.
     PublisherStrategy = new DefaultPublisherStrategy();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Sets a specific publisher strategy to be used.
 /// </summary>
 /// <param name="strategy">Reference to strategy.</param>
 internal void SetPublisherStrategy(IPublisherStrategy strategy)
 {
     PublisherStrategy = strategy ?? throw new ArgumentNullException(nameof(strategy));
 }