Class SyncDataCommandBase<TOperationContext, TResult>
Base implementation of a synchronous data command.
Inheritance
System.Object
DataCommandBase<TOperationContext, TResult>
SyncDataCommandBase<TOperationContext, TResult>
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.Data.Commands
Assembly: Kephas.Data.dll
Syntax
public abstract class SyncDataCommandBase<TOperationContext, TResult> : DataCommandBase<TOperationContext, TResult>, ILoggable, IDataCommand<TOperationContext, TResult>, IDataCommand, IAsyncOperation, ISyncDataCommand<TOperationContext, TResult>, ISyncDataCommand where TOperationContext : IDataOperationContext where TResult : IDataCommandResult
Type Parameters
Name | Description |
---|---|
TOperationContext | Type of the operationContext. |
TResult | Type of the result. |
Methods
| Improve this Doc View SourceExecute(TOperationContext)
Executes the data command.
Declaration
public abstract TResult Execute(TOperationContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
TOperationContext | operationContext | The operation context. |
Returns
Type | Description |
---|---|
TResult |
ExecuteAsync(TOperationContext, CancellationToken)
Executes the data command asynchronously.
Declaration
public override Task<TResult> ExecuteAsync(TOperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TOperationContext | operationContext | The operation context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | A promise of a IDataCommandResult. |
Overrides
Kephas.Data.Commands.DataCommandBase<TOperationContext, TResult>.ExecuteAsync(TOperationContext, System.Threading.CancellationToken)
Explicit Interface Implementations
| Improve this Doc View SourceISyncDataCommand.Execute(IDataOperationContext)
Executes the data command.
Declaration
IDataCommandResult ISyncDataCommand.Execute(IDataOperationContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
IDataOperationContext | operationContext | The operation context. |
Returns
Type | Description |
---|---|
IDataCommandResult |