C# Class Nitra.VisualStudio.ErrorHelper

A helper class for checking arguments.
Afficher le fichier Open project: rsdn/nitra Class Usage Examples

Méthodes publiques

Méthode Description
Failed ( int hr ) : bool
Succeeded ( int hr ) : bool
ThrowIfFalse ( bool condition, string paramName ) : void
ThrowIfPathNullOrEmpty ( string filePath, string paramName ) : void
ThrowIsNull ( object value, string paramName ) : void

Throws ArgumentNullException when value is null.

ThrowIsNull ( object value, string paramName, string message ) : void

Throws ArgumentNullException when value is null.

ThrowIsNullOrEmpty ( string value, string paramName ) : void

Throws ArgumentException when string value is null or empty.

ThrowIsNullOrEmpty ( string value, string paramName, string message ) : void

Throws ArgumentException when string value is null or empty.

ThrowIsNullOrInvalidType ( Type value, Type validType, string paramName ) : void

Throws ArgumentException when value is null or value isn't validType.

ThrowIsNullOrInvalidType ( object value, Type validType, string paramName ) : void

Throws ArgumentException when value is null or value isn't validType.

ThrowOnFailure ( int hr ) : int

Method Details

Failed() public static méthode

public static Failed ( int hr ) : bool
hr int
Résultat bool

Succeeded() public static méthode

public static Succeeded ( int hr ) : bool
hr int
Résultat bool

ThrowIfFalse() public static méthode

public static ThrowIfFalse ( bool condition, string paramName ) : void
condition bool
paramName string
Résultat void

ThrowIfPathNullOrEmpty() public static méthode

public static ThrowIfPathNullOrEmpty ( string filePath, string paramName ) : void
filePath string
paramName string
Résultat void

ThrowIsNull() public static méthode

Throws ArgumentNullException when value is null.
public static ThrowIsNull ( object value, string paramName ) : void
value object test object.
paramName string parameter name for ArgumentNullException.
Résultat void

ThrowIsNull() public static méthode

Throws ArgumentNullException when value is null.
public static ThrowIsNull ( object value, string paramName, string message ) : void
value object test object.
paramName string parameter name for ArgumentNullException.
message string text message for ArgumentNullException.
Résultat void

ThrowIsNullOrEmpty() public static méthode

Throws ArgumentException when string value is null or empty.
public static ThrowIsNullOrEmpty ( string value, string paramName ) : void
value string string value.
paramName string parameter name for ArgumentException.
Résultat void

ThrowIsNullOrEmpty() public static méthode

Throws ArgumentException when string value is null or empty.
public static ThrowIsNullOrEmpty ( string value, string paramName, string message ) : void
value string string value.
paramName string parameter name for ArgumentException.
message string Message.
Résultat void

ThrowIsNullOrInvalidType() public static méthode

Throws ArgumentException when value is null or value isn't validType.
public static ThrowIsNullOrInvalidType ( Type value, Type validType, string paramName ) : void
value System.Type The value.
validType System.Type valid type for test object.
paramName string parameter name for ArgumentException.
Résultat void

ThrowIsNullOrInvalidType() public static méthode

Throws ArgumentException when value is null or value isn't validType.
public static ThrowIsNullOrInvalidType ( object value, Type validType, string paramName ) : void
value object test object.
validType System.Type valid type for test object.
paramName string parameter name for ArgumentException.
Résultat void

ThrowOnFailure() public static méthode

public static ThrowOnFailure ( int hr ) : int
hr int
Résultat int