jasonxz
jasonxz

Reputation: 159

How to use IObservable<T> in WinRT?

I'm trying to develop a WinRT library in C# that exposes some classes with public properties of type IObservable to make use of Reactive Extensions for .NET. The documentation for Rx.NET states that, as of v5.0, WinRT is fully supported as long as you're targeting Windows SDK v19041. I set my Target Platform to 19041 and built a class that exposes an IObservable property and it doesn't compile...giving me the whole IObservable "is not a valid Windows Runtime type" compile error.

So...am I missing something that will allow me to use IObservable? If not, does anyone know a workaround? The point is that I want libraries/applications that consume the library to be able to use Rx.NET to Subscribe to these observables so, really, any solution that allows that would be fantastic!

Upvotes: 0

Views: 52

Answers (0)

Related Questions