Skip to content

Instantly share code, notes, and snippets.

@yuta-kaseda
Last active August 4, 2017 03:05
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 yuta-kaseda/34830bfadadf8fc6d58f6f3cd7a99724 to your computer and use it in GitHub Desktop.
Save yuta-kaseda/34830bfadadf8fc6d58f6f3cd7a99724 to your computer and use it in GitHub Desktop.
public static class BossObservableExtension
{
public static IObservable<T> Boss(this IObservable<T> source)
{
if(source == null) throw new ArgumentNullException("source");
//前のオペレータがBossの時は何もしない重複回避処理
if(source is BossObservable<T>)
{
return source;
}
return new BossObservable<T>(source);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment