Reactive Extensions in a Workbook

AntaoAlmadaAntaoAlmada PTMember ✭✭
edited May 2016 in Workbooks & Inspector

I added the rx-main package to the a WPF Workbook but when I type 'using System.Reactive;', both the autocompletion and the compiler fail to find the namespace. I tried my own NuGet package and worked fine.
What am I missing here? What version of .NET is the WPF Workbook using?

Tagged:

Posts

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    Any idea why it doesn't work?

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    ?

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Thank you for filing a bug so that this is on our radar.

    There are a lot of NuGet packages that don't work correctly yet. See https://developer.xamarin.com/releases/inspector/preview/inspector-0.8.1/#KNOWN_ISSUES.

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    Thanks for the reply. Just wanted to contribute with a test scenario and to be sure RxNET was under your radar. ;)

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    Still doesn't work in 0.9.0 :(

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    Today a new version of Rx.NET was released supporting .NET Core 1.0. It requires NuGet 2.12 while version supported by 0.9.0 is 2.10.766.
    The package is now called System.Reactive 3.0.0.

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    I tested version 1.0.0.0 released today and I'm happy to say that it can finally add System.Reactive.* packages.

    Unfortunately when I run:

    #r "System.Reactive.Linq"
    using System.Reactive.Linq;
    Observable.Interval(TimeSpan.FromSeconds(1)).Take(10);
    

    I get the following message and nothing happens.

    "warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call."

    If I await the observable, I get only the last value. This is the expected behavior for an awaited observable but it would be interesting to not have to await and see all the returned values, just like LinqPad has been doing for a long time.

  • AntaoAlmadaAntaoAlmada PTMember ✭✭

    I got some help from Paul Betts that gave me this solution:

    #r "System.Reactive.Linq"
    using System.Reactive.Linq;
    await Observable.Interval(TimeSpan.FromSeconds(1)).Take(10).ToList();
    

    It shows all the values once the observable completes. It works but it would be much nicer if you supported output from IObservable and show the values as they become available.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Glad it works! IObservable support would certainly be a useful feature.

  • MaxCMaxC CAMember

    Any news on this? Has IObservable() support been added to any of the recent versions ?

Sign In or Register to comment.