Created
April 15, 2016 00:13
-
-
Save adamped/c53301e5fe374a0cd50c4a89e28143fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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