summaryrefslogtreecommitdiff
path: root/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent8/ScheduledAgent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent8/ScheduledAgent.cs')
-rw-r--r--external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent8/ScheduledAgent.cs52
1 files changed, 0 insertions, 52 deletions
diff --git a/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent8/ScheduledAgent.cs b/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent8/ScheduledAgent.cs
deleted file mode 100644
index 88561e6be4..0000000000
--- a/external/rx/Rx/NET/Test/Rx/WindowsPhoneAgent8/ScheduledAgent.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System.Diagnostics;
-using System.Windows;
-using Microsoft.Phone.Scheduler;
-using System.Reactive.Linq;
-using System;
-
-namespace WindowsPhoneAgent8
-{
- public class ScheduledAgent : ScheduledTaskAgent
- {
- /// <remarks>
- /// ScheduledAgent constructor, initializes the UnhandledException handler
- /// </remarks>
- static ScheduledAgent()
- {
- // Subscribe to the managed exception handler
- Deployment.Current.Dispatcher.BeginInvoke(delegate
- {
- Application.Current.UnhandledException += UnhandledException;
- });
- }
-
- /// Code to execute on Unhandled Exceptions
- private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
- {
- if (Debugger.IsAttached)
- {
- // An unhandled exception has occurred; break into the debugger
- 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
-
- Observable.Return("").Delay(TimeSpan.FromSeconds(1)).Subscribe(_ =>
- {
- NotifyComplete();
- });
- }
- }
-} \ No newline at end of file