Debian Codegraph @

external/rx/Rx/NET/Source/Tests.System.Reactive/MockDisposable.cs

raw
1 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Text;
7 using Microsoft.Reactive.Testing;
8
9 namespace ReactiveTests
10 {
11 public class MockDisposable : List<long>, IDisposable
12 {
13 TestScheduler scheduler;
14
15 public MockDisposable(TestScheduler scheduler)
16 {
17 if (scheduler == null)
18 throw new ArgumentNullException("scheduler");
19
20 this.scheduler = scheduler;
21 Add(scheduler.Clock);
22 }
23
24 public void Dispose()
25 {
26 Add(scheduler.Clock);
27 }
28 }
29 }