C# Class Ensure.EnsureStringExtensions

Afficher le fichier Open project: afnpires/Ensure

Méthodes publiques

Méthode Description
EnsureNotNullOrEmpty ( string value, string name = null ) : void

Throws a ArgumentNullException if value is null or empty.

EnsureNotNullOrWhitespace ( string value, string name = null ) : void

Throws a ArgumentNullException if value is null, empty, or whitespace.

Method Details

EnsureNotNullOrEmpty() public static méthode

Throws a ArgumentNullException if value is null or empty.
/// Throws when is null or empty. ///
public static EnsureNotNullOrEmpty ( string value, string name = null ) : void
value string /// The value to be verified. ///
name string /// The name that will be passed as argument of the being thrown. ///
Résultat void

EnsureNotNullOrWhitespace() public static méthode

Throws a ArgumentNullException if value is null, empty, or whitespace.
/// Throws when is null, empty or whitespace. ///
public static EnsureNotNullOrWhitespace ( string value, string name = null ) : void
value string /// The value to be verified. ///
name string /// The name that will be passed as argument of the being thrown. ///
Résultat void