示例#1
0
 public void ChangePublisher
 (
     IPublisherStrategy publisherStrategy,
     Publisher newPublisher
 )
 {
     if (publisherStrategy.CanChangePublisher(_publisher, newPublisher))
     {
         _publisher   = newPublisher;
         _publisherId = newPublisher.Id;
     }
 }
示例#2
0
 protected ExchangeMeta()
 {
     // Unless otherwise specified, the default publisher strategy will be used.
     PublisherStrategy = new DefaultPublisherStrategy();
 }
示例#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));
 }