C# Class RecordPoint.Connectors.SDK.Helpers.ValidationHelper

Provides helpers for validating arguments to methods.
Show file Open project: RecordPoint/RecordPoint.Connectors.SDK

Public Methods

Method Description
ArgumentNotNull ( object argumentValue, string argumentName ) : void

Throws ArgumentNullException if the given argument is null.

ArgumentNotNullOrEmpty ( SecureString argumentValue, string argumentName ) : void

Throws an exception if the tested SecureString argument is null or an empty string.

ArgumentNotNullOrEmpty ( string argumentValue, string argumentName ) : void

Throws an exception if the tested string argument is null or an empty string.

ArgumentNotNullOrWhiteSpace ( string argumentValue, string argumentName ) : void

Throws an exception if the tested string argument is null or a string that contains only whitespace.

Method Details

ArgumentNotNull() public static method

Throws ArgumentNullException if the given argument is null.
The value is null.
public static ArgumentNotNull ( object argumentValue, string argumentName ) : void
argumentValue object The argument value to test.
argumentName string The name of the argument to test.
return void

ArgumentNotNullOrEmpty() public static method

Throws an exception if the tested SecureString argument is null or an empty string.
The string value is null.
public static ArgumentNotNullOrEmpty ( SecureString argumentValue, string argumentName ) : void
argumentValue SecureString The argument value to test.
argumentName string The name of the argument to test.
return void

ArgumentNotNullOrEmpty() public static method

Throws an exception if the tested string argument is null or an empty string.
The string value is null or empty.
public static ArgumentNotNullOrEmpty ( string argumentValue, string argumentName ) : void
argumentValue string The argument value to test.
argumentName string The name of the argument to test.
return void

ArgumentNotNullOrWhiteSpace() public static method

Throws an exception if the tested string argument is null or a string that contains only whitespace.
The string value is null or contains only whitespace.
public static ArgumentNotNullOrWhiteSpace ( string argumentValue, string argumentName ) : void
argumentValue string The argument value to test.
argumentName string The name of the argument to test.
return void