A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
742 B

// -----------------------------------------------------------------------
// <copyright file="TestObservable.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Styling.UnitTests
{
using System;
using System.Reactive.Disposables;
public class TestObservable : IObservable<bool>
{
public int SubscribedCount { get; private set; }
public IDisposable Subscribe(IObserver<bool> observer)
{
++this.SubscribedCount;
observer.OnNext(true);
return Disposable.Create(() => --this.SubscribedCount);
}
}
}