RemoveCallback Method

This is a helper method that performs a Delegate.Remove, but knows how to unwrap delegates that are proxies to generic callbacks. Use this in your Unsubscribe implementations.

Namespace:  Microsoft.Data.Tools.Design.Core.Context
Assembly:  Microsoft.Data.Tools.Design.Core (in Microsoft.Data.Tools.Design.Core.dll)


Protected Shared Function RemoveCallback ( _
    existing As Delegate, _
    toRemove As Delegate _
) As Delegate
Dim existing As [Delegate]
Dim toRemove As [Delegate]
Dim returnValue As [Delegate]

returnValue = ServiceCollection.RemoveCallback(existing, _
protected static Delegate RemoveCallback(
    Delegate existing,
    Delegate toRemove
static Delegate^ RemoveCallback(
    Delegate^ existing, 
    Delegate^ toRemove
static member RemoveCallback : 
        existing:Delegate * 
        toRemove:Delegate -> Delegate 
protected static function RemoveCallback(
    existing : Delegate, 
    toRemove : Delegate
) : Delegate


Return Value

Type: System..::..Delegate
A new value to assign to the existing delegate.

See Also


ServiceCollection Class

Microsoft.Data.Tools.Design.Core.Context Namespace