Owneat Technical Guide main Help

Class OrderingLanguageExtensions

Namespace: Ordering.API.Extensions
Assembly: Ordering.API.dll

Ordering.API.Extensions.OrderingLanguageExtensions contains a static method that process a result object and return the relevant response.

public static class OrderingLanguageExtensions

Inheritance

object ← OrderingLanguageExtensions

Inherited Members

object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Methods

MatchDomainResult<TResult\>\(Result<TResult\>, Func<TResult, ActionResult\>\)

Matching the given LanguageExt.Common.Result%601 with generic failure processing.

public static ActionResult MatchDomainResult<TResult>(this Result<TResult> result, Func<TResult, ActionResult> success)

Parameters

result Result<TResult\>

The LanguageExt.Common.Result%601 to match.

success Func <TResult, ActionResult \>

The success callback.

Returns

ActionResult

Microsoft.AspNetCore.Mvc.ActionResult or Exception Microsoft.AspNetCore.Mvc.ObjectResult depending on the match.

Type Parameters

TResult

The type of the LanguageExt.Common.Result%601.

Last modified: 21 May 2024