summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2017-01-10 18:07:01 -0600
committerJason Smith <jason.smith@xamarin.com>2017-01-10 16:07:01 -0800
commitf78b328759bb673b695c6b0d1a1dac6d871d257a (patch)
tree53af7ed6bce1b2287ba7addd89f782dd4606d7c6 /Xamarin.Forms.Core.UnitTests
parentdcea6b4853f76dbc4661c42c56244e0a70d889ed (diff)
downloadxamarin-forms-f78b328759bb673b695c6b0d1a1dac6d871d257a.tar.gz
xamarin-forms-f78b328759bb673b695c6b0d1a1dac6d871d257a.tar.bz2
xamarin-forms-f78b328759bb673b695c6b0d1a1dac6d871d257a.zip
iOS and Android timers should be runnable from any thread and execute… (#374)
* iOS and Android timers should be runnable from any thread and executed on the main thread * removing unused Timer class declarations with minor refactoring efforts * iOS and Android timers should be runnable from any thread and executed on the main thread * removing bak file * switch to v7 * add test code
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests')
-rw-r--r--Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs51
1 files changed, 0 insertions, 51 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs b/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs
index 5109cbb4..e8519b9e 100644
--- a/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs
+++ b/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs
@@ -119,57 +119,6 @@ namespace Xamarin.Forms.Core.UnitTests
return AppDomain.CurrentDomain.GetAssemblies ();
}
- public ITimer CreateTimer (Action<object> callback)
- {
- return new MockTimer (new Timer (o => callback(o)));
- }
-
- public ITimer CreateTimer (Action<object> callback, object state, int dueTime, int period)
- {
- return new MockTimer (new Timer (o => callback(o), state, dueTime, period));
- }
-
- public ITimer CreateTimer (Action<object> callback, object state, long dueTime, long period)
- {
- return new MockTimer (new Timer (o => callback(o), state, dueTime, period));
- }
-
- public ITimer CreateTimer (Action<object> callback, object state, TimeSpan dueTime, TimeSpan period)
- {
- return new MockTimer (new Timer (o => callback(o), state, dueTime, period));
- }
-
- public ITimer CreateTimer (Action<object> callback, object state, uint dueTime, uint period)
- {
- return new MockTimer (new Timer (o => callback(o), state, dueTime, period));
- }
-
- public class MockTimer : ITimer
- {
- readonly Timer timer;
- public MockTimer (Timer timer)
- {
- this.timer = timer;
- }
-
- public void Change (int dueTime, int period)
- {
- timer.Change (dueTime, period);
- }
- public void Change (long dueTime, long period)
- {
- timer.Change (dueTime, period);
- }
- public void Change (TimeSpan dueTime, TimeSpan period)
- {
- timer.Change (dueTime, period);
- }
- public void Change (uint dueTime, uint period)
- {
- timer.Change (dueTime, period);
- }
- }
-
public IIsolatedStorageFile GetUserStoreForApplication ()
{
#if WINDOWS_PHONE