Click or drag to resize

MaybeT Class

Inheritance Hierarchy
SystemObject
  TomsToolbox.CoreMaybeT

Namespace:  TomsToolbox.Core
Assembly:  TomsToolbox.Core (in TomsToolbox.Core.dll) Version: 1.0.64.0 (1.0.64.0)
Syntax
public class Maybe<T>
where T : class

Type Parameters

T

The MaybeT type exposes the following members.

Constructors
  NameDescription
Public methodMaybeT
Initializes a new instance of the MaybeT class.
Top
Methods
  NameDescription
Public methodDo
Executes the specified action if the inner value is not null.
Public methodIf
Checks the condition and returns an empty Maybe if the condition fails.
Public methodReturn(T)
Returns the if the inner value if not null, else returns the default value.
Public methodReturnTTarget(FuncT, TTarget)
Returns the value extracted from the specified selector if the inner value is not null, else returns default(TTarget).
Public methodReturnTTarget(FuncT, TTarget, TTarget)
Returns the value extracted from the specified selector if the inner value is not null, else returns the default value.
Public methodSelectTTarget
Returns a new MaybeT for the target.
Public methodUnless
Checks the condition and returns an empty Maybe if the condition succeeds.
Top
Extension Methods
See Also