summaryrefslogtreecommitdiff
path: root/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent7/ScheduledAgent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent7/ScheduledAgent.cs')
-rw-r--r--external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent7/ScheduledAgent.cs64
1 files changed, 0 insertions, 64 deletions
diff --git a/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent7/ScheduledAgent.cs b/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent7/ScheduledAgent.cs
deleted file mode 100644
index da08f4d1b4..0000000000
--- a/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent7/ScheduledAgent.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System;
-using System.Reactive.Linq;
-using System.Windows;
-using Microsoft.Phone.Scheduler;
-using Microsoft.Phone.Shell;
-
-namespace WindowsPhoneAgent7
-{
- public class ScheduledAgent : ScheduledTaskAgent
- {
- private static volatile bool _classInitialized;
-
- /// <remarks>
- /// ScheduledAgent constructor, initializes the UnhandledException handler
- /// </remarks>
- public ScheduledAgent()
- {
- if (!_classInitialized)
- {
- _classInitialized = true;
- // Subscribe to the managed exception handler
- Deployment.Current.Dispatcher.BeginInvoke(delegate
- {
- Application.Current.UnhandledException += ScheduledAgent_UnhandledException;
- });
- }
- }
-
- /// Code to execute on Unhandled Exceptions
- private void ScheduledAgent_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
- {
- if (System.Diagnostics.Debugger.IsAttached)
- {
- // An unhandled exception has occurred; break into the debugger
- System.Diagnostics.Debugger.Break();
- }
- }
-
- /// <summary>
- /// Agent that runs a scheduled task
- /// </summary>
- /// <param name="task">
- /// The invoked task
- /// </param>
- /// <remarks>
- /// This method is called when a periodic or resource intensive task is invoked
- /// </remarks>
- protected override void OnInvoke(ScheduledTask task)
- {
- //TODO: Add code to perform your task in background
-
- //
- // Goal of the agent project is simply to test the "Marketplace Test Kit" passes.
- // If Rx uses the following, it won't pass.
- //
- //PhoneApplicationService.Current.Activated += (o, e) => { };
-
- Observable.Return("").Delay(TimeSpan.FromSeconds(1)).Subscribe(_ =>
- {
- NotifyComplete();
- });
- }
- }
-} \ No newline at end of file