Class DelegatePostOpAction<TModel, TUser>
Post-operation action that uses a delegate as its action
Implements
IPostOpAction<TModel, TUser>
Namespace: Seltzr.Actions
Assembly: Seltzr.dll
Syntax
C#
public class DelegatePostOpAction<TModel, TUser> : IPostOpAction<TModel, TUser> where TModel : class where TUser : class
Type Parameters
TModel
The type of model that has been operated on
TUser
The type of authenticated user
Constructors
|
Improve this Doc
View Source
DelegatePostOpAction(Func<IApiContext<TModel, TUser>, IEnumerable<TModel>, Task>)
Initializes a new instance of the DelegatePostOpAction<TModel, TUser> class.
C#
public DelegatePostOpAction(Func<IApiContext<TModel, TUser>, IEnumerable<TModel>, Task> action)
Parameters
action
Func<IApiContext<TModel, TUser>, IEnumerable<TModel>, Task>
The action to run post-op
Methods
Runs this post-operation action
C#
public Task RunAsync(IApiContext<TModel, TUser> context, IEnumerable<TModel> dataset)
Parameters
context
IApiContext<TModel, TUser>
The current API context
dataset
IEnumerable<TModel>
The data that resulted from the operation
Returns
When the action is complete