Browse Source

Use ObservableBase for StyleBinding.

Also use IDescription instead of IObservableDescription as
IObservableDescription is about to be deleted.
pull/58/head
Steven Kirk 11 years ago
parent
commit
f1150c95a2
  1. 6
      Perspex.Styling/StyleBinding.cs

6
Perspex.Styling/StyleBinding.cs

@ -7,7 +7,7 @@
namespace Perspex.Styling namespace Perspex.Styling
{ {
using System; using System;
using System.Reactive.Subjects; using System.Reactive;
/// <summary> /// <summary>
/// Provides an observable for a style. /// Provides an observable for a style.
@ -17,7 +17,7 @@ namespace Perspex.Styling
/// a bool. When the activator produces true, this observable will produce <see cref="Value"/>. /// a bool. When the activator produces true, this observable will produce <see cref="Value"/>.
/// When the activator produces false it will produce <see cref="PerspexProperty.UnsetValue"/>. /// When the activator produces false it will produce <see cref="PerspexProperty.UnsetValue"/>.
/// </remarks> /// </remarks>
internal class StyleBinding : IObservable<object>, IObservableDescription internal class StyleBinding : ObservableBase<object>, IDescription
{ {
/// <summary> /// <summary>
/// The activator. /// The activator.
@ -63,7 +63,7 @@ namespace Perspex.Styling
/// </summary> /// </summary>
/// <param name="observer">The observer.</param> /// <param name="observer">The observer.</param>
/// <returns>IDisposable object used to unsubscribe from the observable sequence.</returns> /// <returns>IDisposable object used to unsubscribe from the observable sequence.</returns>
public IDisposable Subscribe(IObserver<object> observer) protected override IDisposable SubscribeCore(IObserver<object> observer)
{ {
Contract.Requires<NullReferenceException>(observer != null); Contract.Requires<NullReferenceException>(observer != null);
return this.activator.Subscribe( return this.activator.Subscribe(

Loading…
Cancel
Save