Class OperationResultExtensions
Extensions for IOperationResult.
Inheritance
System.Object
OperationResultExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Operations
Assembly: Kephas.Core.dll
Syntax
public static class OperationResultExtensions
Methods
| Improve this Doc View SourceHasErrors(IOperationResult)
Marks the result as completed and computes the operation state.
Declaration
public static bool HasErrors(this IOperationResult result)
Parameters
Type | Name | Description |
---|---|---|
IOperationResult | result | The result. |
Returns
Type | Description |
---|---|
System.Boolean | A TResult. |
HasWarnings(IOperationResult)
Marks the result as completed and computes the operation state.
Declaration
public static bool HasWarnings(this IOperationResult result)
Parameters
Type | Name | Description |
---|---|---|
IOperationResult | result | The result. |
Returns
Type | Description |
---|---|
System.Boolean | A TResult. |
MergeException<TResult>(TResult, Exception)
Merges the exception.
Declaration
public static TResult MergeException<TResult>(this TResult result, Exception ex)
where TResult : class, IOperationResult
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The result. |
System.Exception | ex | The exception. |
Returns
Type | Description |
---|---|
TResult | The provided result. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result. |
MergeMessage<TResult>(TResult, IOperationMessage)
Merges the exception.
Declaration
public static TResult MergeMessage<TResult>(this TResult result, IOperationMessage message)
where TResult : class, IOperationResult
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The result. |
IOperationMessage | message | The message. |
Returns
Type | Description |
---|---|
TResult | The provided result. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result. |
MergeMessage<TResult>(TResult, String)
Merges the exception.
Declaration
public static TResult MergeMessage<TResult>(this TResult result, string message)
where TResult : class, IOperationResult
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The result. |
System.String | message | The message. |
Returns
Type | Description |
---|---|
TResult | The provided result. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result. |
MergeResult<TResult>(TResult, IOperationResult)
Merges the exception.
Declaration
public static TResult MergeResult<TResult>(this TResult result, IOperationResult resultToMerge)
where TResult : class, IOperationResult
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The result. |
IOperationResult | resultToMerge | The result to merge. |
Returns
Type | Description |
---|---|
TResult | The provided result. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result. |
MergeResult<TResult>(TResult, Task<IOperationResult>)
Merges the exception.
Declaration
public static TResult MergeResult<TResult>(this TResult result, Task<IOperationResult> asyncResult)
where TResult : class, IOperationResult
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The result. |
System.Threading.Tasks.Task<IOperationResult> | asyncResult | The task of which result will be merged. |
Returns
Type | Description |
---|---|
TResult | The provided result. |
Type Parameters
Name | Description |
---|---|
TResult | Type of the result. |