示例#1
0
        void WireUpLongRunningTask()
        {
            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 ();
			});

			MessagingCenter.Subscribe<StopLongRunningTaskMessage> (this, "StopLongRunningTaskMessage", message => {
				longRunningTaskExample.Stop ();
			});
		}