AbstractModelCollection<(Of <(<'T, TPropertyTracking>)>)>..::..Set<(Of <(<'TValue>)>)> Method (TValue, NotifyCollectionChangedEventHandler, 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<TValue>(
	TValue value,
	NotifyCollectionChangedEventHandler collectionChanged,
	string propertyName
)
where TValue : INotifyPropertyChanged, INotifyCollectionChanged
Protected Function Set(Of TValue As {INotifyPropertyChanged, INotifyCollectionChanged}) ( _
	value As TValue, _
	collectionChanged As NotifyCollectionChangedEventHandler, _
	propertyName As String _
) As Boolean

Type Parameters

TValue

Parameters

value
Type: TValue
Value to be saved.
collectionChanged
Type: NotifyCollectionChangedEventHandler
A collection changed event handler to be attached to the new value. If an old value exists, the event handler will be removed from it.
propertyName
Type: String
Name of property to be created/updated

Return Value

Exceptions


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