Skip to content

Methods_T_CSharpx_Maybe_1

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

Maybe(T) Methods

The Maybe(T) generic type exposes the following members.

Methods

 

Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method MatchJust Matches a value returning true and value itself via output parameter.
Public method MatchNothing Matches an empty value returning true.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method Bind(T1, T2) Invokes a function on this maybe value that itself yields a maybe. (Defined by MaybeExtensions.)
Public Extension Method Do(T) If contans a value executes an Action(T) delegate over it. (Defined by MaybeExtensions.)
Public Extension Method FromJust(T) Extracts the element out of a Just(T) and returns a default value if its argument is Nothing(T). (Defined by MaybeExtensions.)
Public Extension Method FromJustOrFail(T) Extracts the element out of a Just(T) and throws an error if its argument is Nothing(T). (Defined by MaybeExtensions.)
Public Extension Method GetValueOrDefault(T) If contains a values returns it, otherwise returns noneValue. (Defined by MaybeExtensions.)
Private Extension Method IsEmpty (Defined by UnParserExtensions.)
Public Extension Method IsJust(T) Returns true iffits argument is of the form Just(T). (Defined by MaybeExtensions.)
Public Extension Method IsNothing(T) Returns true iffits argument is of the form Nothing(T). (Defined by MaybeExtensions.)
Public Extension Method Map(T1, T2) Transforms this maybe value by using a specified mapping function. (Defined by MaybeExtensions.)
Public Extension Method MapValueOrDefault(T1, T2) If contains a values executes a mapping function over it, otherwise returns noneValue. (Defined by MaybeExtensions.)
Public Extension Method Match(T) Provides pattern matching using Action delegates. (Defined by MaybeExtensions.)
Private Extension Method NormalizeValue (Defined by UnParserExtensions.)
Public Extension Method Select(TSource, TResult) Map operation compatible with Linq. (Defined by MaybeExtensions.)
Public Extension Method SelectMany(TSource, TValue, TResult) Bind operation compatible with Linq. (Defined by MaybeExtensions.)
Public Extension Method ToEnumerable(T) Returns an empty list when given Nothing(T) or a singleton list when given a Just(T). (Defined by MaybeExtensions.)
  Back to Top

See Also

Reference

Maybe(T) Class
CSharpx Namespace

Clone this wiki locally