AbstractModelBase<(Of <(<'TPropertyTracking>)>)>..::..Set<(Of <(<'T>)>)> Method (T, ValueChanged<(Of <(<'T>)>)>, String)

Set the indicated property to the value. If the value doesn't match the previous value, or if there is no previous value, raise a property changed notification.

Namespace:  Tortuga.Anchor.Modeling.Internals
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


protected bool Set<T>(
	T value,
	ValueChanged<T> valueChanged,
	string propertyName
)
where T : INotifyPropertyChanged, INotifyCollectionChanged
Protected Function Set(Of T As {INotifyPropertyChanged, INotifyCollectionChanged}) ( _
	value As T, _
	valueChanged As ValueChanged(Of T), _
	propertyName As String _
) As Boolean

Type Parameters

T

Parameters

value
Type: T
Value to be saved.
valueChanged
Type: Tortuga.Anchor.Modeling..::..ValueChanged<(Of <(<'T>)>)>
Delegate that will be invoked if the value of this property changes.
propertyName
Type: String
Name of property to be created/updated

Return Value

True is the value actually changed.

Exceptions


ExceptionCondition
[ArgumentNullException]propertyName;propertyName is null
[ArgumentException]propertyName is null or empty.;propertyName