-
-
Save rolfbjarne/82055b58801645c02f31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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