public void TryLaunchTask(ILaunchTask launcher, TaskLaunchEventArgs args) { if (!typeof(TTask).IsAssignableFrom(args.TaskType)) { return; } var configurator = launcher as IConfigureTask <TTask>; if (configurator != null) { configurator.ConfigureTask(task); } showMethod.Invoke(task, null); }
public void TryLaunchTask(ILaunchTask launcher, TaskLaunchEventArgs args) { eventHandled = false; if (!typeof(TChooser).IsAssignableFrom(args.TaskType)) { return; } var configurator = launcher as IConfigureTask <TChooser>; if (configurator != null) { configurator.ConfigureTask(chooser); } phoneService.State[StateKey] = activator.GetKey(launcher, string.Empty); toCheck.Clear(); toCheck.Add(new WeakReference(launcher)); chooser.Show(); }