Example #1
0
        public static void Start(IBackgroundTaskInstance taskInstance)
        {
            // Use the taskInstance.Name and/or taskInstance.InstanceId to determine
            // what background activity to perform. In this sample, all of our
            // background activities are the same, so there is nothing to check.
            var activity = new BackgroundActivity();

            activity.Run(taskInstance);
        }
Example #2
0
 /// <summary>
 /// Override the Application.OnBackgroundActivated method to handle background activation in
 /// the main process. This entry point is used when BackgroundTaskBuilder.TaskEntryPoint is
 /// not set during background task registration.
 /// </summary>
 /// <param name="args"></param>
 protected override void OnBackgroundActivated(BackgroundActivatedEventArgs args)
 {
     BackgroundActivity.Start(args.TaskInstance);
 }
 public static void Start(IBackgroundTaskInstance taskInstance)
 {
     // Use the taskInstance.Name and/or taskInstance.InstanceId to determine
     // what background activity to perform. In this sample, all of our
     // background activities are the same, so there is nothing to check.
     var activity = new BackgroundActivity();
     activity.Run(taskInstance);
 }