亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? readonlydictionarybase.cs

?? C#寫(xiě)的類似于STL的集合類,首先是C#編寫(xiě),可以用于.net變程.
?? CS
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
?//******************************
// Written by Peter Golde
// Copyright (c) 2004-2005, Wintellect
//
// Use and restribution of this code is subject to the license agreement 
// contained in the file "License.txt" accompanying this file.
//******************************

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;


namespace Wintellect.PowerCollections
{
    /// <summary>
    /// ReadOnlyDictionaryBase is a base class that can be used to more easily implement the
    /// generic IDictionary&lt;T&gt; and non-generic IDictionary interfaces.
    /// </summary>
    /// <remarks>
    /// <para>To use ReadOnlyDictionaryBase as a base class, the derived class must override
    /// Count, TryGetValue, GetEnumerator. </para>
    /// </remarks>
    /// <typeparam name="TKey">The key type of the dictionary.</typeparam>
    /// <typeparam name="TValue">The value type of the dictionary.</typeparam>
    [Serializable]
    [DebuggerDisplay("{DebuggerDisplayString()}")]
    public abstract class ReadOnlyDictionaryBase<TKey, TValue> : ReadOnlyCollectionBase<KeyValuePair<TKey, TValue>>,
                                                                                                  IDictionary<TKey, TValue>, IDictionary
    {
        /// <summary>
        /// Creates a new DictionaryBase. This must be called from the constructor of the
        /// derived class to specify whether the dictionary is read-only and the name of the
        /// collection.
        /// </summary>
        protected ReadOnlyDictionaryBase()
        {
        }

        /// <summary>
        /// Throws an NotSupportedException stating that this collection cannot be modified.
        /// </summary>
        private void MethodModifiesCollection()
        {
            throw new NotSupportedException(string.Format(Strings.CannotModifyCollection, Util.SimpleClassName(this.GetType())));
        }

        /// <summary>
        /// Adds a new key-value pair to the dictionary. Always throws an exception
        /// indicating that this method is not supported in a read-only dictionary.
        /// </summary>
        /// <param name="key">Key to add.</param>
        /// <param name="value">Value to associated with the key.</param>
        /// <exception cref="NotSupportedException">Always thrown.</exception>
        void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
        {
            MethodModifiesCollection();
        }

        /// <summary>
        /// Removes a key from the dictionary. Always throws an exception
        /// indicating that this method is not supported in a read-only dictionary.
        /// </summary>
        /// <param name="key">Key to remove from the dictionary.</param>
        /// <returns>True if the key was found, false otherwise.</returns>
        /// <exception cref="NotSupportedException">Always thrown.</exception>
        public virtual bool Remove(TKey key)
        {
            MethodModifiesCollection();
            return false;
        }

        /// <summary>
        /// Determines whether a given key is found
        /// in the dictionary.
        /// </summary>
        /// <remarks>The default implementation simply calls TryGetValue and returns
        /// what it returns.</remarks>
        /// <param name="key">Key to look for in the dictionary.</param>
        /// <returns>True if the key is present in the dictionary.</returns>
        public virtual bool ContainsKey(TKey key)
        {
            TValue dummy;
            return TryGetValue(key, out dummy);
        }

        /// <summary>
        /// Determines if this dictionary contains a key equal to <paramref name="key"/>. If so, the value
        /// associated with that key is returned through the value parameter. This method must be overridden 
        /// in the derived class.
        /// </summary>
        /// <param name="key">The key to search for.</param>
        /// <param name="value">Returns the value associated with key, if true was returned.</param>
        /// <returns>True if the dictionary contains key. False if the dictionary does not contain key.</returns>
        public abstract bool TryGetValue(TKey key, out TValue value);

        /// <summary>
        /// The indexer of the dictionary. The set accessor throws an NotSupportedException
        /// stating the dictionary is read-only.
        /// </summary>
        /// <remarks>The get accessor is implemented by calling TryGetValue.</remarks>
        /// <param name="key">Key to find in the dictionary.</param>
        /// <returns>The value associated with the key.</returns>
        /// <exception cref="NotSupportedException">Always thrown from the set accessor, indicating
        /// that the dictionary is read only.</exception>
        /// <exception cref="KeyNotFoundException">Thrown from the get accessor if the key
        /// was not found.</exception>
        public virtual TValue this[TKey key]
        {
            get
            {
                TValue value;
                bool found = TryGetValue(key, out value);
                if (found)
                    return value;
                else
                    throw new KeyNotFoundException(Strings.KeyNotFound);
            }

            set
            {
                MethodModifiesCollection();
            }
        }

        /// <summary>
        /// Shows the string representation of the dictionary. The string representation contains
        /// a list of the mappings in the dictionary.
        /// </summary>
        /// <returns>The string representation of the dictionary.</returns>
        public override string ToString()
        {
            bool firstItem = true;

            System.Text.StringBuilder builder = new System.Text.StringBuilder();

            builder.Append("{");

            // Call ToString on each item and put it in.
            foreach (KeyValuePair<TKey, TValue> pair in this) {
                if (!firstItem)
                    builder.Append(", ");

                if (pair.Key == null)
                    builder.Append("null");
                else
                    builder.Append(pair.Key.ToString());

                builder.Append("->");

                if (pair.Value == null)
                    builder.Append("null");
                else
                    builder.Append(pair.Value.ToString());

                firstItem = false;
            }

            builder.Append("}");
            return builder.ToString();
        }

       #region IDictionary<TKey,TValue> Members

        /// <summary>
        /// Returns a collection of the keys in this dictionary. 
        /// </summary>
        /// <value>A read-only collection of the keys in this dictionary.</value>
        public virtual ICollection<TKey> Keys
        {
            get { return new KeysCollection(this); }
        }

        /// <summary>
        /// Returns a collection of the values in this dictionary. The ordering of 
        /// values in this collection is the same as that in the Keys collection.
        /// </summary>
        /// <value>A read-only collection of the values in this dictionary.</value>
        public virtual ICollection<TValue> Values
        {
            get { return new ValuesCollection(this); }
        }

        #endregion

        #region ICollection<KeyValuePair<TKey,TValue>> Members

        /// <summary>
        /// Determines if a dictionary contains a given KeyValuePair. This implementation checks to see if the
        /// dictionary contains the given key, and if the value associated with the key is equal to (via object.Equals)
        /// the value.
        /// </summary>
        /// <param name="item">A KeyValuePair containing the Key and Value to check for.</param>
        /// <returns></returns>
        public override bool Contains(KeyValuePair<TKey, TValue> item)
        {
            if (this.ContainsKey(item.Key)) {
                return (object.Equals(this[item.Key], item.Value));
            }
            else {
                return false;
            }
        }

        #endregion

        #region IDictionary Members

        /// <summary>
        /// Adds a key-value pair to the collection. Always throws an exception
        /// indicating that this method is not supported in a read-only dictionary.
        /// </summary>
        /// <param name="key">Key to add to the dictionary.</param>
        /// <param name="value">Value to add to the dictionary.</param>
        /// <exception cref="NotSupportedException">Always thrown.</exception>
        void IDictionary.Add(object key, object value)
        {
            MethodModifiesCollection();
        }

        /// <summary>
        /// Clears this dictionary. Always throws an exception
        /// indicating that this method is not supported in a read-only dictionary.
        /// </summary>
        /// <exception cref="NotSupportedException">Always thrown.</exception>
        void IDictionary.Clear()
        {
            MethodModifiesCollection();
        }

        /// <summary>
        /// Determines if this dictionary contains a key equal to <paramref name="key"/>. The dictionary
        /// is not changed. Calls the (overridden) ContainsKey method. If key is not of the correct
        /// TKey for the dictionary, false is returned.
        /// </summary>
        /// <param name="key">The key to search for.</param>
        /// <returns>True if the dictionary contains key. False if the dictionary does not contain key.</returns>
        bool IDictionary.Contains(object key)
        {
            if (key is TKey || key == null)
                return ContainsKey((TKey)key);
            else
                return false;
        }

        /// <summary>
        /// Removes the key (and associated value) from the collection that is equal to the passed in key. Always throws an exception
        /// indicating that this method is not supported in a read-only dictionary.
        /// </summary>
        /// <param name="key">The key to remove.</param>
        /// <exception cref="NotSupportedException">Always thrown.</exception>
        void IDictionary.Remove(object key)
        {
            MethodModifiesCollection();
        }

        /// <summary>
        /// Returns an enumerator that enumerates all the entries in the dictionary. Each entry is 
        /// returned as a DictionaryEntry.
        /// The entries are enumerated in the same orders as the (overridden) GetEnumerator
        /// method.
        /// </summary>
        /// <returns>An enumerator for enumerating all the elements in the OrderedDictionary.</returns>		
        IDictionaryEnumerator IDictionary.GetEnumerator()
        {
            // You can't implement this directly with an iterator, because iterators automatically implement
            // IEnumerator, not IDictionaryEnumerator. We use the helper class DictionaryEnumeratorWrapper.
            return new DictionaryEnumeratorWrapper(this.GetEnumerator());
        }

        /// <summary>
        /// Returns an enumerator that enumerates all the entries in the dictionary. Each entry is 

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本丝袜连裤袜办公室| 国产精品成人免费精品自在线观看 | 亚洲欧美一区二区三区极速播放 | 欧美老人xxxx18| 久久亚洲综合av| 亚洲国产婷婷综合在线精品| 国产福利精品导航| 欧美一区二区视频网站| 1024国产精品| 大尺度一区二区| 日韩精品在线网站| 亚洲成人一二三| 色先锋资源久久综合| 欧美极品少妇xxxxⅹ高跟鞋 | 91色视频在线| 欧美—级在线免费片| 六月丁香综合在线视频| 精品1区2区3区| 一区二区三区中文在线| 成人高清视频在线观看| 国产色综合久久| 国产精品一区久久久久| 日韩一区和二区| 肉色丝袜一区二区| 欧美无砖专区一中文字| 亚洲已满18点击进入久久| 色综合色综合色综合色综合色综合 | 精品处破学生在线二十三| 天堂一区二区在线| 91麻豆精品久久久久蜜臀 | 中文字幕一区二区三区乱码在线| 国产精品1区二区.| 国产日韩精品一区| 国产成人自拍网| 欧美激情一区不卡| 91网站在线观看视频| 亚洲欧美韩国综合色| 欧美性色综合网| 天天综合网天天综合色| 欧美精品成人一区二区三区四区| 日韩一区欧美二区| 欧美成人国产一区二区| 国产伦精品一区二区三区在线观看 | 亚洲一区二区三区在线看| 欧美日韩在线一区二区| 奇米影视在线99精品| 精品国产91久久久久久久妲己 | 激情综合色丁香一区二区| 久久综合视频网| 成人av电影在线观看| 亚洲美女屁股眼交| 欧美精品 国产精品| 久久精品国产成人一区二区三区| 久久人人超碰精品| 不卡电影免费在线播放一区| 一区二区三区四区亚洲| 88在线观看91蜜桃国自产| 国产在线视视频有精品| 国产精品狼人久久影院观看方式| 在线观看一区不卡| 理论片日本一区| 最新日韩av在线| 51精品视频一区二区三区| 国产一区 二区| 一区二区三区欧美日| 日韩一级片在线播放| eeuss影院一区二区三区| 亚洲大片在线观看| 国产午夜精品久久久久久免费视| 91久久精品日日躁夜夜躁欧美| 亚洲成a人片在线观看中文| 久久综合久久综合九色| 色老汉av一区二区三区| 国产一区二区三区免费播放| 亚洲欧美日韩国产手机在线| 欧美mv日韩mv亚洲| 色婷婷av一区二区三区大白胸| 精品一区二区三区欧美| 亚洲精品免费电影| 久久精品男人天堂av| 欧美精品久久一区| 91丨九色丨蝌蚪富婆spa| 国产在线国偷精品免费看| 亚洲一二三四在线观看| 国产精品亲子伦对白| 欧美一二三四在线| 欧美手机在线视频| 粉嫩蜜臀av国产精品网站| 蜜芽一区二区三区| 亚洲成人在线免费| 亚洲欧美欧美一区二区三区| 久久久久久久久久久电影| 欧美伦理视频网站| 欧美自拍偷拍午夜视频| 成人高清免费观看| 国产精品综合二区| 卡一卡二国产精品| 五月婷婷激情综合| 一区二区三区四区激情| 一区精品在线播放| 国产精品美女久久久久aⅴ| 欧美成人高清电影在线| 欧美日韩免费观看一区三区| 色综合久久久久久久久久久| jiyouzz国产精品久久| 国产精品123| 国产精品77777| 激情五月婷婷综合网| 激情另类小说区图片区视频区| 免费观看成人鲁鲁鲁鲁鲁视频| 三级影片在线观看欧美日韩一区二区| 亚洲资源中文字幕| 亚洲最大成人网4388xx| 一区二区三区蜜桃| 亚洲一区二区三区在线看 | 最新高清无码专区| 日韩伦理免费电影| 1000精品久久久久久久久| 亚洲欧洲成人av每日更新| 成人欧美一区二区三区1314| 综合电影一区二区三区 | 7777精品久久久大香线蕉| 欧美群妇大交群中文字幕| 欧美久久久久久蜜桃| 91精品国产综合久久久蜜臀粉嫩| 在线不卡的av| 欧美成人精精品一区二区频| 国产午夜三级一区二区三| 国产精品全国免费观看高清| 亚洲欧美一区二区三区国产精品| 一区二区三区日韩欧美精品| 午夜精品国产更新| 狠狠狠色丁香婷婷综合激情| 国产成人在线免费| 色哟哟欧美精品| 欧美一区二区三区白人| 久久久精品中文字幕麻豆发布| 国产女人水真多18毛片18精品视频| 国产精品美女久久久久久久久久久| 国产精品久久久久9999吃药| 亚洲一区二区在线免费看| 免费高清成人在线| 成人一区在线观看| 欧美丝袜第三区| 久久综合狠狠综合久久综合88| 中文字幕视频一区| 免费在线观看精品| eeuss鲁片一区二区三区在线观看| 欧美亚一区二区| 精品裸体舞一区二区三区| 亚洲欧洲精品天堂一级| 热久久国产精品| 99精品国产99久久久久久白柏 | 欧美日韩二区三区| 久久这里只有精品首页| 亚洲男人的天堂一区二区| 久久精品国产一区二区三区免费看| 高清免费成人av| 69堂精品视频| 亚洲精品一二三| 国产大陆亚洲精品国产| 欧美午夜免费电影| 欧美国产成人精品| 视频一区欧美精品| 91亚洲精品一区二区乱码| 精品国产乱码久久久久久久| 一区二区三区视频在线观看 | 久久精品国产一区二区三区免费看| 99国产精品久久久久久久久久 | 日韩一级黄色大片| 亚洲欧美电影一区二区| 国产精品亚洲а∨天堂免在线| 欧美色中文字幕| 亚洲丝袜美腿综合| 国产91对白在线观看九色| 欧美一级在线观看| 亚洲一区电影777| 91免费在线看| 国产精品妹子av| 国产盗摄视频一区二区三区| 欧美变态tickling挠脚心| 天天操天天色综合| 欧美性色黄大片手机版| 亚洲乱码国产乱码精品精小说| 国产a精品视频| 久久久精品综合| 国内精品免费**视频| 欧美一级黄色大片| 蜜桃久久精品一区二区| 欧美电影在线免费观看| 亚洲444eee在线观看| 91国产免费观看| 一级特黄大欧美久久久| 色94色欧美sute亚洲线路一久| 欧美韩日一区二区三区| 国产成a人亚洲精品| 国产精品卡一卡二卡三| 91视频在线观看| 亚洲自拍都市欧美小说| 欧美日韩在线播放三区四区|