Share via


DispatchSource.DataAdd Class

Definition

Dispatch sources that allow applications to trigger an event handler on the target queue.

public class DispatchSource.DataAdd : CoreFoundation.DispatchSource.Data
type DispatchSource.DataAdd = class
    inherit DispatchSource.Data
Inheritance

Remarks

Applications can post data onto a DispatchSource.DataAdd by calling the MergeData(IntPtr) method.   The data is surfaced is then available in to the handler in the PendingData property which will contain the cumulative addition of all the values posted with MergeData.

Constructors

Name Description
DispatchSource.DataAdd(DispatchQueue)

Creates a DataAdd source that delivers events on the specified queue.

DispatchSource.DataAdd(IntPtr, Boolean)

Creates a DataOr DispatchSource from an unmanaged pointer.

DispatchSource.DataAdd(IntPtr)

Creates a DataOr DispatchSource from an unmanaged pointer.

Properties

Name Description
Handle (Inherited from DisposableObject)
IsCanceled

Determine whether the specified source has been canceled.

(Inherited from DispatchSource)
Owns (Inherited from DisposableObject)
PendingData

Retrieves the data that has been posted for this event source.

(Inherited from DispatchSource.Data)

Methods

Name Description
Activate() (Inherited from DispatchObject)
Cancel()

Asynchronously cancels the dispatch source.

(Inherited from DispatchSource)
ClearHandle() (Inherited from DisposableObject)
Dispose() (Inherited from DisposableObject)
Dispose(Boolean)

Releases the resources used by the DispatchSource object.

(Inherited from DispatchSource)
Equals(Object) (Inherited from DisposableObject)
GetCheckedHandle() (Inherited from DisposableObject)
GetHashCode() (Inherited from DisposableObject)
InitializeHandle(NativeHandle) (Inherited from DisposableObject)
MergeData(IntPtr)

Posts the specific value and triggers the event handler on the target queue.

(Inherited from DispatchSource.Data)
Release() (Inherited from DispatchObject)
Resume()

Resumes the dispatch source.

(Inherited from DispatchSource)
Retain() (Inherited from DispatchObject)
SetCancelHandler(Action)

Provides a cancellation handler

(Inherited from DispatchSource)
SetEventHandler(Action)

Specified a handler to execute when events are received on the dispatch source.

(Inherited from DispatchSource)
SetRegistrationHandler(Action)

Provides a registration handler

(Inherited from DispatchSource)
SetTargetQueue(DispatchQueue) (Inherited from DispatchObject)
Suspend()

Suspends the dispatch source.

(Inherited from DispatchSource)

Extension Methods

Name Description
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to