Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MockDisposable.cs « Tests.System.Reactive « Rx.NET - github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c068ff4de97447ab155d0f6ec9f5d9f37c96e84d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
        }
    }
}