Skip to content

M_RailwaySharp_ErrorHandling_Trial_Lift__3

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

Trial.Lift(TValue, TSuccess, TMessage) Method

Lifts a function into a Result container and applies it on the given result.

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

Syntax

C#

public static Result<TSuccess, TMessage> Lift<TValue, TSuccess, TMessage>(
	Func<TValue, TSuccess> func,
	Result<TValue, TMessage> result
)

VB

Public Shared Function Lift(Of TValue, TSuccess, TMessage) ( 
	func As Func(Of TValue, TSuccess),
	result As Result(Of TValue, TMessage)
) As Result(Of TSuccess, TMessage)

C++

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

F#

static member Lift : 
        func : Func<'TValue, 'TSuccess> * 
        result : Result<'TValue, 'TMessage> -> Result<'TSuccess, 'TMessage> 

Parameters

 

func
Type: System.Func(TValue, TSuccess)
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