ContextItemManager.GetTarget Method
A utility method that returns the target object for a delegate.
Namespace: Microsoft.Windows.Design
Assembly: Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)
Syntax
'Declaration
Protected Shared Function GetTarget ( _
callback As Delegate _
) As Object
protected static Object GetTarget(
Delegate callback
)
protected:
static Object^ GetTarget(
Delegate^ callback
)
static member GetTarget :
callback:Delegate -> Object
protected static function GetTarget(
callback : Delegate
) : Object
Parameters
- callback
Type: System.Delegate
The callback whose target you want.
Return Value
Type: System.Object
The target object of the callback.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | callback is nulla null reference (Nothing in Visual Basic). |
Remarks
If the delegate was created to proxy a generic delegate, the GetTarget method correctly returns the original object, not the proxy.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design Namespace
SubscribeContextCallback<TContextItemType>