FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

T_RailwaySharp_ErrorHandling_Trial · commandlineparser/commandline Wiki · GitHub

T_RailwaySharp_ErrorHandling_Trial · commandlineparser/commandline Wiki · GitHub
Skip to content

Navigation Menu

T_RailwaySharp_ErrorHandling_Trial

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

Trial Class

Inheritance Hierarchy

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

Syntax

C#

internal static class Trial

VB

Friend NotInheritable Class Trial

C++

internal ref class Trial abstract sealed

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
type Trial =  class end

The Trial type exposes the following members.

Methods

 

Name Description
Apply(TValue, TSuccess, TMessage) 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.
Bind(TValue, TSuccess, TMessage) If the result is a Success it executes the given function on the value. Otherwise the exisiting failure is propagated.
Collect(TSuccess, TMessage) Collects a sequence of Results and accumulates their values. If the sequence contains an error the error will be propagated.
Either(TSuccess, TMessage, TResult) Takes a Result and maps it with successFunc if it is a Success otherwise it maps it with failureFunc.
Fail(TSuccess, TMessage) Wraps a message in a Failure.
Failed(TSuccess, TMessage) Returns true if the result was not successful.
Flatten(TSuccess, TMessage) Flattens a nested result given the Failure types are equal.
Lift(TValue, TSuccess, TMessage) Lifts a function into a Result container and applies it on the given result.
Lift2(TSuccess, TMessage, TSuccess1, TMessage1) Promote a function to a monad/applicative, scanning the monadic/applicative arguments from left to right.
MergeMessages(TSuccess, TMessage) Appends the given messages with the messages in the given result.
Ok(TSuccess, TMessage) Wraps a value in a Success.
Pass(TSuccess, TMessage) Wraps a value in a Success.
ReturnOrFail(TSuccess, TMessage) If the given result is a Success the wrapped value will be returned. Otherwise the function throws an exception with Failure message of the result.
Warn(TSuccess, TMessage) Wraps a value in a Success and adds a message.
  Back to Top

See Also

Reference

RailwaySharp.ErrorHandling Namespace

Wiki pages Pages 1,025

Clone this wiki locally

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL