Skip to content

Commit

Permalink
Revert "Silverlight on Windows Phone does not support Tasks."
Browse files Browse the repository at this point in the history
This reverts commit 74dd254.

Let's make WP71 support tasks instead

Conflicts:

	ReactiveUI/RxApp.cs
  • Loading branch information
anaisbetts committed Apr 14, 2012
1 parent b1a6f32 commit ab7763a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
7 changes: 1 addition & 6 deletions ReactiveUI.Xaml/ReactiveAsyncCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Threading.Tasks;
using NLog;
using ReactiveUI;

#if !WINDOWS_PHONE
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;
#endif

namespace ReactiveUI.Xaml
{
Expand Down Expand Up @@ -209,7 +206,6 @@ public void RegisterAsyncAction(Action<object> calculationFunc,
RegisterAsyncFunction(x => { calculationFunc(x); return new Unit(); }, scheduler);
}

#if !WINDOWS_PHONE
/// <summary>
/// RegisterAsyncTask registers an TPL/Async method that runs when a
/// Command gets executed and returns the result
Expand All @@ -236,7 +232,6 @@ public IObservable<Unit> RegisterAsyncTask<TResult>(Func<object, Task> calculati
Contract.Requires(calculationFunc != null);
return RegisterAsyncObservable(x => calculationFunc(x).ToObservable());
}
#endif

/// <summary>
/// RegisterAsyncObservable registers an Rx-based async method whose
Expand Down
9 changes: 1 addition & 8 deletions ReactiveUI.Xaml/ReactiveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Threading.Tasks;
using System.Windows.Input;
using NLog;
using ReactiveUI;

#if !WINDOWS_PHONE
using System.Threading.Tasks;
#endif

namespace ReactiveUI.Xaml
{
/// <summary>
Expand Down Expand Up @@ -44,7 +41,6 @@ public ReactiveCommand(IObservable<bool> canExecute = null, IScheduler scheduler
ThrownExceptions = exSubject;
}

#if !WINDOWS_PHONE
protected ReactiveCommand(Func<object, Task<bool>> canExecuteFunc, IScheduler scheduler = null)
{
var canExecute = canExecuteProbed.SelectAsync(canExecuteFunc);
Expand All @@ -59,7 +55,6 @@ protected ReactiveCommand(Func<object, Task<bool>> canExecuteFunc, IScheduler sc

ThrownExceptions = exSubject;
}
#endif

protected ReactiveCommand(Func<object, bool> canExecute, IScheduler scheduler = null)
{
Expand Down Expand Up @@ -92,7 +87,6 @@ public static ReactiveCommand Create(
return ret;
}

#if !WINDOWS_PHONE
/// <summary>
/// Creates a new ReactiveCommand object in an imperative, non-Rx way,
/// similar to RelayCommand, only via a TPL Async method
Expand All @@ -116,7 +110,6 @@ public static ReactiveCommand Create(

return ret;
}
#endif

public IObservable<Exception> ThrownExceptions { get; protected set; }

Expand Down

0 comments on commit ab7763a

Please sign in to comment.