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