src/Misc/EFTools/XmlCore/Core/Context/ServiceManager.cs
/// <summary>
///     This is 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.
/// </summary>
/// <param name="callback">The delegate to get the target for.</param>
/// <returns>The object that is the callback target.  This can return null if the callback represents a static object.</returns>
/// <exception cref="ArgumentNullException">If callback is null.</exception>
This is 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.
This is 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 object GetTarget(Delegate callback)
        {
            if (callback == null)
            {
                throw new ArgumentNullException("callback");
            }
            var proxy = callback.Target as ICallbackProxy;
            if (proxy != null)
            {
                return proxy.OriginalTarget;
            }
            return callback.Target;
        }
protected static object GetTarget ( Delegate callback ) { if ( callback == null ) { throw new ArgumentNullException ( " " ) ; } var proxy = callback . Target as ICallbackProxy ; if ( proxy != null ) { return proxy . OriginalTarget ; } return callback . Target ; }
This is a helper method that returns the target object for a delegate.
This is a helper method that returns the target object for a delegate .
The object that is the callback target.  This can return null if the callback represents a static object.
The object that is the callback target . This can return null if the callback represents a static object .
If callback is null.
If callback is null .
callback
Delegate
The delegate to get the target for.
The delegate to get the target for .