public override bool FinishedLaunching(UIApplication app, NSDictionary options) { MessagingCenter.Subscribe <StartLongRunningTaskMessage> (this, "StartLongRunningTaskMessage", async message => { longRunningTaskExample = new iOSLongRunningTaskExample(); await longRunningTaskExample.Start(); }); MessagingCenter.Subscribe <StopLongRunningTaskMessage> (this, "StopLongRunningTaskMessage", message => { longRunningTaskExample.Stop(); }); }
void WireUpLongRunningTask() { MessagingCenter.Subscribe <StartLongRunningTaskMessage>(this, "StartLongRunningTaskMessage", async message => { longRunningTaskExample = new iOSLongRunningTaskExample(); await longRunningTaskExample.Start(message); }); MessagingCenter.Subscribe <StopLongRunningTaskMessage>(this, "StopLongRunningTaskMessage", message => { longRunningTaskExample.Stop(); }); }
private void WireUpLongRunningTask() { MessagingCenter.Subscribe <StartLongRunningTaskMessage>(this, nameof(StartLongRunningTaskMessage), async message => { _longRunningTaskExample = new iOSLongRunningTaskExample(); await _longRunningTaskExample.Start(); }); MessagingCenter.Subscribe <StopLongRunningTaskMessage>(this, nameof(StopLongRunningTaskMessage), message => { _longRunningTaskExample.Stop(); }); }