Owneat Technical Guide main Help

Class LanguageExtensions

Namespace: Common.Extensions
Assembly: Common.dll

Common.Extensions.LanguageExtensions contains a static method that process a result object and return the relevant response.

public static class LanguageExtensions

Inheritance

object ← LanguageExtensions

Inherited Members

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

Methods

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

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

public static ActionResult Match<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