示例#1
0
        public TValue this[TKey key]
        {
            get
            {
                // key could be null
                if (key == null)
                {
                    // ConcurrentDictionary hates null
                    throw new ArgumentNullException(nameof(key));
                }

                return(_wrapped[key]);
            }
            set
            {
                // key could be null
                if (key == null)
                {
                    // ConcurrentDictionary hates null
                    throw new ArgumentNullException(nameof(key));
                }

                _wrapped.Set(key, value);
            }
        }