This code is perfect, i think you're just missing a using statement, "using System.Reactive"
Update: The reason that this doesn't work is code that's not in the snippet. You declared TryAuthenticateCommand
as IReactiveCommand
which doesn't implement IObservable<T>
(what would T
be?).
In this case, since you're not providing an async method to go along with it, ReactiveCommand returns you the CommandParameter, which is an object
. So declare it as ReactiveCommand<object>
and everything works