C# Class NFluent.Extensibility.MessageBlock

Class describing a message block.
显示文件 Open project: tpierrain/NFluent Class Usage Examples

Public Methods

Method 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

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

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

GetMessage() public method

Gets the message as a string.
public GetMessage ( ) : string
return string

Label() public method

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

OfType() public method

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. ///
return MessageBlock

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

WithEnumerableCount() public method

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. ///
return MessageBlock

WithHashCode() public method

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. ///
return MessageBlock

WithType() public method

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). ///
return MessageBlock