Guest User

Untitled

a guest
May 21st, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. namespace System.Collections.Generic
  2. {
  3. /// <summary>
  4. /// Represents a generic collection of keys paired with zero or more values
  5. /// each.
  6. /// </summary>
  7. /// <typeparam name="TKey">The type of the keys in the
  8. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.</typeparam>
  9. /// <typeparam name="TValues">The type of the value list elements in the
  10. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.</typeparam>
  11. public interface IMultiValueDictionary<TKey, TValues> :
  12. IDictionary<TKey, IEnumerable<TValues>>
  13. {
  14. /// <summary>
  15. /// Adds the specified <paramref name="key" /> and
  16. /// <paramref name="value"/> to the
  17. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>. If
  18. /// <paramref name="key"/> already exists in the
  19. /// <see cref="IMultiValueDictionary{TKey,TValues}"/> then
  20. /// <paramref name="value"/> is added to the end of the list of values
  21. /// for <paramref name="key"/>.
  22. /// </summary>
  23. /// <param name="key">The key of the element to add.</param>
  24. /// <param name="value">The value of the element to add. The value can
  25. /// be a null reference (<c>Nothing</c> in Visual Basic).</param>
  26. /// <returns><c>true</c> if <paramref name="key"/> and
  27. /// <paramref name="value"/> are not both already present; otherwise,
  28. /// <c>false</c>. This method returns <c>true</c> if
  29. /// <paramref name="value"/> is added to the
  30. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.</returns>
  31. /// <exception cref="ArgumentNullException"><paramref name="key"/> is a
  32. /// null reference (<c>Nothing</c> in Visual Basic).</exception>
  33. bool AddValue( TKey key, TValues value );
  34.  
  35. /// <summary>
  36. /// Adds the specified <paramref name="key" /> and
  37. /// <paramref name="values"/> to the
  38. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>. If
  39. /// <paramref name="key"/> already exists in the
  40. /// <see cref="IMultiValueDictionary{TKey,TValues}"/> then
  41. /// <paramref name="values"/> are added to the end of the list of values
  42. /// for <paramref name="key"/>.
  43. /// </summary>
  44. /// <param name="key">The key of the element to add.</param>
  45. /// <param name="values">The values of the element to add. The values
  46. /// can be null references (<c>Nothing</c> in Visual Basic).</param>
  47. /// <exception cref="ArgumentNullException"><paramref name="key"/> is a
  48. /// null reference (<c>Nothing</c> in Visual Basic).</exception>
  49. void AddValues( TKey key, IEnumerable<TValues> values );
  50.  
  51. /// <summary>
  52. /// Removes the values with the specified <paramref name="key"/> from
  53. /// the <see cref="IMultiValueDictionary{TKey,TValues}"/>.
  54. /// </summary>
  55. /// <param name="key">The key of the values to remove.</param>
  56. /// <returns><c>true</c> if the values are successfully found and
  57. /// removed; otherwise, <c>false</c>. This method returns <c>false</c>
  58. /// if <paramref name="key"/> is not found in the
  59. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.</returns>
  60. /// <exception cref="ArgumentNullException"><paramref name="key"/> is a
  61. /// null reference (<c>Nothing</c> in Visual Basic).</exception>
  62. bool RemoveKey( TKey key );
  63.  
  64. /// <summary>
  65. /// Removes the values with the specified <paramref name="keys"/> from
  66. /// the <see cref="IMultiValueDictionary{TKey,TValues}"/>.
  67. /// </summary>
  68. /// <param name="keys">The keys of the values to remove.</param>
  69. /// <exception cref="ArgumentNullException"><paramref name="keys"/>
  70. /// is a null reference (<c>Nothing</c> in Visual Basic) or any of its
  71. /// elements are null references.</exception>
  72. void RemoveKeys( IEnumerable<TKey> keys );
  73.  
  74. /// <summary>
  75. /// Removes the specified <param name="value"/> with the specified
  76. /// <paramref name="key"/> from the
  77. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.
  78. /// </summary>
  79. /// <param name="key">The key of the values to remove.</param>
  80. /// <param name="value">The value to remove by
  81. /// <paramref name="key"/>. The value can be a null reference
  82. /// (<c>Nothing</c> in Visual Basic).</param>
  83. /// <returns><c>true</c> if <paramref name="value"/> is successfully
  84. /// found for <paramref name="key"/> and removed; otherwise,
  85. /// <c>false</c>. This method returns <c>false</c> if
  86. /// <paramref name="key"/> is not found in the
  87. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.</returns>
  88. /// <exception cref="ArgumentNullException"><paramref name="key"/> is a
  89. /// null reference (<c>Nothing</c> in Visual Basic).</exception>
  90. bool RemoveValue( TKey key, TValues value );
  91.  
  92. /// <summary>
  93. /// Removes the specified <param name="values"/> with the specified
  94. /// <paramref name="key"/> from the
  95. /// <see cref="IMultiValueDictionary{TKey,TValues}"/>.
  96. /// </summary>
  97. /// <param name="key">The key of the values to remove.</param>
  98. /// <param name="values">The values to remove by
  99. /// <paramref name="key"/>. The values can be null references
  100. /// (<c>Nothing</c> in Visual Basic).</param>
  101. /// <exception cref="ArgumentNullException"><paramref name="key"/> is a
  102. /// null reference (<c>Nothing</c> in Visual Basic).</exception>
  103. void RemoveValues( TKey key, IEnumerable<TValues> values );
  104. }
  105. }
Add Comment
Please, Sign In to add comment