Created
February 21, 2014 13:48
-
-
Save jbogard/9134508 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 BatchSaga : IContainSagaData { | |
public int TotalWork { get; set; } | |
public int WorkCompleted { get; set } | |
public void Handle(WorkCompleted message) { | |
WorkCompleted++; | |
if (WorkCompleted == TotalWork) { | |
Bus.Send(new BatchDone()); | |
MarkAsComplete(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment