C# Class NFluent.Extensions.ExtensionsCommonHelpers

Common helper methods for the NFluent extension methods.
Afficher le fichier Open project: tpierrain/NFluent

Méthodes publiques

Méthode Description
DoubleCurlyBraces ( this value ) : string

Doubles the curly braces in the string.

GetBaseType ( this type ) : Type

Gets the base type of the given type

Simplify port to .Net Core

ImplementsEquals ( this type ) : bool

Determines whether the specified type implements Equals.

IsNullable ( this type ) : bool

Determines whether the specified type is nullable.

IsNumerical ( Type type ) : bool

Checks if a type is numerical (i.e: int, double, short, uint...)

ToStringProperlyFormated ( this theObject ) : string

Returns a string that represents the current object. If the object is already a string, this method will surround it with brackets.

TypeToStringProperlyFormated ( this type, bool shortName = false ) : string

Returns a string with the type name, as seen in source code.

Private Methods

Méthode Description
TruncateLongString ( string result ) : string

Method Details

DoubleCurlyBraces() public static méthode

Doubles the curly braces in the string.
public static DoubleCurlyBraces ( this value ) : string
value this String to correct.
Résultat string

GetBaseType() public static méthode

Gets the base type of the given type
Simplify port to .Net Core
public static GetBaseType ( this type ) : Type
type this Type
Résultat System.Type

ImplementsEquals() public static méthode

Determines whether the specified type implements Equals.
public static ImplementsEquals ( this type ) : bool
type this The type to be analyzed.
Résultat bool

IsNullable() public static méthode

Determines whether the specified type is nullable.
public static IsNullable ( this type ) : bool
type this /// The type to be evaluated. ///
Résultat bool

IsNumerical() public static méthode

Checks if a type is numerical (i.e: int, double, short, uint...)
public static IsNumerical ( Type type ) : bool
type System.Type
Résultat bool

ToStringProperlyFormated() public static méthode

Returns a string that represents the current object. If the object is already a string, this method will surround it with brackets.
public static ToStringProperlyFormated ( this theObject ) : string
theObject this The theObject.
Résultat string

TypeToStringProperlyFormated() public static méthode

Returns a string with the type name, as seen in source code.
public static TypeToStringProperlyFormated ( this type, bool shortName = false ) : string
type this /// The type to get the name of. ///
shortName bool /// If set to true return the name without namespaces. ///
Résultat string