Skip to content

Instantly share code, notes, and snippets.

@adamped
Created April 15, 2016 00:13
Show Gist options
  • Save adamped/c53301e5fe374a0cd50c4a89e28143fa to your computer and use it in GitHub Desktop.
Save adamped/c53301e5fe374a0cd50c4a89e28143fa to your computer and use it in GitHub Desktop.
public class HonkOperation : IOperation
{
IControlModel _model = null;
public HonkOperation(IControlModel model)
{
_model = model;
}
public bool ChainedRollback { get; private set; } = false;
public Func<IList<IResult>, object, Task> Function
{
get
{
return async (result, parameter) =>
{
await _model.IssueCommand(CommandType.Honk);
result.Add(new Result() { ResultAction = ResultType.None });
};
}
}
public Func<Task> Rollback { get { return null; } }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment