Browse files

Include ICancelable in Rx1 build and make disposable types implement …

…it as in Rx2.
  • Loading branch information...
1 parent 1df7873 commit 62377c651c873e7dd90c7d65d5e34d8f304fa0a0 @atsushieno atsushieno committed Mar 11, 2012
View
7 System.Reactive.Interfaces/System.Reactive.Interfaces.csproj
@@ -59,14 +59,19 @@
<Link>System.Reactive.Subjects\ISubject.cs</Link>
</Compile>
<Compile Include="System.Reactive\IEventPattern.cs" />
- <Compile Include="System.Reactive.Disposables\ICancelable.cs" />
<Compile Include="System.Reactive.Linq\IQbservable.cs" />
<Compile Include="System.Reactive.Linq\IQbservableProvider.cs" />
<Compile Include="System.Reactive.Linq\IQbservable.Generic.cs" />
<Compile Include="System.Reactive\IObserver.Generic.cs" />
<Compile Include="System.Reactive.Concurrency\ISchedulerLongRunning.cs" />
<Compile Include="System.Reactive.Concurrency\IStopwatchProvider.cs" />
<Compile Include="System.Reactive.Concurrency\IStopwatch.cs" />
+ <Compile Include="..\System.Reactive\System.Reactive.Disposables\ICancelable.cs">
+ <Link>System.Reactive.Disposables\ICancelable.cs</Link>
+ </Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Folder Include="System.Reactive.Disposables\" />
+ </ItemGroup>
</Project>
View
2 System.Reactive/System.Reactive.Disposables/BooleanDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public sealed class BooleanDisposable : IDisposable
+ public sealed class BooleanDisposable : IDisposable, ICancelable
{
public void Dispose ()
{
View
2 System.Reactive/System.Reactive.Disposables/CancellationDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public sealed class CancellationDisposable : IDisposable
+ public sealed class CancellationDisposable : IDisposable, ICancelable
{
CancellationTokenSource cts;
View
9 System.Reactive/System.Reactive.Disposables/CompositeDisposable.cs
@@ -8,11 +8,18 @@
namespace System.Reactive.Disposables
{
public sealed class CompositeDisposable
- : ICollection<IDisposable>, IEnumerable<IDisposable>, IEnumerable, IDisposable
+ : ICollection<IDisposable>, IEnumerable<IDisposable>, IEnumerable, IDisposable, ICancelable
{
// FIXME: not sure if simple stupid List is applicable...
List<IDisposable> items;
+#if REACTIVE_2_0
+ public CompositeDisposable ()
+ {
+ items = new List<IDisposable> ();
+ }
+#endif
+
public CompositeDisposable (IEnumerable<IDisposable> disposables)
{
items = new List<IDisposable> (disposables);
View
2 System.Reactive/System.Reactive.Disposables/ContextDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public sealed class ContextDisposable : IDisposable
+ public sealed class ContextDisposable : IDisposable, ICancelable
{
IDisposable disposable;
View
0 ...ystem.Reactive.Disposables/ICancelable.cs → ...ystem.Reactive.Disposables/ICancelable.cs
File renamed without changes.
View
2 System.Reactive/System.Reactive.Disposables/MultipleAssignmentDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public sealed class MultipleAssignmentDisposable : IDisposable
+ public sealed class MultipleAssignmentDisposable : IDisposable, ICancelable
{
public void Dispose ()
{
View
2 System.Reactive/System.Reactive.Disposables/RefCountDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public sealed class RefCountDisposable : IDisposable
+ public sealed class RefCountDisposable : IDisposable, ICancelable
{
IDisposable disposable;
View
2 System.Reactive/System.Reactive.Disposables/ScheduledDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public sealed class ScheduledDisposable : IDisposable
+ public sealed class ScheduledDisposable : IDisposable, ICancelable
{
public ScheduledDisposable (IScheduler scheduler, IDisposable disposable)
{
View
2 System.Reactive/System.Reactive.Disposables/SerialDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public class SerialDisposable : IDisposable
+ public class SerialDisposable : IDisposable, ICancelable
{
public void Dispose ()
{
View
2 System.Reactive/System.Reactive.Disposables/SingleAssignmentDisposable.cs
@@ -6,7 +6,7 @@
namespace System.Reactive.Disposables
{
- public class SingleAssignmentDisposable : IDisposable
+ public class SingleAssignmentDisposable : IDisposable, ICancelable
{
IDisposable d;
View
1 System.Reactive/System.Reactive.csproj
@@ -148,5 +148,6 @@
<Compile Include="System.Reactive\ObservableBase.cs" />
<Compile Include="System.Reactive\AnonymousObservable.cs" />
<Compile Include="System.Reactive\AnonymousObserver.cs" />
+ <Compile Include="System.Reactive.Disposables\ICancelable.cs" />
</ItemGroup>
</Project>

0 comments on commit 62377c6

Please sign in to comment.