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: src/TrueLayer/Guard.cs
+65-2Lines changed: 65 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
usingSystem;
2
2
usingSystem.Diagnostics;
3
3
usingSystem.Diagnostics.CodeAnalysis;
4
-
usingSystem.Linq;
5
-
usingSystem.Text.RegularExpressions;
4
+
usingTrueLayer.Common;
6
5
7
6
namespaceTrueLayer
8
7
{
@@ -112,5 +111,69 @@ public static T GreaterThan<T>([NotNull] this T value, T greaterThan, string par
112
111
||value.Contains('.'))
113
112
?thrownewArgumentException("Value is malformed",name)
114
113
:value;
114
+
115
+
/// <summary>
116
+
/// Validate that the provided URI one of the configured (from the options) URIs as base address, or one of the TrueLayer ones based on the environment used.
117
+
/// </summary>
118
+
/// <param name="value">The value to validate</param>
119
+
/// <param name="name">The name of the argument</param>
120
+
/// <param name="options">The <see cref="TrueLayerOptions"/> that contain the custom configured URIs</param>
121
+
/// <returns>The value of <paramref name="value"/> if it is valid</returns>
122
+
/// <exception cref="ArgumentException">Thrown when the value is not valid</exception>
0 commit comments