Skip to content

M_RailwaySharp_ErrorHandling_Trial_Apply__3

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

Trial.Apply(TValue, TSuccess, TMessage) Method

If the wrapped function is a success and the given result is a success the function is applied on the value. Otherwise the exisiting error messages are propagated.

Namespace: RailwaySharp.ErrorHandling
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public static Result<TSuccess, TMessage> Apply<TValue, TSuccess, TMessage>(
	Result<Func<TValue, TSuccess>, TMessage> wrappedFunction,
	Result<TValue, TMessage> result
)

VB

Public Shared Function Apply(Of TValue, TSuccess, TMessage) ( 
	wrappedFunction As Result(Of Func(Of TValue, TSuccess), TMessage),
	result As Result(Of TValue, TMessage)
) As Result(Of TSuccess, TMessage)

C++

public:
generic<typename TValue, typename TSuccess, typename TMessage>
static Result<TSuccess, TMessage>^ Apply(
	Result<Func<TValue, TSuccess>^, TMessage>^ wrappedFunction, 
	Result<TValue, TMessage>^ result
)

F#

static member Apply : 
        wrappedFunction : Result<Func<'TValue, 'TSuccess>, 'TMessage> * 
        result : Result<'TValue, 'TMessage> -> Result<'TSuccess, 'TMessage> 

Parameters

 

wrappedFunction
Type: RailwaySharp.ErrorHandling.Result(Func(TValue, TSuccess), TMessage)
result
Type: RailwaySharp.ErrorHandling.Result(TValue, TMessage)

Type Parameters

 

TValue
TSuccess
TMessage

Return Value

Type: Result(TSuccess, TMessage)

See Also

Reference

Trial Class
RailwaySharp.ErrorHandling Namespace

Clone this wiki locally