Пример #1
0
        /// <summary>
        /// Tries to return a value under provided <paramref name="key"/>, if such entry exists.
        /// </summary>
        public bool TryGetValue(TKey key, out BigInteger value)
        {
            if (Underlying.TryGetValue(key, out var counter))
            {
                value = counter.Value;
                return(true);
            }

            value = BigInteger.Zero;
            return(false);
        }
Пример #2
0
        public bool TryGetValue(TKey key, out IImmutableSet<TValue> value)
        {
            ORSet<TValue> set;
            if (_underlying.TryGetValue(key, out set))
            {
                value = set.Elements;
                return true;
            }

            value = null;
            return false;
        }
        public bool TryGetValue(TKey key, out IImmutableSet <TValue> value)
        {
            if (!_withValueDeltas || Underlying.KeySet.Contains(key))
            {
                ORSet <TValue> set;
                if (Underlying.TryGetValue(key, out set))
                {
                    value = set.Elements;
                    return(true);
                }
            }

            value = null;
            return(false);
        }