/// <summary> /// Extends instance with others. Returns new instance. /// </summary> public static LinkPublishProperties Extend(this LinkPublishProperties @this, params LinkPublishProperties[] others) { if (@this == null) { throw new ArgumentNullException(nameof(@this)); } if (others?.Any() == true) { foreach (var other in others) { if (other.RoutingKey != null) { @this.RoutingKey = other.RoutingKey; } if (other.Mandatory != null) { @this.Mandatory = other.Mandatory; } } } return(@this); }
public virtual void Extend(LinkPublishProperties properties) { if (properties == null) throw new ArgumentNullException(nameof(properties)); if (properties.Mandatory != null) Mandatory = properties.Mandatory; if (properties.RoutingKey != null) RoutingKey = properties.RoutingKey; }
public LinkProducerQueueMessage(byte[] body, LinkMessageProperties properties, LinkPublishProperties publishProperties, CancellationToken cancellation) : base(cancellation) { Body = body; Properties = properties; PublishProperties = publishProperties; }
/// <summary> /// Makes clone of instance /// </summary> public static LinkPublishProperties Clone(this LinkPublishProperties @this) => new LinkPublishProperties().Extend(@this);
public ILinkProducerConfigurationBuilder PublishProperties(LinkPublishProperties value) { Configuration.PublishProperties = value; return this; }
/// <inheritdoc /> public void SetMessageId(byte[] body, LinkMessageProperties properties, LinkPublishProperties publishProperties) { properties.MessageId = Guid.NewGuid().ToString("D"); }
public void SetMessageId(byte[] body, LinkMessageProperties properties, LinkPublishProperties publishProperties) { properties.MessageId = Guid.NewGuid().ToString("D"); }