diff options
Diffstat (limited to 'Rx.NET/Tests.System.Reactive/MockDisposable.cs')
-rw-r--r-- | Rx.NET/Tests.System.Reactive/MockDisposable.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Rx.NET/Tests.System.Reactive/MockDisposable.cs b/Rx.NET/Tests.System.Reactive/MockDisposable.cs new file mode 100644 index 0000000..c068ff4 --- /dev/null +++ b/Rx.NET/Tests.System.Reactive/MockDisposable.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Reactive.Testing; + +namespace ReactiveTests +{ + public class MockDisposable : List<long>, IDisposable + { + TestScheduler scheduler; + + public MockDisposable(TestScheduler scheduler) + { + if (scheduler == null) + throw new ArgumentNullException("scheduler"); + + this.scheduler = scheduler; + Add(scheduler.Clock); + } + + public void Dispose() + { + Add(scheduler.Clock); + } + } +} |