Last active
April 1, 2017 19:17
-
-
Save tomliversidge/3c96eea196d64ec94b510f6d108504e4 to your computer and use it in GitHub Desktop.
no wrapping at all
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 async Task InitAsync(IProvider provider, IContext context) | |
{ | |
// other bits removed for brevity | |
await State.GetEventsAsync(Name, Index, callbackData => | |
{ | |
// dont wrap callbackData in anything (callbackData could be renamed to @event?) | |
Context.ReceiveAsync(callbackData).Wait(); | |
Index++; | |
}); | |
await Context.ReceiveAsync(new RecoveryCompleted()); | |
} | |
public async Task PersistEventAsync(object data) | |
{ | |
var index = Index; | |
await State.PersistEventAsync(Name, index, data); | |
Index++; | |
// dont wrap data in anything (data could be renamed to @event?) | |
await Context.ReceiveAsync(data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment