Exemple #1
0
 public AddingDistinctItemsToSingleKey()
 {
     dictionary = new Multidictionary <string, string>
     {
         { "teamS", "#1" },
         { "teamS", "rules" },
         { "teamS", "cargo" }
     };
 }
Exemple #2
0
            public MultidictionaryWithItemsRemoved()
            {
                dictionary = new Multidictionary <string, int>();
                dictionary.AddRange("SUnit", new int[] { 50, 100, 150 });
                dictionary.AddRange("hello", new int[] { 7 });
                dictionary.AddRange("TeamS", new int[] { 420, 69 });

                dictionary.Remove("hello", 7);
            }
Exemple #3
0
            /// <summary>
            /// Creates a new <see cref="KeyCollection"/> for the specified <see cref="Multidictionary{TKey, TValue}"/>.
            /// </summary>
            /// <param name="owner">The <see cref="Multidictionary{TKey, TValue}"/> that owns the
            /// newly-created <see cref="KeyCollection"/>.</param>
            internal KeyCollection(Multidictionary <TKey, TValue> owner)
            {
                if (owner is null)
                {
                    throw new ArgumentNullException(nameof(owner));
                }

                this.owner = owner;
            }