Show / Hide Table of Contents

Struct Result<T>.Ok

Represents successful result.

Implements
IResultMonad<T>
IResultMonad<T, Exception>
IOptionMonad<T>
ISupplier<object>
IFunctional
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public readonly struct Result<T>.Ok : IResultMonad<T>, IResultMonad<T, Exception>, IOptionMonad<T>, ISupplier<object?>, IFunctional

Constructors

View Source

Ok(T)

Represents successful result.

Declaration
public Ok(T value)
Parameters
Type Name Description
T value

The result value.

Properties

View Source

Value

Gets the underlying value.

Declaration
public T Value { get; }
Property Value
Type Description
T

Operators

View Source

implicit operator Result<T>(Ok)

Converts successful result to Result<T> type.

Declaration
public static implicit operator Result<T>(Result<T>.Ok result)
Parameters
Type Name Description
Result<T>.Ok result

The result to convert.

Returns
Type Description
Result<T>

An instance of Result<T> that represents the successful result.

View Source

implicit operator Ok(T)

Converts the value to the monad.

Declaration
public static implicit operator Result<T>.Ok(T value)
Parameters
Type Name Description
T value

The value to convert.

Returns
Type Description
Result<T>.Ok

The monad that represents the successful result.

Implements

IResultMonad<T>
IResultMonad<T, TError>
IOptionMonad<T>
ISupplier<TResult>
IFunctional

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾