DkmWorkList.IsCurrentInstanceCanceled Property

Definition

This property allows a component to determine if the current operation should be canceled. This will return true when called from a thread which is currently processing a work list, and when this work list has been canceled.

This will throw if called from a completion routine or from a thread that is not currently processing an interface call.

public:
 static property bool IsCurrentInstanceCanceled { bool get(); };
public:
 static property bool IsCurrentInstanceCanceled { bool get(); };
public static bool IsCurrentInstanceCanceled { get; }
static member IsCurrentInstanceCanceled : bool
Public Shared ReadOnly Property IsCurrentInstanceCanceled As Boolean

Property Value

Returns Boolean.

Examples

foreach (var file in myfiles) { if (DkmWorkList.IsCurrentInstanceCanceled) throw new OperationCanceledException();

ProcessFile(file);

}

Applies to