Partager via


AsyncObservableObject.SetPropertyNotifyAsync Method

Definition

Overloads

SetPropertyNotifyAsync(IntPtr, IntPtr, Task, CancellationToken, String)

Checks for a change to an IntPtr value, and if the value is different, stores the value and asynchronously notifies of property changes.

SetPropertyNotifyAsync(UIntPtr, UIntPtr, Task, CancellationToken, String)

Checks for a change to a UIntPtr value, and if the value is different, stores the value and asynchronously notifies of property changes.

SetPropertyNotifyAsync<T>(T, T, Task, CancellationToken, String)

Checks for a change to a value, and if the value is different, stores the value and asynchronously notifies of property changes.

SetPropertyNotifyAsync<T>(T, T, Action, Task, CancellationToken, String)

Checks for a change to a value, and if the value is different, stores the value and asynchronously notifies of property changes.

SetPropertyNotifyAsync<T>(T, T, Action<T,T>, Task, CancellationToken, String)

Checks for a change to a value, and if the value is different, stores the value and asynchronously notifies of property changes.

SetPropertyNotifyAsync(IntPtr, IntPtr, Task, CancellationToken, String)

Checks for a change to an IntPtr value, and if the value is different, stores the value and asynchronously notifies of property changes.

protected bool SetPropertyNotifyAsync (ref IntPtr field, IntPtr newValue, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = default);
protected bool SetPropertyNotifyAsync (ref IntPtr field, IntPtr newValue, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = "");
member this.SetPropertyNotifyAsync : nativeint * nativeint * Task * System.Threading.CancellationToken * string -> bool
Protected Function SetPropertyNotifyAsync (ByRef field As IntPtr, newValue As IntPtr, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = Nothing) As Boolean
Protected Function SetPropertyNotifyAsync (ByRef field As IntPtr, newValue As IntPtr, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = "") As Boolean

Parameters

field
IntPtr

nativeint

The storage location for the field behind the property.

newValue
IntPtr

nativeint

The new value to store in the field.

notificationTask
Task

If the property hasn't changed, this will be null. If the property has changed, this will be a task that will complete once the PropertyChanged event has been raised.

cancellationToken
CancellationToken

The cancellation token.

propertyName
String

The name of the property that is changing.

Returns

true if the property value changed, false if it did not change.

Applies to

SetPropertyNotifyAsync(UIntPtr, UIntPtr, Task, CancellationToken, String)

Checks for a change to a UIntPtr value, and if the value is different, stores the value and asynchronously notifies of property changes.

protected bool SetPropertyNotifyAsync (ref UIntPtr field, UIntPtr newValue, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = default);
protected bool SetPropertyNotifyAsync (ref UIntPtr field, UIntPtr newValue, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = "");
member this.SetPropertyNotifyAsync : unativeint * unativeint * Task * System.Threading.CancellationToken * string -> bool
Protected Function SetPropertyNotifyAsync (ByRef field As UIntPtr, newValue As UIntPtr, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = Nothing) As Boolean
Protected Function SetPropertyNotifyAsync (ByRef field As UIntPtr, newValue As UIntPtr, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = "") As Boolean

Parameters

field
UIntPtr

unativeint

The storage location for the field behind the property.

newValue
UIntPtr

unativeint

The new value to store in the field.

notificationTask
Task

If the property hasn't changed, this will be null. If the property has changed, this will be a task that will complete once the PropertyChanged event has been raised.

cancellationToken
CancellationToken

The cancellation token.

propertyName
String

The name of the property that is changing.

Returns

true if the property value changed, false if it did not change.

Applies to

SetPropertyNotifyAsync<T>(T, T, Task, CancellationToken, String)

Checks for a change to a value, and if the value is different, stores the value and asynchronously notifies of property changes.

protected bool SetPropertyNotifyAsync<T> (ref T field, T newValue, out System.Threading.Tasks.Task notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = default);
protected bool SetPropertyNotifyAsync<T> (ref T field, T newValue, out System.Threading.Tasks.Task notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = "");
member this.SetPropertyNotifyAsync : 'T * 'T * Task * System.Threading.CancellationToken * string -> bool
Protected Function SetPropertyNotifyAsync(Of T) (ByRef field As T, newValue As T, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = Nothing) As Boolean
Protected Function SetPropertyNotifyAsync(Of T) (ByRef field As T, newValue As T, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = "") As Boolean

Type Parameters

T

The type of field changing.

Parameters

field
T

The storage location for the field behind the property.

newValue
T

The new value to store in the field.

notificationTask
Task

If the property hasn't changed, this will be CompletedTask. If the property has changed, this will be a task that will complete once the PropertyChanged event has been raised.

cancellationToken
CancellationToken

The cancellation token.

propertyName
String

The name of the property that is changing.

Returns

true if the property value changed, false if it did not change.

Applies to

SetPropertyNotifyAsync<T>(T, T, Action, Task, CancellationToken, String)

Checks for a change to a value, and if the value is different, stores the value and asynchronously notifies of property changes.

protected bool SetPropertyNotifyAsync<T> (ref T field, T newValue, Action beforeNotifyAction, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = default);
protected bool SetPropertyNotifyAsync<T> (ref T field, T newValue, Action beforeNotifyAction, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = "");
member this.SetPropertyNotifyAsync : 'T * 'T * Action * Task * System.Threading.CancellationToken * string -> bool
Protected Function SetPropertyNotifyAsync(Of T) (ByRef field As T, newValue As T, beforeNotifyAction As Action, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = Nothing) As Boolean
Protected Function SetPropertyNotifyAsync(Of T) (ByRef field As T, newValue As T, beforeNotifyAction As Action, ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = "") As Boolean

Type Parameters

T

The type of field changing.

Parameters

field
T

The storage location for the field behind the property.

newValue
T

The new value to store in the field.

beforeNotifyAction
Action

An action to call if the value changes, before notifying property changes.

notificationTask
Task

If the property hasn't changed, this will be null. If the property has changed, this will be a task that will complete once the PropertyChanged event has been raised.

cancellationToken
CancellationToken

The cancellation token.

propertyName
String

The name of the property that is changing.

Returns

true if the property value changed, false if it did not change.

Applies to

SetPropertyNotifyAsync<T>(T, T, Action<T,T>, Task, CancellationToken, String)

Checks for a change to a value, and if the value is different, stores the value and asynchronously notifies of property changes.

protected bool SetPropertyNotifyAsync<T> (ref T field, T newValue, Action<T,T> beforeNotifyAction, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = default);
protected bool SetPropertyNotifyAsync<T> (ref T field, T newValue, Action<T,T> beforeNotifyAction, out System.Threading.Tasks.Task? notificationTask, System.Threading.CancellationToken cancellationToken = default, string propertyName = "");
member this.SetPropertyNotifyAsync : 'T * 'T * Action<'T, 'T> * Task * System.Threading.CancellationToken * string -> bool
Protected Function SetPropertyNotifyAsync(Of T) (ByRef field As T, newValue As T, beforeNotifyAction As Action(Of T, T), ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = Nothing) As Boolean
Protected Function SetPropertyNotifyAsync(Of T) (ByRef field As T, newValue As T, beforeNotifyAction As Action(Of T, T), ByRef notificationTask As Task, Optional cancellationToken As CancellationToken = Nothing, Optional propertyName As String = "") As Boolean

Type Parameters

T

The type of field changing.

Parameters

field
T

The storage location for the field behind the property.

newValue
T

The new value to store in the field.

beforeNotifyAction
Action<T,T>

An action to call if the value changes, before notifying property changes.

notificationTask
Task

If the property hasn't changed, this will be null. If the property has changed, this will be a task that will complete once the PropertyChanged event has been raised.

cancellationToken
CancellationToken

The cancellation token.

propertyName
String

The name of the property that is changing.

Returns

true if the property value changed, false if it did not change.

Applies to