示例#1
0
        public Topic GetOrAdd(string key, Func <string, Topic> factory)
        {
            if (PrefixHelper.HasGroupPrefix(key))
            {
                return(_groupTopics.GetOrAdd(key, factory));
            }

            return(_topics.GetOrAdd(key, factory));
        }
示例#2
0
        public bool TryGetValue(string key, out Topic topic)
        {
            if (PrefixHelper.HasGroupPrefix(key))
            {
                return(_groupTopics.TryGetValue(key, out topic));
            }

            return(_topics.TryGetValue(key, out topic));
        }
示例#3
0
        public bool ContainsKey(string key)
        {
            if (PrefixHelper.HasGroupPrefix(key))
            {
                return(_groupTopics.ContainsKey(key));
            }

            return(_topics.ContainsKey(key));
        }
示例#4
0
        public bool TryRemove(string key)
        {
            Topic topic;

            if (PrefixHelper.HasGroupPrefix(key))
            {
                return(_groupTopics.TryRemove(key, out topic));
            }

            return(_topics.TryRemove(key, out topic));
        }