mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-15 18:33:06 +00:00
Merge branch 'master' of https://github.com/JKorf/CryptoExchange.Net
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user