Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created April 2, 2014 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/82055b58801645c02f31 to your computer and use it in GitHub Desktop.
Save rolfbjarne/82055b58801645c02f31 to your computer and use it in GitHub Desktop.
//
// Author:
// Nicolas VERINAUD <nicolas@chloro.eu>
//
// Copyright (c) 2014 Chlorophyll Vision. All Rights Reserved.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace ObservableCombineLatestBug
{
[Register("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
UIWindow window;
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
var ret1 = Observable.Return ("1"); // Changing to 1 as opposed to "1" works.
Observable.CombineLatest(ret1, ret1, ret1, (a, b, c) => {
Console.WriteLine("First CombineLatest");
return true;
}).Subscribe(_ => {});
var interval1 = Observable.Interval(TimeSpan.FromSeconds(1));
Observable.CombineLatest(interval1, interval1, interval1, (a, b, c) => {
Console.WriteLine("Subsequent CombineLatest");
return true;
}).Subscribe(_ => {});
window = new UIWindow(UIScreen.MainScreen.Bounds);
window.MakeKeyAndVisible();
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment