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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? multidictionarybase.cs

?? C#寫的類似于STL的集合類,首先是C#編寫,可以用于.net變程.
?? CS
?? 第 1 頁 / 共 3 頁
字號:
            int count = 0;
            IEnumerator<TValue> enumValues;

            if (TryEnumerateValuesForKey(key, out enumValues)) {
                using (enumValues) {
                    while (enumValues.MoveNext())
                        count += 1;
                }
            }

            return count;
        }

        /// <summary>
        /// Gets a total count of values in the collection. This default implementation
        /// is slow; it enumerates all of the keys in the dictionary and calls CountValues on each.
        /// A derived class may be able to supply a more efficient implementation.
        /// </summary>
        /// <returns>The total number of values associated with all keys in the dictionary.</returns>
        protected virtual int CountAllValues()
        {
            int count = 0;

            using (IEnumerator<TKey> enumKeys = EnumerateKeys()) {
                while (enumKeys.MoveNext()) {
                    TKey key = enumKeys.Current;
                    count += CountValues(key);
                }
            }

            return count;
        }

        /// <summary>
        /// Gets a read-only collection all the keys in this dictionary.
        /// </summary>
        /// <value>An readonly ICollection&lt;TKey&gt; of all the keys in this dictionary.</value>
        public virtual ICollection<TKey> Keys
        {
            get { return new KeysCollection(this); }
        }

        /// <summary>
        /// Gets a read-only collection of all the values in the dictionary. 
        /// </summary>
        /// <returns>A read-only ICollection&lt;TValue&gt; of all the values in the dictionary.</returns>
        public virtual ICollection<TValue> Values
        {
            get { return new ValuesCollection(this); }
        }

        /// <summary>
        /// Gets a read-only collection of all the value collections in the dictionary. 
        /// </summary>
        /// <returns>A read-only ICollection&lt;IEnumerable&lt;TValue&gt;&gt; of all the values in the dictionary.</returns>
        ICollection<ICollection<TValue>> IDictionary<TKey, ICollection<TValue>>.Values
        {
            get { return new EnumerableValuesCollection(this); }
        }

        /// <summary>
        /// Gets a read-only collection of all key-value pairs in the dictionary. If a key has multiple
        /// values associated with it, then a key-value pair is present for each value associated
        /// with the key.
        /// </summary>
        public virtual ICollection<KeyValuePair<TKey, TValue>> KeyValuePairs
        {
            get { return new KeyValuePairsCollection(this); }
        }

        /// <summary>
        /// Returns a collection of all of the values in the dictionary associated with <paramref name="key"/>,
        /// or changes the set of values associated with <paramref name="key"/>.
        /// If the key is not present in the dictionary, an ICollection enumerating no
        /// values is returned. The returned collection of values is read-write, and can be used to 
        /// modify the collection of values associated with the key.
        /// </summary>
        /// <param name="key">The key to get the values associated with.</param>
        /// <value>An ICollection&lt;TValue&gt; with all the values associated with <paramref name="key"/>.</value>
        public virtual ICollection<TValue> this[TKey key]
        {
            get
            {
                return new ValuesForKeyCollection(this, key);
            }
            set 
            {
                ReplaceMany(key, value);
            }
        }

        /// <summary>
        /// Gets a collection of all the values in the dictionary associated with <paramref name="key"/>,
        /// or changes the set of values associated with <paramref name="key"/>.
        /// If the key is not present in the dictionary, a KeyNotFound exception is thrown.
        /// </summary>
        /// <param name="key">The key to get the values associated with.</param>
        /// <value>An IEnumerable&lt;TValue&gt; that enumerates all the values associated with <paramref name="key"/>.</value>
        /// <exception cref="KeyNotFoundException">The given key is not present in the dictionary.</exception>
        ICollection<TValue> IDictionary<TKey, ICollection<TValue>>.this[TKey key] 
        {
            get
            {
                if (ContainsKey(key))
                    return new ValuesForKeyCollection(this, key);
                else
                    throw new KeyNotFoundException(Strings.KeyNotFound);
            }
            set
            {
                ReplaceMany(key, value);
            }
        }

        /// <summary>
        /// Replaces all values associated with <paramref name="key"/> with the single value <paramref name="value"/>.
        /// </summary>
        /// <remarks>This implementation simply calls Remove, followed by Add.</remarks>
        /// <param name="key">The key to associate with.</param>
        /// <param name="value">The new values to be associated with <paramref name="key"/>.</param>
        /// <returns>Returns true if some values were removed. Returns false if <paramref name="key"/> was not
        /// present in the dictionary before Replace was called.</returns>
        public virtual bool Replace(TKey key, TValue value)
        {
            bool removed = Remove(key);
            Add(key, value);
            return removed;
        }

        /// <summary>
        /// Replaces all values associated with <paramref name="key"/> with a new collection
        /// of values. If the collection does not permit duplicate values, and <paramref name="values"/> has duplicate
        /// items, then only the last of duplicates is added.
        /// </summary>
        /// <param name="key">The key to associate with.</param>
        /// <param name="values">The new values to be associated with <paramref name="key"/>.</param>
        /// <returns>Returns true if some values were removed. Returns false if <paramref name="key"/> was not
        /// present in the dictionary before Replace was called.</returns>
        public bool ReplaceMany(TKey key, IEnumerable<TValue> values)
        {
            bool removed = Remove(key);
            AddMany(key, values);
            return removed;
        }

        /// <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, ICollection<TValue>> pair in this) {
                if (!firstItem)
                    builder.Append(", ");

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

                builder.Append("->");

                // Put all values in a parenthesized list.
                builder.Append('(');

                bool firstValue = true;
                foreach (TValue val in pair.Value) {
                    if (!firstValue)
                        builder.Append(",");

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

                    firstValue = false;
                }

                builder.Append(')');

                firstItem = false;
            }

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

        /// <summary>
        /// Display the contents of the dictionary in the debugger. This is intentionally private, it is called
        /// only from the debugger due to the presence of the DebuggerDisplay attribute. It is similar
        /// format to ToString(), but is limited to 250-300 characters or so, so as not to overload the debugger.
        /// </summary>
        /// <returns>The string representation of the items in the collection, similar in format to ToString().</returns>
        new internal string DebuggerDisplayString()
        {
            const int MAXLENGTH = 250;

            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, ICollection<TValue>> pair in this) {
                if (builder.Length >= MAXLENGTH) {
                    builder.Append(", ...");
                    break;
                }

                if (!firstItem)
                    builder.Append(", ");

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

                builder.Append("->");

                // Put all values in a parenthesized list.
                builder.Append('(');

                bool firstValue = true;
                foreach (TValue val in pair.Value) {
                    if (!firstValue)
                        builder.Append(",");

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

                    firstValue = false;
                }

                builder.Append(')');

                firstItem = false;
            }

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

        /// <summary>
        /// Enumerate all the keys in the dictionary, and for each key, the collection of values for that key.
        /// </summary>
        /// <returns>An enumerator to enumerate all the key, ICollection&lt;value&gt; pairs in the dictionary.</returns>
        public override IEnumerator<KeyValuePair<TKey, ICollection<TValue>>> GetEnumerator()
        {
            using (IEnumerator<TKey> enumKeys = EnumerateKeys()) {
                while (enumKeys.MoveNext()) {
                    TKey key = enumKeys.Current;
                    yield return new KeyValuePair<TKey, ICollection<TValue>>(key, new ValuesForKeyCollection(this, key));
                }
            }
        }

        #region Keys and Values collections

        /// <summary>
        /// A private class that provides the ICollection&lt;TValue&gt; for a particular key. This is the collection
        /// that is returned from the indexer. The collections is read-write, live, and can be used to add, remove,
        /// etc. values from the multi-dictionary.
        /// </summary>
        [Serializable]
        private sealed class ValuesForKeyCollection : CollectionBase<TValue>
        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一二三区| 欧美国产禁国产网站cc| 亚洲午夜久久久久久久久电影网| 精品综合免费视频观看| 在线观看欧美黄色| 国产精品久久三区| 国产成人免费网站| 国产日韩欧美一区二区三区综合| 国产一区二区三区| 2023国产一二三区日本精品2022| 国产一区三区三区| 国产欧美日韩另类视频免费观看| 国产精品99久久久久久久女警 | 日韩免费观看2025年上映的电影 | 欧美一卡2卡3卡4卡| 日韩黄色一级片| 欧美区一区二区三区| 欧美日韩第一区日日骚| 亚洲一二三区视频在线观看| 欧美四级电影在线观看| 亚洲久草在线视频| 91精品国产乱码| 久久国产精品第一页| 国产亚洲精品aa午夜观看| 91色九色蝌蚪| 亚洲高清免费在线| 精品久久久久久久久久久久久久久 | 日产欧产美韩系列久久99| 日韩美女一区二区三区四区| 精品综合免费视频观看| 国产精品久久夜| 欧美亚洲一区二区在线| 综合av第一页| 欧美老肥妇做.爰bbww| 国产福利一区在线观看| 亚洲美女免费在线| 69成人精品免费视频| 成人av电影在线| 亚洲国产美国国产综合一区二区| 欧美大片免费久久精品三p | 99国产精品久久久久久久久久久| 又紧又大又爽精品一区二区| 911国产精品| 99re成人在线| 久久精品国内一区二区三区| 欧美国产精品v| 欧美在线看片a免费观看| 国内精品伊人久久久久av影院| 国产欧美久久久精品影院| 色综合视频在线观看| 国产一区二区0| 奇米影视一区二区三区小说| jvid福利写真一区二区三区| 亚洲午夜久久久久久久久电影网 | 日韩成人免费在线| 久久一夜天堂av一区二区三区 | 久久91精品国产91久久小草| 亚洲人成影院在线观看| 久久久国产一区二区三区四区小说| 91麻豆国产香蕉久久精品| 韩国女主播一区二区三区| 亚洲乱码日产精品bd| 欧美国产亚洲另类动漫| 日韩精品一区二区三区视频| 色噜噜狠狠成人网p站| 日本美女一区二区三区视频| 一区二区在线观看免费视频播放| 久久亚洲一级片| 91精品久久久久久蜜臀| 国产98色在线|日韩| 狠狠色狠狠色合久久伊人| 婷婷国产在线综合| 亚洲欧美日韩国产综合| 中文字幕在线观看不卡| 精品国内片67194| 91麻豆精品国产91久久久使用方法 | 国产一区二区中文字幕| 日韩成人免费在线| 夜夜精品视频一区二区| 最新国产精品久久精品| 久久免费的精品国产v∧| 欧美一区二区三区免费视频| 色呦呦日韩精品| 在线免费精品视频| 色综合久久精品| 92国产精品观看| www.欧美色图| 久久精品999| 亚洲天堂免费看| 国产午夜久久久久| 国产精品私人自拍| 国产精品三级av在线播放| 26uuu久久综合| www激情久久| 久久久激情视频| 国产欧美一区二区三区在线看蜜臀| 久久综合五月天婷婷伊人| 日韩视频在线一区二区| 日韩欧美激情在线| 欧洲精品中文字幕| 欧美性受极品xxxx喷水| 欧洲精品一区二区三区在线观看| 欧美性受xxxx黑人xyx| 99久久免费精品| 国产麻豆日韩欧美久久| 国产v综合v亚洲欧| 波波电影院一区二区三区| 成人蜜臀av电影| 91黄色激情网站| 欧美亚洲免费在线一区| 成人激情小说乱人伦| 国产精品夜夜爽| 波多野结衣在线一区| 成人av在线一区二区| 97久久精品人人澡人人爽| 懂色av一区二区夜夜嗨| 99re在线视频这里只有精品| 欧洲日韩一区二区三区| 欧美一区二区久久| 国产三区在线成人av| 精品国产成人系列| 国产精品麻豆视频| 亚洲国产成人高清精品| 毛片av中文字幕一区二区| 国产黄人亚洲片| 91福利视频在线| 91麻豆国产香蕉久久精品| 91免费版pro下载短视频| 欧美日韩高清在线| 国产欧美日韩三级| 亚洲女与黑人做爰| 日产国产高清一区二区三区| 精品亚洲成a人在线观看| 成人动漫一区二区在线| 色婷婷综合久久久久中文| 免费精品视频在线| 亚洲成人自拍偷拍| 国产精品羞羞答答xxdd| 在线视频你懂得一区| 久久女同性恋中文字幕| 欧美亚洲禁片免费| 欧美国产精品v| 亚洲福中文字幕伊人影院| 狠狠色丁香婷婷综合| 日本精品裸体写真集在线观看| 91精品国产综合久久久久久久久久| 日韩免费福利电影在线观看| 国产精品婷婷午夜在线观看| 日韩国产在线观看一区| 成人不卡免费av| 欧美大片在线观看| 亚洲国产你懂的| 粉嫩av一区二区三区在线播放| 69p69国产精品| 亚洲综合无码一区二区| 国产99一区视频免费| 欧美一区二区网站| 国产目拍亚洲精品99久久精品| 亚洲高清视频中文字幕| 国产精品自拍三区| 69久久99精品久久久久婷婷| 亚洲视频1区2区| 日韩精品91亚洲二区在线观看| 欧美主播一区二区三区| 国产精品久久看| 国产剧情一区在线| 日韩精品一区二| 日韩电影在线一区| 欧美一区二区三区在线视频| 亚洲高清免费在线| 色av一区二区| 亚洲免费大片在线观看| 国产成人aaa| 国产精品久久久久久久久久久免费看| 国产成人福利片| 久久亚洲综合av| 国产精品1区2区| 日韩欧美国产综合在线一区二区三区| 日韩精品1区2区3区| 日本久久精品电影| 亚洲狠狠丁香婷婷综合久久久| 91丨九色porny丨蝌蚪| 欧美激情艳妇裸体舞| 国产白丝精品91爽爽久久| 欧美zozozo| 韩国欧美国产一区| www精品美女久久久tv| 国产精品一区二区三区乱码| 在线精品视频免费播放| 一区二区三区成人| 欧美综合天天夜夜久久| 亚洲一区在线免费观看| 99riav久久精品riav| 26uuu欧美| 成人听书哪个软件好| 国产精品免费视频观看| 色综合久久综合网97色综合 | 欧美日韩综合不卡| 亚洲福利一二三区| 精品国产百合女同互慰|