C# Class Microsoft.Cci.ExpressionHelper

Class conraining helper routines for Expressions
Mostra file Open project: visualmutator/visualmutator

Public Methods

Method Description
IsFiniteNumeric ( ICompileTimeConstant constExpression ) : bool

Returns true if the given constant expression contains a finite numeric value. In other words, infinities and NaN are excluded.

IsIntegerInRangeOf ( ICompileTimeConstant constExpression, ITypeReference targetType ) : bool

Returns true if the constant is an integral value that falls in the range of the target type. The target type does have to be an integral type. If it is not, this method always returns false.

IsZeroIntPtr ( IExpression expression ) : bool

True if the given expression is a compile time constant with a value that is equal to IntPtr.Zero or UIntPtr.Zero.

Private Methods

Method Description
IsIntegralMinusOne ( ICompileTimeConstant constExpression ) : bool
IsIntegralMinusOne ( IExpression expression ) : bool
IsIntegralNonzero ( ICompileTimeConstant constExpression ) : bool
IsIntegralNonzero ( IExpression expression ) : bool
IsIntegralOne ( ICompileTimeConstant constExpression ) : bool
IsIntegralOne ( IExpression expression ) : bool
IsIntegralZero ( ICompileTimeConstant constExpression ) : bool
IsIntegralZero ( IExpression expression ) : bool
IsNullLiteral ( IExpression expression ) : bool
IsNumericOne ( ICompileTimeConstant constExpression ) : bool
IsNumericZero ( ICompileTimeConstant constExpression ) : bool

Method Details

IsFiniteNumeric() public static method

Returns true if the given constant expression contains a finite numeric value. In other words, infinities and NaN are excluded.
public static IsFiniteNumeric ( ICompileTimeConstant constExpression ) : bool
constExpression ICompileTimeConstant
return bool

IsIntegerInRangeOf() public static method

Returns true if the constant is an integral value that falls in the range of the target type. The target type does have to be an integral type. If it is not, this method always returns false.
public static IsIntegerInRangeOf ( ICompileTimeConstant constExpression, ITypeReference targetType ) : bool
constExpression ICompileTimeConstant
targetType ITypeReference
return bool

IsZeroIntPtr() public static method

True if the given expression is a compile time constant with a value that is equal to IntPtr.Zero or UIntPtr.Zero.
public static IsZeroIntPtr ( IExpression expression ) : bool
expression IExpression
return bool