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

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

?? readonlymultidictionarybase.cs

?? C#寫的類似于STL的集合類,首先是C#編寫,可以用于.net變程.
?? CS
?? 第 1 頁 / 共 2 頁
字號:

            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 : ReadOnlyCollectionBase<TValue>
        {
            private ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary;
            private TKey key;

            /// <summary>
            /// Constructor. Initializes this collection.
            /// </summary>
            /// <param name="myDictionary">Dictionary we're using.</param>
            /// <param name="key">The key we're looking at.</param>
            public ValuesForKeyCollection(ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary, TKey key)
            {
                this.myDictionary = myDictionary;
                this.key = key;
            }

            /// <summary>
            /// Get the number of values associated with the key.
            /// </summary>
            public override int Count
            {
                get
                {
                    return myDictionary.CountValues(key);
                }
            }

            /// <summary>
            /// A simple function that returns an IEnumerator&lt;TValue&gt; that
            /// doesn't yield any values. A helper.
            /// </summary>
            /// <returns>An IEnumerator&lt;TValue&gt; that yields no values.</returns>
            private IEnumerator<TValue> NoValues()
            {
                yield break;
            }

            /// <summary>
            /// Enumerate all the values associated with key.
            /// </summary>
            /// <returns>An IEnumerator&lt;TValue&gt; that enumerates all the values associated with key.</returns>
            public override IEnumerator<TValue> GetEnumerator()
            {
                IEnumerator<TValue> values;
                if (myDictionary.TryEnumerateValuesForKey(key, out values))
                    return values;
                else
                    return NoValues();
            }

            /// <summary>
            /// Determines if the given values is associated with key.
            /// </summary>
            /// <param name="item">Value to check for.</param>
            /// <returns>True if value is associated with key, false otherwise.</returns>
            public override bool Contains(TValue item)
            {
                return myDictionary.Contains(key, item);
            }
        }


        /// <summary>
        /// A private class that implements ICollection&lt;TKey&gt; and ICollection for the
        /// Keys collection. The collection is read-only.
        /// </summary>
        [Serializable]
        private sealed class KeysCollection : ReadOnlyCollectionBase<TKey>
        {
            private ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary;

            /// <summary>
            /// Constructor.
            /// </summary>
            /// <param name="myDictionary">The dictionary this is associated with.</param>
            public KeysCollection(ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary)
            {
                this.myDictionary = myDictionary;
            }

            public override int Count
            {
                get { return myDictionary.Count; }
            }

            public override IEnumerator<TKey> GetEnumerator()
            {
                return myDictionary.EnumerateKeys();
            }

            public override bool Contains(TKey key)
            {
                return myDictionary.ContainsKey(key);
            }
        }

        /// <summary>
        /// A private class that implements ICollection&lt;TValue&gt; and ICollection for the
        /// Values collection. The collection is read-only.
        /// </summary>
        [Serializable]
        private sealed class ValuesCollection : ReadOnlyCollectionBase<TValue>
        {
            private ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary;

            public ValuesCollection(ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary)
            {
                this.myDictionary = myDictionary;
            }

            public override int Count
            {
                get { return myDictionary.CountAllValues(); }
            }

            public override IEnumerator<TValue> GetEnumerator()
            {
                using (IEnumerator<TKey> enumKeys = myDictionary.EnumerateKeys()) {
                    while (enumKeys.MoveNext()) {
                        TKey key = enumKeys.Current;
                        IEnumerator<TValue> enumValues;
                        if (myDictionary.TryEnumerateValuesForKey(key, out enumValues)) {
                            using (enumValues) {
                                while (enumValues.MoveNext())
                                    yield return enumValues.Current;
                            }
                        }
                    }
                }
            }

            public override bool Contains(TValue value)
            {
                foreach (TValue v in this) {
                    if (myDictionary.EqualValues(v, value))
                        return true;
                }
                return false;
            }
        }

        /// <summary>
        /// A private class that implements ICollection&lt;IEnumerable&lt;TValue&gt;&gt; and ICollection for the
        /// Values collection on IDictionary. The collection is read-only.
        /// </summary>
        [Serializable]
        private sealed class EnumerableValuesCollection : ReadOnlyCollectionBase<ICollection<TValue>>
        {
            private ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary;

            public EnumerableValuesCollection(ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary)
            {
                this.myDictionary = myDictionary;
            }

            public override int Count
            {
                get { return myDictionary.Count; }
            }

            public override IEnumerator<ICollection<TValue>> GetEnumerator()
            {
                using (IEnumerator<TKey> enumKeys = myDictionary.EnumerateKeys()) {
                    while (enumKeys.MoveNext()) {
                        TKey key = enumKeys.Current;
                        yield return new ValuesForKeyCollection(myDictionary, key);
                    }
                }
            }

            public override bool Contains(ICollection<TValue> values)
            {
                if (values == null)
                    return false;
                TValue[] valueArray = Algorithms.ToArray(values);

                foreach (ICollection<TValue> v in this) {
                    if (v.Count != valueArray.Length)
                        continue;

                    // First check in order for efficiency.
                    if (Algorithms.EqualCollections(v, values, myDictionary.EqualValues))
                        return true;

                    // Now check not in order. We can't use Algorithms.EqualSets, because we don't 
                    // have an IEqualityComparer, just the ability to compare for equality. Unfortunately this is N squared,
                    // but there isn't a good choice here. We don't really expect this method to be used much.
                    bool[] found = new bool[valueArray.Length];
                    foreach (TValue x in v) {
                        for (int i = 0; i < valueArray.Length; ++i) {
                            if (!found[i] && myDictionary.EqualValues(x, valueArray[i])) 
                                found[i] = true;
                        }
                    }

                    if (Array.IndexOf(found, false) < 0)
                        return true;  // every item was found. The sets must be equal.
                }
                return false;
            }
        }

        /// <summary>
        /// A private class that implements ICollection&lt;KeyValuePair&lt;TKey,TValue&gt;&gt; and ICollection for the
        /// KeyValuePairs collection. The collection is read-only.
        /// </summary>
        [Serializable]
        private sealed class KeyValuePairsCollection : ReadOnlyCollectionBase<KeyValuePair<TKey, TValue>>
        {
            private ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary;

            public KeyValuePairsCollection(ReadOnlyMultiDictionaryBase<TKey, TValue> myDictionary)
            {
                this.myDictionary = myDictionary;
            }

            public override int Count
            {
                get { return myDictionary.CountAllValues(); }
            }

            public override IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
            {
                using (IEnumerator<TKey> enumKeys = myDictionary.EnumerateKeys()) {
                    while (enumKeys.MoveNext()) {
                        TKey key = enumKeys.Current;
                        IEnumerator<TValue> enumValues;
                        if (myDictionary.TryEnumerateValuesForKey(key, out enumValues)) {
                            using (enumValues) {
                                while (enumValues.MoveNext())
                                    yield return new KeyValuePair<TKey, TValue>(key, enumValues.Current);
                            }
                        }
                    }
                }
            }

            public override bool Contains(KeyValuePair<TKey, TValue> pair)
            {
                return myDictionary[pair.Key].Contains(pair.Value);
            }
        }

        #endregion



    }

}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级视频在线| 日韩欧美电影在线| 国产一区激情在线| 午夜精品123| 一区二区三区中文字幕在线观看| 国产丝袜欧美中文另类| 欧美mv和日韩mv国产网站| 91麻豆精品91久久久久久清纯| 欧美专区日韩专区| 色婷婷综合久久久中文字幕| 91麻豆自制传媒国产之光| 成人免费的视频| 成人av在线播放网站| proumb性欧美在线观看| 不卡的av网站| 色成人在线视频| 欧美顶级少妇做爰| 日韩欧美电影一二三| 久久久99免费| 亚洲欧洲日韩av| 亚洲va天堂va国产va久| 亚洲成人一区在线| 青青草国产精品亚洲专区无| 国产精品1区2区| 99国产精品久久久久久久久久| 欧美性感一类影片在线播放| 日韩一区二区在线看| 久久久久国产精品麻豆| 综合电影一区二区三区| 亚洲风情在线资源站| 日产精品久久久久久久性色| 国产乱子伦一区二区三区国色天香| 大陆成人av片| 欧美日韩精品高清| 精品少妇一区二区三区日产乱码| 中文字幕av不卡| 视频一区中文字幕| 成人一区二区在线观看| 欧美日韩国产综合一区二区三区| 精品成人一区二区三区四区| 亚洲女人小视频在线观看| 青青草成人在线观看| av在线一区二区| 欧美成人三级电影在线| 综合色天天鬼久久鬼色| 亚洲第一会所有码转帖| 国产一区二区久久| 欧美日韩国产在线播放网站| 国产精品无遮挡| 免费久久99精品国产| 成人涩涩免费视频| 欧美日韩中文一区| 国产精品久久久久久久裸模| 麻豆91在线观看| 欧美色男人天堂| 中文字幕二三区不卡| 午夜精品123| 色呦呦国产精品| 中文字幕第一区二区| 亚洲午夜影视影院在线观看| 99视频一区二区三区| 精品福利二区三区| 日韩精品高清不卡| 91国在线观看| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 精品一区二区精品| 欧美色涩在线第一页| 亚洲少妇中出一区| a亚洲天堂av| 国产精品欧美极品| 国产精品香蕉一区二区三区| 精品国产乱码久久久久久影片| 亚洲成人av福利| 欧美三级视频在线| 亚洲自拍偷拍网站| 91天堂素人约啪| 国产精品国产三级国产普通话三级 | 久久在线免费观看| 亚洲一区二区三区四区在线| 99九九99九九九视频精品| 国产色一区二区| 国产成人在线免费| 久久久久久久一区| 国内精品免费在线观看| 久久欧美中文字幕| 国产精品一品视频| 久久久久国产精品免费免费搜索| 国产成人在线视频免费播放| 欧美国产亚洲另类动漫| 国产制服丝袜一区| 久久久久久久一区| jiyouzz国产精品久久| 中文字幕一区二区三区精华液 | 欧美zozo另类异族| 另类小说综合欧美亚洲| 精品久久国产字幕高潮| 国产成人精品免费| 成人免费小视频| 欧美亚洲免费在线一区| 亚洲福利视频导航| 欧美大白屁股肥臀xxxxxx| 日本视频在线一区| 精品日韩99亚洲| 国产福利一区在线观看| 国产日韩欧美亚洲| jiyouzz国产精品久久| 一区二区三区四区在线免费观看 | 日韩精品一区第一页| 日韩精品一区二区三区中文不卡 | 尤物在线观看一区| 欧美午夜一区二区三区| 手机精品视频在线观看| 国产欧美视频在线观看| 色综合久久久网| 日日夜夜精品视频天天综合网| 久久久精品免费观看| 成人免费看黄yyy456| 一区二区三区国产豹纹内裤在线 | 国产精品911| 亚洲综合在线视频| 日韩免费观看高清完整版在线观看| 国产成人在线电影| 亚洲精品国久久99热| 欧美一区二区三区视频免费| 成人动漫一区二区在线| 婷婷久久综合九色综合伊人色| 国产女主播视频一区二区| 欧美伊人久久久久久午夜久久久久| 国产在线精品免费| 亚洲电影一级片| 国产精品色哟哟网站| 日韩亚洲欧美在线| 91丨porny丨最新| 国内成人免费视频| 亚洲成a人在线观看| 亚洲国产精品成人综合| 日韩三级高清在线| 在线视频中文字幕一区二区| 国产高清精品网站| 日韩国产成人精品| 中文字幕一区三区| 久久精品男人的天堂| 欧美一激情一区二区三区| 欧美亚洲丝袜传媒另类| 国产精品911| 激情文学综合网| 日本少妇一区二区| 亚洲国产一区视频| 亚洲欧美另类小说| 亚洲欧洲国产日韩| www国产亚洲精品久久麻豆| 91精品国产综合久久久蜜臀粉嫩| 欧美影片第一页| 欧美日韩和欧美的一区二区| 在线观看日韩av先锋影音电影院| 99riav久久精品riav| 国产精品99久久久久| 国产精品资源站在线| 国产在线视频精品一区| 狠狠色狠狠色综合系列| 麻豆成人av在线| 国产成人av影院| 成人国产精品免费网站| 粉嫩aⅴ一区二区三区四区五区 | 成人深夜在线观看| 成人小视频免费在线观看| 国产凹凸在线观看一区二区 | 亚洲一区在线播放| 亚洲黄色在线视频| 亚洲高清视频的网址| 亚洲一区在线看| 麻豆久久久久久| 国产乱码精品一区二区三区av| 成人综合婷婷国产精品久久蜜臀| 北条麻妃国产九九精品视频| 91一区二区三区在线观看| 一本到三区不卡视频| 欧美色综合久久| 日韩免费视频线观看| 国产精品区一区二区三区| 亚洲欧美电影一区二区| 日韩中文字幕91| 丁香啪啪综合成人亚洲小说| 欧美图区在线视频| 日韩一二在线观看| 日本一区二区三区四区| 自拍偷拍欧美激情| 日韩精品三区四区| 成人avav在线| 欧美一区二区私人影院日本| 国产色产综合产在线视频| 最新不卡av在线| 黄色日韩网站视频| 91在线视频18| 欧美大片拔萝卜| 亚洲猫色日本管| 国产制服丝袜一区| 欧美做爰猛烈大尺度电影无法无天| 欧美videofree性高清杂交| 亚洲婷婷在线视频|