예제 #1
0
        public Topic GetTopic(string channelName)
        {
            Validate.That(channelName).IsNotNullOrEmpty();

            var topicName = GetTopicName(channelName);
            var topicArn  = amazonSnsFacade.CreateOrRetrieveTopic(topicName);

            if (topics.ContainsKey(channelName))
            {
                return(topics[channelName]);
            }
            var topic = new Topic(topicName, topicArn);

            topics[channelName] = topic;
            return(topic);
        }
        public Topic GetTopic(string channelName)
        {
            channelName.Requires("channelName").IsNotNullOrWhiteSpace();

            var topicName = GetTopicName(channelName);
            var topicArn  = amazonSnsFacade.CreateOrRetrieveTopic(topicName);

            if (topics.ContainsKey(channelName))
            {
                return(topics[channelName]);
            }
            var topic = new Topic(topicName, topicArn);

            topics[channelName] = topic;
            return(topic);
        }