Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
        public bool ContainsKey(string key)
        {
            if (PrefixHelper.HasGroupPrefix(key))
            {
                return(_groupTopics.ContainsKey(key));
            }

            return(_topics.ContainsKey(key));
        }
Ejemplo n.º 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));
        }