ServiceManager.GetTarget(Delegate) 方法
定义
一个可返回委托的目标对象的帮助器方法。A helper method that returns the target object for a delegate. 如果创建了委托作为泛型委托的代理,则此方法将正确地返回原始对象,而不是代理。If the delegate was created to proxy a generic delegate, this will correctly return the original object, not the proxy.
protected:
static System::Object ^ GetTarget(Delegate ^ callback);
protected static object GetTarget (Delegate callback);
static member GetTarget : Delegate -> obj
Protected Shared Function GetTarget (callback As Delegate) As Object
参数
- callback
- Delegate
要为其获取目标的委托。The delegate to get the target for.
返回
返回作为回调目标的 Object。Returns Object, which is the callback target. 如果该回调表示一个静态对象,则此会返回 null。This can return null if the callback represents a static object.
例外
callback 为 null。callback is null.