CreateTopicDescription() public static method

public static CreateTopicDescription ( string topicName ) : TopicDescription
topicName string
return 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);
        }
Esempio n. 2
0
        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);
        }