Edit

Share via


DispatchSource.Data Class

Definition

Base class for dispatch sources that allow applications to trigger an event handler on the target queue.

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

Remarks

Applications can post data onto a DispatchSource.Data by calling the MergeData(IntPtr) method.   The data is surfaced is then available in to the handler in the PendingData property.

If multiple calls to MergeData are done, the result surfaced by PendingData will depend on whether you created a DispatchSource.DataAdd which will add the values together or a DispatchSource.DataOr which will or the values together.

Properties

Handle (Inherited from DispatchObject)
IsCanceled

Determine whether the specified source has been canceled.

(Inherited from DispatchSource)
PendingData

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

Methods

Activate() (Inherited from DispatchObject)
Cancel()

Asynchronously cancels the dispatch source.

(Inherited from DispatchSource)
Check()
Obsolete.
(Inherited from DispatchObject)
Dispose() (Inherited from DispatchObject)
Dispose(Boolean)

Releases the resources used by the DispatchSource object.

(Inherited from DispatchSource)
Equals(Object) (Inherited from DispatchObject)
GetHashCode()

Returns the hashcode for this object

(Inherited from DispatchObject)
InitializeHandle(IntPtr) (Inherited from NativeObject)
MergeData(IntPtr)

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

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)

Applies to