Browse Source

Moved validation filtering into ExpressionObserver and out of InstancedBinding, PerspexObject, and the Priority* system. Renamed some methods in this system to be more descriptive.

pull/514/head
Jeremy Koritzinsky 10 years ago
parent
commit
da5fd06fcd
  1. 10
      src/Markup/Perspex.Markup.Xaml/Data/Binding.cs
  2. 21
      src/Markup/Perspex.Markup/Data/ExpressionObserver.cs
  3. 4
      src/Perspex.Base/Data/BindingOperations.cs
  4. 20
      src/Perspex.Base/Data/InstancedBinding.cs
  5. 8
      src/Perspex.Base/IPerspexObject.cs
  6. 2
      src/Perspex.Base/IPriorityValueOwner.cs
  7. 26
      src/Perspex.Base/PerspexObject.cs
  8. 9
      src/Perspex.Base/PriorityBindingEntry.cs
  9. 4
      src/Perspex.Base/PriorityLevel.cs
  10. 6
      src/Perspex.Base/PriorityValue.cs
  11. 5
      src/Perspex.Controls/Control.cs
  12. 6
      tests/Perspex.Markup.Xaml.UnitTests/Data/BindingTests_TemplatedParent.cs
  13. 4
      tests/Perspex.Styling.UnitTests/SelectorTests_Child.cs
  14. 4
      tests/Perspex.Styling.UnitTests/SelectorTests_Descendent.cs
  15. 4
      tests/Perspex.Styling.UnitTests/TestControlBase.cs
  16. 4
      tests/Perspex.Styling.UnitTests/TestTemplatedControl.cs

10
src/Markup/Perspex.Markup.Xaml/Data/Binding.cs

@ -131,7 +131,7 @@ namespace Perspex.Markup.Xaml.Data
FallbackValue, FallbackValue,
Priority); Priority);
return new InstancedBinding(subject, Mode, Priority, ValidationMethods); return new InstancedBinding(subject, Mode, Priority);
} }
private static PathInfo ParsePath(string path) private static PathInfo ParsePath(string path)
@ -207,7 +207,7 @@ namespace Perspex.Markup.Xaml.Data
var result = new ExpressionObserver( var result = new ExpressionObserver(
() => target.GetValue(Control.DataContextProperty), () => target.GetValue(Control.DataContextProperty),
path, path,
update); update, ValidationMethods);
return result; return result;
} }
@ -218,7 +218,7 @@ namespace Perspex.Markup.Xaml.Data
.OfType<IPerspexObject>() .OfType<IPerspexObject>()
.Select(x => x.GetObservable(Control.DataContextProperty)) .Select(x => x.GetObservable(Control.DataContextProperty))
.Switch(), .Switch(),
path); path, ValidationMethods);
} }
} }
@ -228,7 +228,7 @@ namespace Perspex.Markup.Xaml.Data
var result = new ExpressionObserver( var result = new ExpressionObserver(
ControlLocator.Track(target, elementName), ControlLocator.Track(target, elementName),
path); path, ValidationMethods);
return result; return result;
} }
@ -236,7 +236,7 @@ namespace Perspex.Markup.Xaml.Data
{ {
Contract.Requires<ArgumentNullException>(source != null); Contract.Requires<ArgumentNullException>(source != null);
return new ExpressionObserver(source, path); return new ExpressionObserver(source, path, ValidationMethods);
} }
private ExpressionObserver CreateTemplatedParentObserver( private ExpressionObserver CreateTemplatedParentObserver(

21
src/Markup/Perspex.Markup/Data/ExpressionObserver.cs

@ -47,18 +47,20 @@ namespace Perspex.Markup.Data
private IDisposable _updateSubscription; private IDisposable _updateSubscription;
private int _count; private int _count;
private readonly ExpressionNode _node; private readonly ExpressionNode _node;
private ValidationMethods _methods;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ExpressionObserver"/> class. /// Initializes a new instance of the <see cref="ExpressionObserver"/> class.
/// </summary> /// </summary>
/// <param name="root">The root object.</param> /// <param name="root">The root object.</param>
/// <param name="expression">The expression.</param> /// <param name="expression">The expression.</param>
public ExpressionObserver(object root, string expression) /// <param name="methods">The validation methods to enable on this observer.</param>
public ExpressionObserver(object root, string expression, ValidationMethods methods = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(expression != null); Contract.Requires<ArgumentNullException>(expression != null);
_root = new WeakReference(root); _root = new WeakReference(root);
_methods = methods;
if (!string.IsNullOrWhiteSpace(expression)) if (!string.IsNullOrWhiteSpace(expression))
{ {
_node = ExpressionNodeBuilder.Build(expression); _node = ExpressionNodeBuilder.Build(expression);
@ -72,13 +74,14 @@ namespace Perspex.Markup.Data
/// </summary> /// </summary>
/// <param name="rootObservable">An observable which provides the root object.</param> /// <param name="rootObservable">An observable which provides the root object.</param>
/// <param name="expression">The expression.</param> /// <param name="expression">The expression.</param>
public ExpressionObserver(IObservable<object> rootObservable, string expression) /// <param name="methods">The validation methods to enable on this observer.</param>
public ExpressionObserver(IObservable<object> rootObservable, string expression, ValidationMethods methods = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(rootObservable != null); Contract.Requires<ArgumentNullException>(rootObservable != null);
Contract.Requires<ArgumentNullException>(expression != null); Contract.Requires<ArgumentNullException>(expression != null);
_rootObservable = rootObservable; _rootObservable = rootObservable;
_methods = methods;
if (!string.IsNullOrWhiteSpace(expression)) if (!string.IsNullOrWhiteSpace(expression))
{ {
_node = ExpressionNodeBuilder.Build(expression); _node = ExpressionNodeBuilder.Build(expression);
@ -93,10 +96,12 @@ namespace Perspex.Markup.Data
/// <param name="rootGetter">A function which gets the root object.</param> /// <param name="rootGetter">A function which gets the root object.</param>
/// <param name="expression">The expression.</param> /// <param name="expression">The expression.</param>
/// <param name="update">An observable which triggers a re-read of the getter.</param> /// <param name="update">An observable which triggers a re-read of the getter.</param>
/// <param name="methods">The validation methods to enable on this observer.</param>
public ExpressionObserver( public ExpressionObserver(
Func<object> rootGetter, Func<object> rootGetter,
string expression, string expression,
IObservable<Unit> update) IObservable<Unit> update,
ValidationMethods methods = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(rootGetter != null); Contract.Requires<ArgumentNullException>(rootGetter != null);
Contract.Requires<ArgumentNullException>(expression != null); Contract.Requires<ArgumentNullException>(expression != null);
@ -104,7 +109,7 @@ namespace Perspex.Markup.Data
_rootGetter = rootGetter; _rootGetter = rootGetter;
_update = update; _update = update;
_methods = methods;
if (!string.IsNullOrWhiteSpace(expression)) if (!string.IsNullOrWhiteSpace(expression))
{ {
_node = ExpressionNodeBuilder.Build(expression); _node = ExpressionNodeBuilder.Build(expression);
@ -216,8 +221,8 @@ namespace Perspex.Markup.Data
{ {
source = source.TakeUntil(_update.LastOrDefaultAsync()); source = source.TakeUntil(_update.LastOrDefaultAsync());
} }
var validationFiltered = source.Where(o => (o as ValidationStatus)?.Match(_methods) ?? true);
var subscription = source.Subscribe(observer); var subscription = validationFiltered.Subscribe(observer);
return Disposable.Create(() => return Disposable.Create(() =>
{ {

4
src/Perspex.Base/Data/BindingOperations.cs

@ -44,10 +44,10 @@ namespace Perspex.Data
{ {
case BindingMode.Default: case BindingMode.Default:
case BindingMode.OneWay: case BindingMode.OneWay:
return target.Bind(property, binding.Observable ?? binding.Subject, binding.Priority, binding.ValidationMethods); return target.Bind(property, binding.Observable ?? binding.Subject, binding.Priority);
case BindingMode.TwoWay: case BindingMode.TwoWay:
return new CompositeDisposable( return new CompositeDisposable(
target.Bind(property, binding.Subject, binding.Priority, binding.ValidationMethods), target.Bind(property, binding.Subject, binding.Priority),
target.GetObservable(property).Subscribe(binding.Subject)); target.GetObservable(property).Subscribe(binding.Subject));
case BindingMode.OneTime: case BindingMode.OneTime:
var source = binding.Subject ?? binding.Observable; var source = binding.Subject ?? binding.Observable;

20
src/Perspex.Base/Data/InstancedBinding.cs

@ -29,16 +29,13 @@ namespace Perspex.Data
/// <param name="value"> /// <param name="value">
/// The value used for the <see cref="BindingMode.OneTime"/> binding. /// The value used for the <see cref="BindingMode.OneTime"/> binding.
/// </param> /// </param>
/// <param name="methods">The validation methods for this binding.</param>
/// <param name="priority">The binding priority.</param> /// <param name="priority">The binding priority.</param>
public InstancedBinding(object value, public InstancedBinding(object value,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue)
ValidationMethods methods = ValidationMethods.None)
{ {
Mode = BindingMode.OneTime; Mode = BindingMode.OneTime;
Priority = priority; Priority = priority;
Value = value; Value = value;
ValidationMethods = methods;
} }
/// <summary> /// <summary>
@ -47,12 +44,10 @@ namespace Perspex.Data
/// <param name="observable">The observable for a one-way binding.</param> /// <param name="observable">The observable for a one-way binding.</param>
/// <param name="mode">The binding mode.</param> /// <param name="mode">The binding mode.</param>
/// <param name="priority">The binding priority.</param> /// <param name="priority">The binding priority.</param>
/// <param name="methods">The validation methods for this binding.</param>
public InstancedBinding( public InstancedBinding(
IObservable<object> observable, IObservable<object> observable,
BindingMode mode = BindingMode.OneWay, BindingMode mode = BindingMode.OneWay,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue)
ValidationMethods methods = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(observable != null); Contract.Requires<ArgumentNullException>(observable != null);
@ -66,7 +61,6 @@ namespace Perspex.Data
Mode = mode; Mode = mode;
Priority = priority; Priority = priority;
Observable = observable; Observable = observable;
ValidationMethods = methods;
} }
/// <summary> /// <summary>
@ -75,19 +69,16 @@ namespace Perspex.Data
/// <param name="subject">The subject for a two-way binding.</param> /// <param name="subject">The subject for a two-way binding.</param>
/// <param name="mode">The binding mode.</param> /// <param name="mode">The binding mode.</param>
/// <param name="priority">The binding priority.</param> /// <param name="priority">The binding priority.</param>
/// <param name="methods">The validation methods for this binding.</param>
public InstancedBinding( public InstancedBinding(
ISubject<object> subject, ISubject<object> subject,
BindingMode mode = BindingMode.OneWay, BindingMode mode = BindingMode.OneWay,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue)
ValidationMethods methods = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(subject != null); Contract.Requires<ArgumentNullException>(subject != null);
Mode = mode; Mode = mode;
Priority = priority; Priority = priority;
Subject = subject; Subject = subject;
ValidationMethods = methods;
} }
/// <summary> /// <summary>
@ -114,10 +105,5 @@ namespace Perspex.Data
/// Gets the subject for a two-way binding. /// Gets the subject for a two-way binding.
/// </summary> /// </summary>
public ISubject<object> Subject { get; } public ISubject<object> Subject { get; }
/// <summary>
/// Gets the validation methods for this binding.
/// </summary>
public ValidationMethods ValidationMethods { get; }
} }
} }

8
src/Perspex.Base/IPerspexObject.cs

@ -67,15 +67,13 @@ namespace Perspex
/// <param name="property">The property.</param> /// <param name="property">The property.</param>
/// <param name="source">The observable.</param> /// <param name="source">The observable.</param>
/// <param name="priority">The priority of the binding.</param> /// <param name="priority">The priority of the binding.</param>
/// <param name="validation">The validation methods of the binding.</param>
/// <returns> /// <returns>
/// A disposable which can be used to terminate the binding. /// A disposable which can be used to terminate the binding.
/// </returns> /// </returns>
IDisposable Bind( IDisposable Bind(
PerspexProperty property, PerspexProperty property,
IObservable<object> source, IObservable<object> source,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue);
ValidationMethods validation = ValidationMethods.None);
/// <summary> /// <summary>
/// Binds a <see cref="PerspexProperty"/> to an observable. /// Binds a <see cref="PerspexProperty"/> to an observable.
@ -84,14 +82,12 @@ namespace Perspex
/// <param name="property">The property.</param> /// <param name="property">The property.</param>
/// <param name="source">The observable.</param> /// <param name="source">The observable.</param>
/// <param name="priority">The priority of the binding.</param> /// <param name="priority">The priority of the binding.</param>
/// <param name="validation">The validation methods of the binding.</param>
/// <returns> /// <returns>
/// A disposable which can be used to terminate the binding. /// A disposable which can be used to terminate the binding.
/// </returns> /// </returns>
IDisposable Bind<T>( IDisposable Bind<T>(
PerspexProperty<T> property, PerspexProperty<T> property,
IObservable<T> source, IObservable<T> source,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue);
ValidationMethods validation = ValidationMethods.None);
} }
} }

2
src/Perspex.Base/IPriorityValueOwner.cs

@ -23,6 +23,6 @@ namespace Perspex
/// </summary> /// </summary>
/// <param name="sender">The source of the change.</param> /// <param name="sender">The source of the change.</param>
/// <param name="status">The validation status.</param> /// <param name="status">The validation status.</param>
void ValidationChanged(PriorityValue sender, ValidationStatus status); void DataValidationChanged(PriorityValue sender, ValidationStatus status);
} }
} }

26
src/Perspex.Base/PerspexObject.cs

@ -375,15 +375,13 @@ namespace Perspex
/// <param name="property">The property.</param> /// <param name="property">The property.</param>
/// <param name="source">The observable.</param> /// <param name="source">The observable.</param>
/// <param name="priority">The priority of the binding.</param> /// <param name="priority">The priority of the binding.</param>
/// <param name="validation">The validation methods of the binding.</param>
/// <returns> /// <returns>
/// A disposable which can be used to terminate the binding. /// A disposable which can be used to terminate the binding.
/// </returns> /// </returns>
public IDisposable Bind( public IDisposable Bind(
PerspexProperty property, PerspexProperty property,
IObservable<object> source, IObservable<object> source,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue)
ValidationMethods validation = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(property != null); Contract.Requires<ArgumentNullException>(property != null);
VerifyAccess(); VerifyAccess();
@ -412,8 +410,7 @@ namespace Perspex
.Subscribe(x => DirectBindingSet(property, x)); .Subscribe(x => DirectBindingSet(property, x));
validationSubcription = source validationSubcription = source
.OfType<ValidationStatus>() .OfType<ValidationStatus>()
.Where(v => v.Match(validation)) .Subscribe(x => DataValidation(property, x));
.Subscribe(x => ValidationChanged(property, x));
s_directBindings.Add(subscription); s_directBindings.Add(subscription);
@ -447,7 +444,7 @@ namespace Perspex
GetDescription(source), GetDescription(source),
priority); priority);
return v.Add(source, (int)priority, validation); return v.Add(source, (int)priority);
} }
} }
@ -458,19 +455,17 @@ namespace Perspex
/// <param name="property">The property.</param> /// <param name="property">The property.</param>
/// <param name="source">The observable.</param> /// <param name="source">The observable.</param>
/// <param name="priority">The priority of the binding.</param> /// <param name="priority">The priority of the binding.</param>
/// <param name="validation">The validation methods of the binding.</param>
/// <returns> /// <returns>
/// A disposable which can be used to terminate the binding. /// A disposable which can be used to terminate the binding.
/// </returns> /// </returns>
public IDisposable Bind<T>( public IDisposable Bind<T>(
PerspexProperty<T> property, PerspexProperty<T> property,
IObservable<T> source, IObservable<T> source,
BindingPriority priority = BindingPriority.LocalValue, BindingPriority priority = BindingPriority.LocalValue)
ValidationMethods validation = ValidationMethods.None)
{ {
Contract.Requires<ArgumentNullException>(property != null); Contract.Requires<ArgumentNullException>(property != null);
return Bind((PerspexProperty)property, source.Select(x => (object)x), priority); return Bind(property, source.Select(x => (object)x), priority);
} }
/// <summary> /// <summary>
@ -517,13 +512,18 @@ namespace Perspex
} }
/// <inheritdoc/> /// <inheritdoc/>
void IPriorityValueOwner.ValidationChanged(PriorityValue sender, ValidationStatus status) void IPriorityValueOwner.DataValidationChanged(PriorityValue sender, ValidationStatus status)
{ {
var property = sender.Property; var property = sender.Property;
ValidationChanged(property, status); DataValidation(property, status);
} }
protected virtual void ValidationChanged(PerspexProperty property, ValidationStatus status) /// <summary>
/// Called when the validation state on a tracked property is changed.
/// </summary>
/// <param name="property">The property whose validation state changed.</param>
/// <param name="status">The new validation state.</param>
protected virtual void DataValidation(PerspexProperty property, ValidationStatus status)
{ {
} }

9
src/Perspex.Base/PriorityBindingEntry.cs

@ -13,7 +13,6 @@ namespace Perspex
{ {
private PriorityLevel _owner; private PriorityLevel _owner;
private IDisposable _subscription; private IDisposable _subscription;
private ValidationMethods _validation;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PriorityBindingEntry"/> class. /// Initializes a new instance of the <see cref="PriorityBindingEntry"/> class.
@ -23,11 +22,10 @@ namespace Perspex
/// The binding index. Later bindings should have higher indexes. /// The binding index. Later bindings should have higher indexes.
/// </param> /// </param>
/// <param name="validation">The validation settings for the binding.</param> /// <param name="validation">The validation settings for the binding.</param>
public PriorityBindingEntry(PriorityLevel owner, int index, ValidationMethods validation) public PriorityBindingEntry(PriorityLevel owner, int index)
{ {
_owner = owner; _owner = owner;
Index = index; Index = index;
_validation = validation;
} }
/// <summary> /// <summary>
@ -106,10 +104,7 @@ namespace Perspex
if (validationStatus != null) if (validationStatus != null)
{ {
if (validationStatus.Match(_validation)) _owner.Validation(this, validationStatus);
{
_owner.Validation(this, validationStatus);
}
} }
else if (bindingError == null || bindingError.UseFallbackValue) else if (bindingError == null || bindingError.UseFallbackValue)
{ {

4
src/Perspex.Base/PriorityLevel.cs

@ -99,11 +99,11 @@ namespace Perspex
/// <param name="binding">The binding to add.</param> /// <param name="binding">The binding to add.</param>
/// <param name="validation">Validation settings for the binding.</param> /// <param name="validation">Validation settings for the binding.</param>
/// <returns>A disposable used to remove the binding.</returns> /// <returns>A disposable used to remove the binding.</returns>
public IDisposable Add(IObservable<object> binding, ValidationMethods validation) public IDisposable Add(IObservable<object> binding)
{ {
Contract.Requires<ArgumentNullException>(binding != null); Contract.Requires<ArgumentNullException>(binding != null);
var entry = new PriorityBindingEntry(this, _nextIndex++, validation); var entry = new PriorityBindingEntry(this, _nextIndex++);
var node = Bindings.AddFirst(entry); var node = Bindings.AddFirst(entry);
entry.Start(binding); entry.Start(binding);

6
src/Perspex.Base/PriorityValue.cs

@ -81,9 +81,9 @@ namespace Perspex
/// <returns> /// <returns>
/// A disposable that will remove the binding. /// A disposable that will remove the binding.
/// </returns> /// </returns>
public IDisposable Add(IObservable<object> binding, int priority, ValidationMethods validation = ValidationMethods.None) public IDisposable Add(IObservable<object> binding, int priority)
{ {
return GetLevel(priority).Add(binding, validation); return GetLevel(priority).Add(binding);
} }
/// <summary> /// <summary>
@ -186,7 +186,7 @@ namespace Perspex
/// <param name="validationStatus">The validation status.</param> /// <param name="validationStatus">The validation status.</param>
public void LevelValidation(PriorityLevel priorityLevel, ValidationStatus validationStatus) public void LevelValidation(PriorityLevel priorityLevel, ValidationStatus validationStatus)
{ {
_owner.ValidationChanged(this, validationStatus); _owner.DataValidationChanged(this, validationStatus);
} }
/// <summary> /// <summary>

5
src/Perspex.Controls/Control.cs

@ -423,9 +423,10 @@ namespace Perspex.Controls
} }
} }
protected override void ValidationChanged(PerspexProperty property, ValidationStatus status) /// <inheritdoc/>
protected override void DataValidation(PerspexProperty property, ValidationStatus status)
{ {
base.ValidationChanged(property, status); base.DataValidation(property, status);
ValidationStatus = status; ValidationStatus = status;
} }

6
tests/Perspex.Markup.Xaml.UnitTests/Data/BindingTests_TemplatedParent.cs

@ -32,8 +32,7 @@ namespace Perspex.Markup.Xaml.UnitTests.Data
target.Verify(x => x.Bind( target.Verify(x => x.Bind(
TextBox.TextProperty, TextBox.TextProperty,
It.IsAny<IObservable<object>>(), It.IsAny<IObservable<object>>(),
BindingPriority.TemplatedParent, BindingPriority.TemplatedParent));
ValidationMethods.None));
} }
[Fact] [Fact]
@ -53,8 +52,7 @@ namespace Perspex.Markup.Xaml.UnitTests.Data
target.Verify(x => x.Bind( target.Verify(x => x.Bind(
TextBox.TextProperty, TextBox.TextProperty,
It.IsAny<ISubject<object>>(), It.IsAny<ISubject<object>>(),
BindingPriority.TemplatedParent, BindingPriority.TemplatedParent));
ValidationMethods.None));
} }
private Mock<IControl> CreateTarget( private Mock<IControl> CreateTarget(

4
tests/Perspex.Styling.UnitTests/SelectorTests_Child.cs

@ -129,7 +129,7 @@ namespace Perspex.Styling.UnitTests
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority, ValidationMethods validation) public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -139,7 +139,7 @@ namespace Perspex.Styling.UnitTests
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

4
tests/Perspex.Styling.UnitTests/SelectorTests_Descendent.cs

@ -160,7 +160,7 @@ namespace Perspex.Styling.UnitTests
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -170,7 +170,7 @@ namespace Perspex.Styling.UnitTests
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

4
tests/Perspex.Styling.UnitTests/TestControlBase.cs

@ -62,12 +62,12 @@ namespace Perspex.Styling.UnitTests
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

4
tests/Perspex.Styling.UnitTests/TestTemplatedControl.cs

@ -57,12 +57,12 @@ namespace Perspex.Styling.UnitTests
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind(PerspexProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue, ValidationMethods validation = ValidationMethods.None) public IDisposable Bind<T>(PerspexProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

Loading…
Cancel
Save