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)
Syntax
'Declaration
Protected Shared Function RemoveCallback ( _
existing As Delegate, _
toRemove As Delegate _
) As Delegate
'Usage
Dim existing As [Delegate]
Dim toRemove As [Delegate]
Dim returnValue As [Delegate]
returnValue = ServiceCollection.RemoveCallback(existing, _
toRemove)
protected static Delegate RemoveCallback(
Delegate existing,
Delegate toRemove
)
protected:
static Delegate^ RemoveCallback(
Delegate^ existing,
Delegate^ toRemove
)
static member RemoveCallback :
existing:Delegate *
toRemove:Delegate -> Delegate
protected static function RemoveCallback(
existing : Delegate,
toRemove : Delegate
) : Delegate
Parameters
- existing
Type: System..::..Delegate
The existing delegate to remove the callback from.
- toRemove
Type: System..::..Delegate
The callback to remove.
Return Value
Type: System..::..Delegate
A new value to assign to the existing delegate.