1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-15 18:33:06 +00:00
This commit is contained in:
Jkorf
2021-04-19 11:07:58 +02:00
3 changed files with 22 additions and 6 deletions
+11
View File
@@ -303,6 +303,17 @@ namespace CryptoExchange.Net
throw new ArgumentException($"No value provided for parameter {argumentName}", argumentName);
}
/// <summary>
/// Validates a string is null or not empty
/// </summary>
/// <param name="value"></param>
/// <param name="argumentName"></param>
public static void ValidateNullOrNotEmpty(this string value, string argumentName)
{
if (value != null && string.IsNullOrEmpty(value))
throw new ArgumentException($"No value provided for parameter {argumentName}", argumentName);
}
/// <summary>
/// Validates an object is not null
/// </summary>