public static CreateTopicDescription ( string topicName ) : TopicDescription | ||
topicName | string | |
Результат | TopicDescription |
public static TopicDescription GetTopicDescription(this Uri address) { if (string.Compare("sb", address.Scheme, StringComparison.OrdinalIgnoreCase) != 0) { throw new ArgumentException("The invalid scheme was specified: " + address.Scheme); } var topicPath = address.AbsolutePath.Trim('/'); var topicDescription = Defaults.CreateTopicDescription(topicPath); topicDescription.DefaultMessageTimeToLive = address.GetValueFromQueryString("ttl", topicDescription.DefaultMessageTimeToLive); topicDescription.EnableExpress = address.GetValueFromQueryString("express", topicDescription.EnableExpress); return(topicDescription); }
public static IEnumerable <TopicSubscriptionSettings> GetTopicSubscription(this IMessageNameFormatter messageNameFormatter, Type messageType) { if (!IsSubscriptionMessageType(messageType)) { yield break; } var temporary = IsTemporaryMessageType(messageType); var topicDescription = Defaults.CreateTopicDescription(messageNameFormatter.GetMessageName(messageType).ToString()); topicDescription.EnableExpress = temporary; var binding = new TopicSubscription(topicDescription); yield return(binding); }