C# Class N2.VisualStudio.ErrorHelper

A helper class for checking arguments.
Mostrar archivo Open project: rampelstinskin/ParserGenerator

Public Methods

Method 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 method

public static Failed ( int hr ) : bool
hr int
return bool

Succeeded() public static method

public static Succeeded ( int hr ) : bool
hr int
return bool

ThrowIfFalse() public static method

public static ThrowIfFalse ( bool condition, string paramName ) : void
condition bool
paramName string
return void

ThrowIfPathNullOrEmpty() public static method

public static ThrowIfPathNullOrEmpty ( string filePath, string paramName ) : void
filePath string
paramName string
return void

ThrowIsNull() public static method

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

ThrowIsNull() public static method

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.
return void

ThrowIsNullOrEmpty() public static method

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.
return void

ThrowIsNullOrEmpty() public static method

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.
return void

ThrowIsNullOrInvalidType() public static method

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.
return void

ThrowIsNullOrInvalidType() public static method

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.
return void

ThrowOnFailure() public static method

public static ThrowOnFailure ( int hr ) : int
hr int
return int