C# Class Cranks.Result.ResultExtensions

显示文件 Open project: crazycrank/Cranks.Result

Public Methods

Method Description
WithFailedMessage ( IResult result, string message ) : IResult

Creates a new IResult with IResult.Message set to message if it is of type Passed.

WithFailedMessage ( IResult result, string message, string orMessage ) : IResult

Creates a new IResult with IResult.Message set to message if it is of type Failed. Otherwise it will be set to orMessage.

Method Details

WithFailedMessage() public static method

Creates a new IResult with IResult.Message set to message if it is of type Passed.
public static WithFailedMessage ( IResult result, string message ) : IResult
result IResult The source object the returned object is based on.
message string The new message of if is true.
return IResult

WithFailedMessage() public static method

Creates a new IResult with IResult.Message set to message if it is of type Failed. Otherwise it will be set to orMessage.
public static WithFailedMessage ( IResult result, string message, string orMessage ) : IResult
result IResult The source object the returned object is based on.
message string The new message of if is of type .
orMessage string The new message of if is of type .
return IResult