You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Code/Light.GuardClauses/Check.MustNotContain.cs
+48Lines changed: 48 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
usingSystem;
2
2
usingSystem.Collections.Generic;
3
+
usingSystem.Collections.Immutable;
3
4
usingSystem.Linq;
4
5
usingSystem.Runtime.CompilerServices;
5
6
usingJetBrains.Annotations;
@@ -197,4 +198,51 @@ public static string MustNotContain(
197
198
198
199
returnparameter;
199
200
}
201
+
202
+
/// <summary>
203
+
/// Ensures that the <see cref="ImmutableArray{T}" /> does not contain the specified item, or otherwise throws an <see cref="ExistingItemException" />.
204
+
/// </summary>
205
+
/// <param name="parameter">The <see cref="ImmutableArray{T}" /> to be checked.</param>
206
+
/// <param name="item">The item that must not be part of the <see cref="ImmutableArray{T}" />.</param>
207
+
/// <param name="parameterName">The name of the parameter (optional).</param>
208
+
/// <param name="message">The message that will be passed to the resulting exception (optional).</param>
/// Ensures that the <see cref="ImmutableArray{T}" /> does not contain the specified item, or otherwise throws your custom exception.
228
+
/// </summary>
229
+
/// <param name="parameter">The <see cref="ImmutableArray{T}" /> to be checked.</param>
230
+
/// <param name="item">The item that must not be part of the <see cref="ImmutableArray{T}" />.</param>
231
+
/// <param name="exceptionFactory">The delegate that creates your custom exception. <paramref name="parameter" /> and <paramref name="item" /> are passed to this delegate.</param>
0 commit comments