Cannot call RegisterAsyncFunction against view-model properties declared as IReactiveAsyncCommand
public class ViewModel : ReactiveObject
{
public readonly IReactiveAsyncCommand Command { get; private set; }
public ViewModel()
{
Command = new ReactiveAsyncCommand();
Command
.RegisterAyncFunction<int>(_ => 1) // fail
.Subscribe(value => {});
}
}
RegisterAync... aren't available on the interface
This seems legit. Can you send a Pull Request to fix this up (i.e. move the Register* series of methods to a static class?)
Is it ok if I make it part of ReactiveAsyncCommandMixins and move to another file? https://github.com/reactiveui/ReactiveUI/blob/master/ReactiveUI.Xaml/ReactiveAsyncCommand.cs#L362
@chrisbednarski Make it part of the Mixins, but leave it in the same file, they're pretty related
@xpaulbettsx Could you please cherry-pick from https://github.com/chrisbednarski/ReactiveUI/commit/97a7651ea33d40939b85ac1d00636122d789e477? After I synched up with upstream, the pull request shows 43 commits in it. Not sure how I screwed this up.
@chrisbednarski Next time, try git pull --rebase - that will put your unique commits at the end instead of mixed into the middle. Another trick you can do if you've only got one unique commit, is to just run git fetch upstream; git reset upstream/master (assuming you've set up the remote to the original repo as 'upstream'), then just recommit your work (reset without --hard won't change your actual files, just what the branch is pointing to).
@chrisbednarski Merged, thanks!