A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.IOptionMonad-2.html below:

Interface IOptionMonad<T, TSelf> | .NEXT

Interface IOptionMonad<T, TSelf>

Represents the common interface for all option monads.

Namespace: DotNext Assembly: DotNext.dll Syntax
public interface IOptionMonad<T, TSelf> : IOptionMonad<T>, ISupplier<object?>, IFunctional<Func<object?>> where TSelf : struct, IOptionMonad<T, TSelf>
Type Parameters Name Description T

The type of the value in the container.

TSelf

The implementing type.

Operators | Edit this page View Source operator |(in TSelf, T?)

Returns the value if present; otherwise return default value.

Declaration
public static T? operator |(in TSelf container, T? defaultValue)
Parameters Type Name Description TSelf container

The container to check.

T defaultValue

The value to be returned if there is no value present.

Returns Type Description T

The value, if present, otherwise defaultValue.

| Edit this page View Source operator |(in TSelf, in TSelf)

Returns non-empty container.

Declaration
public static TSelf operator |(in TSelf x, in TSelf y)
Parameters Type Name Description TSelf x

The first container.

TSelf y

The second container.

Returns Type Description TSelf

The first non-empty container.

| Edit this page View Source explicit operator T(in TSelf)

Attempts to extract the value from the container.

Declaration
public static abstract explicit operator T(in TSelf container)
Parameters Type Name Description TSelf container

The container.

Returns Type Description T

The extracted value.

| Edit this page View Source operator false(in TSelf)

Checks whether the container has no value.

Declaration
public static bool operator false(in TSelf container)
Parameters Type Name Description TSelf container

The container to check.

Returns Type Description bool

true if this container has no value; otherwise, false.

| Edit this page View Source implicit operator TSelf(T)

Places the value to the container.

Declaration
public static abstract implicit operator TSelf(T value)
Parameters Type Name Description T value

The value to be placed into the container.

Returns Type Description TSelf

The constructed monad.

| Edit this page View Source operator !(in TSelf)

Checks whether the container has no value.

Declaration
public static bool operator !(in TSelf container)
Parameters Type Name Description TSelf container

The container to check.

Returns Type Description bool

true if this container has no value; otherwise, false.

| Edit this page View Source operator true(in TSelf)

Checks whether the container has value.

Declaration
public static bool operator true(in TSelf container)
Parameters Type Name Description TSelf container

The container to check.

Returns Type Description bool

true if this container has value; otherwise, false.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4