// ----------------------------------------------------------------------- // // Copyright 2015 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex.Animation { using System; /// /// Tracks the progress of an animation. /// public class Animation : IObservable, IDisposable { private IObservable inner; private IDisposable subscription; public Animation(IObservable inner, IDisposable subscription) { this.inner = inner; this.subscription = subscription; } public void Dispose() { this.subscription.Dispose(); } public IDisposable Subscribe(IObserver observer) { return this.inner.Subscribe(observer); } } /// /// Tracks the progress of an animation. /// public class Animation : IObservable, IDisposable { private IObservable inner; private IDisposable subscription; public Animation(IObservable inner, IDisposable subscription) { this.inner = inner; this.subscription = subscription; } public void Dispose() { this.subscription.Dispose(); } public IDisposable Subscribe(IObserver observer) { return this.inner.Subscribe(observer); } } }