| 1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. |
| 2 |
|
| 3 |
namespace System.Reactive.Disposables |
| 4 |
{ |
| 5 |
/// <summary> |
| 6 |
/// Represents a disposable that does nothing on disposal. |
| 7 |
/// </summary> |
| 8 |
internal sealed class DefaultDisposable : IDisposable |
| 9 |
{ |
| 10 |
/// <summary> |
| 11 |
/// Singleton default disposable. |
| 12 |
/// </summary> |
| 13 |
public static readonly DefaultDisposable Instance = new DefaultDisposable(); |
| 14 |
|
| 15 |
private DefaultDisposable() |
| 16 |
{ |
| 17 |
} |
| 18 |
|
| 19 |
/// <summary> |
| 20 |
/// Does nothing. |
| 21 |
/// </summary> |
| 22 |
public void Dispose() |
| 23 |
{ |
| 24 |
// no op |
| 25 |
} |
| 26 |
} |
| 27 |
} |