mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 02:25:41 +00:00
Document ArgumentNullException (#15)
This commit is contained in:
parent
e757ce08a0
commit
49e5482b8f
@ -1,4 +1,4 @@
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Web;
|
||||
|
||||
namespace X10D.Collections;
|
||||
@ -180,6 +180,7 @@ public static class DictionaryExtensions
|
||||
/// <typeparam name="TValue">The type of the value element of the key/value pair.</typeparam>
|
||||
/// <param name="source">The source dictionary.</param>
|
||||
/// <returns>A <see cref="string" /> representing the dictionary as a key=value set, concatenated with <c>;</c>.</returns>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
|
||||
[Pure]
|
||||
public static string ToConnectionString<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source)
|
||||
{
|
||||
@ -217,6 +218,11 @@ public static class DictionaryExtensions
|
||||
/// A transform function to apply to the <see cref="KeyValuePair{TKey,TValue}.Value" /> of each element.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="string" /> representing the dictionary as a key=value set, concatenated with <c>;</c>.</returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <para><paramref name="source" /> is <see langword="null" />.</para>
|
||||
/// -or-
|
||||
/// <para><paramref name="selector" /> is <see langword="null" />.</para>
|
||||
/// </exception>
|
||||
[Pure]
|
||||
public static string ToConnectionString<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source,
|
||||
Func<TValue, string?> selector)
|
||||
@ -263,6 +269,13 @@ public static class DictionaryExtensions
|
||||
/// A transform function to apply to the <see cref="KeyValuePair{TKey,TValue}.Value" /> of each element.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="string" /> representing the dictionary as a key=value set, concatenated with <c>;</c>.</returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <para><paramref name="source" /> is <see langword="null" />.</para>
|
||||
/// -or-
|
||||
/// <para><paramref name="keySelector" /> is <see langword="null" />.</para>
|
||||
/// -or-
|
||||
/// <para><paramref name="valueSelector" /> is <see langword="null" />.</para>
|
||||
/// </exception>
|
||||
[Pure]
|
||||
public static string ToConnectionString<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source,
|
||||
Func<TKey, string> keySelector, Func<TValue, string?> valueSelector)
|
||||
@ -308,6 +321,7 @@ public static class DictionaryExtensions
|
||||
/// <typeparam name="TValue">The type of the value element of the key/value pair.</typeparam>
|
||||
/// <param name="source">The source dictionary.</param>
|
||||
/// <returns>A <see cref="string" /> representing the dictionary as a key=value set, concatenated with <c>&</c>.</returns>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
|
||||
[Pure]
|
||||
public static string ToGetParameters<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source)
|
||||
where TKey : notnull
|
||||
@ -337,6 +351,11 @@ public static class DictionaryExtensions
|
||||
/// A transform function to apply to the <see cref="KeyValuePair{TKey,TValue}.Value" /> of each element.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="string" /> representing the dictionary as a key=value set, concatenated with <c>&</c>.</returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <para><paramref name="source" /> is <see langword="null" />.</para>
|
||||
/// -or-
|
||||
/// <para><paramref name="selector" /> is <see langword="null" />.</para>
|
||||
/// </exception>
|
||||
[Pure]
|
||||
public static string ToGetParameters<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source,
|
||||
Func<TValue, string?> selector)
|
||||
@ -376,6 +395,13 @@ public static class DictionaryExtensions
|
||||
/// A transform function to apply to the <see cref="KeyValuePair{TKey,TValue}.Value" /> of each element.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="string" /> representing the dictionary as a key=value set, concatenated with <c>&</c>.</returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <para><paramref name="source" /> is <see langword="null" />.</para>
|
||||
/// -or-
|
||||
/// <para><paramref name="keySelector" /> is <see langword="null" />.</para>
|
||||
/// -or-
|
||||
/// <para><paramref name="valueSelector" /> is <see langword="null" />.</para>
|
||||
/// </exception>
|
||||
[Pure]
|
||||
public static string ToGetParameters<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source,
|
||||
Func<TKey, string> keySelector, Func<TValue, string?> valueSelector)
|
||||
|
Loading…
Reference in New Issue
Block a user