C# Class NFluent.Extensibility.MessageBlock

Class describing a message block.
Afficher le fichier Open project: tpierrain/NFluent Class Usage Examples

Méthodes publiques

Méthode Description
Comparison ( string comparison ) : MessageBlock

Adds a specific comparison message (e.g 'equal to').

GetMessage ( ) : string

Gets the message as a string.

Label ( string newLabel ) : MessageBlock

Specifies a specific attribute for the message.

OfType ( Type forcedType ) : MessageBlock

Requests that a specific type is included in the description block.

Default type is the type of the object instance given in constructor.

ToString ( ) : string

Returns a System.String that represents this instance.

WithEnumerableCount ( long itemsCount ) : MessageBlock

Adds a description of the number of items (only relevant if the object is an enumerable).

WithHashCode ( bool active = true ) : MessageBlock

Requests that the Hash value is included in the description block.

WithType ( bool active = true, bool full = false ) : MessageBlock

Requests that the type is included in the description block.

Private Methods

Méthode Description
FullLabel ( ) : string

The full label.

MessageBlock ( FluentMessage message, Type type, GenericLabelBlock label ) : System

Initializes a new instance of the MessageBlock class.

MessageBlock ( FluentMessage message, object test, GenericLabelBlock block, int index ) : System

Initializes a new instance of the MessageBlock class.

Method Details

Comparison() public méthode

Adds a specific comparison message (e.g 'equal to').
public Comparison ( string comparison ) : MessageBlock
comparison string /// The comparison suffix. ///
Résultat MessageBlock

GetMessage() public méthode

Gets the message as a string.
public GetMessage ( ) : string
Résultat string

Label() public méthode

Specifies a specific attribute for the message.
public Label ( string newLabel ) : MessageBlock
newLabel string /// The new attribute. ///
Résultat MessageBlock

OfType() public méthode

Requests that a specific type is included in the description block.
Default type is the type of the object instance given in constructor.
public OfType ( Type forcedType ) : MessageBlock
forcedType Type /// Type to include in the description. ///
Résultat MessageBlock

ToString() public méthode

Returns a System.String that represents this instance.
public ToString ( ) : string
Résultat string

WithEnumerableCount() public méthode

Adds a description of the number of items (only relevant if the object is an enumerable).
public WithEnumerableCount ( long itemsCount ) : MessageBlock
itemsCount long /// The number of items of the enumerable instance. ///
Résultat MessageBlock

WithHashCode() public méthode

Requests that the Hash value is included in the description block.
public WithHashCode ( bool active = true ) : MessageBlock
active bool /// True to include the type. This is the default value. ///
Résultat MessageBlock

WithType() public méthode

Requests that the type is included in the description block.
public WithType ( bool active = true, bool full = false ) : MessageBlock
active bool /// True to include the type. This is the default value. ///
full bool /// True to display the full type name (with assembly). ///
Résultat MessageBlock