Created
April 4, 2014 10:37
-
-
Save ionoy/9972042 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
public IObservable<bool> IsConnected | |
{ | |
get | |
{ | |
return _connectionSubject.Select(isConnected => { | |
if (isConnected) | |
return Telemetry.Buffer(TimeSpan.FromSeconds(2)).Select(l => l.Count > 0); | |
return Observable.Return(false); | |
}).Switch(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment