本文整理汇总了C#中IBasicProperties.IsClusterIdPresent方法的典型用法代码示例。如果您正苦于以下问题:C# IBasicProperties.IsClusterIdPresent方法的具体用法?C# IBasicProperties.IsClusterIdPresent怎么用?C# IBasicProperties.IsClusterIdPresent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IBasicProperties
的用法示例。
在下文中一共展示了IBasicProperties.IsClusterIdPresent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyFrom
public void CopyFrom(IBasicProperties basicProperties)
{
Preconditions.CheckNotNull(basicProperties, "basicProperties");
if (basicProperties.IsContentTypePresent()) ContentType = basicProperties.ContentType;
if (basicProperties.IsContentEncodingPresent()) ContentEncoding = basicProperties.ContentEncoding;
if (basicProperties.IsDeliveryModePresent()) DeliveryMode = basicProperties.DeliveryMode;
if (basicProperties.IsPriorityPresent()) Priority = basicProperties.Priority;
if (basicProperties.IsCorrelationIdPresent()) CorrelationId = basicProperties.CorrelationId;
if (basicProperties.IsReplyToPresent()) ReplyTo = basicProperties.ReplyTo;
if (basicProperties.IsExpirationPresent()) Expiration = basicProperties.Expiration;
if (basicProperties.IsMessageIdPresent()) MessageId = basicProperties.MessageId;
if (basicProperties.IsTimestampPresent()) Timestamp = basicProperties.Timestamp.UnixTime;
if (basicProperties.IsTypePresent()) Type = basicProperties.Type;
if (basicProperties.IsUserIdPresent()) UserId = basicProperties.UserId;
if (basicProperties.IsAppIdPresent()) AppId = basicProperties.AppId;
if (basicProperties.IsClusterIdPresent()) ClusterId = basicProperties.ClusterId;
if (basicProperties.IsHeadersPresent())
{
foreach (var header in basicProperties.Headers)
{
Headers.Add(header.Key, header.Value);
}
}
}
示例2: MessageBasicProperties
public MessageBasicProperties(IBasicProperties basicProperties)
: this()
{
ContentTypePresent = basicProperties.IsContentTypePresent();
ContentEncodingPresent = basicProperties.IsContentEncodingPresent();
HeadersPresent = basicProperties.IsHeadersPresent();
DeliveryModePresent = basicProperties.IsDeliveryModePresent();
PriorityPresent = basicProperties.IsPriorityPresent();
CorrelationIdPresent = basicProperties.IsCorrelationIdPresent();
ReplyToPresent = basicProperties.IsReplyToPresent();
ExpirationPresent = basicProperties.IsExpirationPresent();
MessageIdPresent = basicProperties.IsMessageIdPresent();
TimestampPresent = basicProperties.IsTimestampPresent();
TypePresent = basicProperties.IsTypePresent();
UserIdPresent = basicProperties.IsUserIdPresent();
AppIdPresent = basicProperties.IsAppIdPresent();
ClusterIdPresent = basicProperties.IsClusterIdPresent();
ContentType = basicProperties.ContentType;
ContentEncoding = basicProperties.ContentEncoding;
DeliveryMode = basicProperties.DeliveryMode;
Priority = basicProperties.Priority;
CorrelationId = basicProperties.CorrelationId;
ReplyTo = basicProperties.ReplyTo;
Expiration = basicProperties.Expiration;
MessageId = basicProperties.MessageId;
Timestamp = basicProperties.Timestamp.UnixTime;
Type = basicProperties.Type;
UserId = basicProperties.UserId;
AppId = basicProperties.AppId;
ClusterId = basicProperties.ClusterId;
if(basicProperties.IsHeadersPresent())
{
foreach (DictionaryEntry header in basicProperties.Headers)
{
Headers.Add(header.Key, header.Value);
}
}
}
示例3: CopyFrom
internal void CopyFrom(IBasicProperties from)
{
if (from == null)
throw new ArgumentNullException(nameof(from));
if (from.IsAppIdPresent()) AppId = from.AppId;
if (from.IsClusterIdPresent()) ClusterId = from.ClusterId;
if (from.IsContentEncodingPresent()) ContentEncoding = from.ContentEncoding;
if (from.IsContentTypePresent()) ContentType = from.ContentType;
if (from.IsCorrelationIdPresent()) CorrelationId = from.CorrelationId;
if (from.IsDeliveryModePresent()) DeliveryMode = (LinkMessageDeliveryMode) from.DeliveryMode;
if (from.IsReplyToPresent()) ReplyTo = from.ReplyTo;
if (from.IsExpirationPresent()) Expiration = TimeSpan.FromMilliseconds(int.Parse(from.Expiration));
if (from.IsMessageIdPresent()) MessageId = from.MessageId;
if (from.IsTimestampPresent()) TimeStamp = from.Timestamp.UnixTime;
if (from.IsTypePresent()) Type = from.Type;
if (from.IsUserIdPresent()) UserId = from.UserId;
if (from.IsPriorityPresent()) Priority = from.Priority;
if (from.IsHeadersPresent())
{
foreach (var header in from.Headers)
{
Headers[header.Key] = header.Value;
}
}
}