Exemple #1
0
 /// <summary>
 /// Gets the key for item.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <returns>The key for the specified association.</returns>
 protected TKey GetKeyForItem(Association <TKey, TValue> item)
 {
     return(item.Key);
 }
Exemple #2
0
 void IList <Association <TKey, TValue> > .Insert(int index, Association <TKey, TValue> item)
 {
     throw new NotSupportedException();
 }
Exemple #3
0
 /// <inheritdoc />
 /// <example>
 /// <code source="..\..\Source\Examples\ExampleLibraryCSharp\DataStructures\General\SortedListExamples.cs" region="IndexOf" lang="cs" title="The following example shows how to use the IndexOf method."/>
 /// <code source="..\..\Source\Examples\ExampleLibraryVB\DataStructures\General\SortedListExamples.vb" region="IndexOf" lang="vbnet" title="The following example shows how to use the IndexOf method."/>
 /// </example>
 public int IndexOf(Association <TKey, TValue> item)
 {
     return(data.BinarySearch(item, comparerToUse));
 }
Exemple #4
0
 /// <inheritdoc />
 /// <example>
 /// <code source="..\..\Source\Examples\ExampleLibraryCSharp\DataStructures\General\SortedListExamples.cs" region="Contains" lang="cs" title="The following example shows how to use the Contains method."/>
 /// <code source="..\..\Source\Examples\ExampleLibraryVB\DataStructures\General\SortedListExamples.vb" region="Contains" lang="vbnet" title="The following example shows how to use the Contains method."/>
 /// </example>
 public bool Contains(Association <TKey, TValue> item)
 {
     return(data.Contains(item));
 }
Exemple #5
0
 /// <inheritdoc />
 public bool Remove(Association <TKey, TValue> item)
 {
     return(data.Remove(item));
 }
Exemple #6
0
 /// <inheritdoc />
 /// <example>
 /// <code source="..\..\Source\Examples\ExampleLibraryCSharp\DataStructures\General\SortedListExamples.cs" region="Add" lang="cs" title="The following example shows how to use the Add method."/>
 /// <code source="..\..\Source\Examples\ExampleLibraryVB\DataStructures\General\SortedListExamples.vb" region="Add" lang="vbnet" title="The following example shows how to use the Add method."/>
 /// </example>
 public void Add(Association <TKey, TValue> item)
 {
     AddSetItem(item);
 }