src/Misc/EFTools/XmlCore/Core/Context/ServiceManager.cs
/// <summary>
///     Calls back on the provided callback when someone has published the requested service.
///     If the service was already available, this method invokes the callback immediately.
///     A generic version of this method is provided for convenience, and calls the non-generic
///     method with appropriate casts.
/// </summary>
/// <typeparam name="ServiceType">The type of service to subscribe.</typeparam>
/// <param name="callback">A callback that will be invoked when the service is available.</param>
/// <exception cref="ArgumentNullException">If callback is null.</exception>
Calls back on the provided callback when someone has published the requested service.
If the service was already available, this method invokes the callback immediately.
A generic version of this method is provided for convenience, and calls the non-generic
method with appropriate casts.
Calls back on the provided callback when someone has published the requested service . If the service was already available this method invokes the callback immediately . A generic version of this method is provided for convenience and calls the non - generic method with appropriate casts .
public void Subscribe<TServiceType>(SubscribeServiceCallback<TServiceType> callback)
        {
            if (callback == null)
            {
                throw new ArgumentNullException("callback");
            }
            var proxy = new SubscribeProxy<TServiceType>(callback);
            Subscribe(typeof(TServiceType), proxy.Callback);
        }
public void Subscribe < TServiceType > ( SubscribeServiceCallback < TServiceType > callback ) { if ( callback == null ) { throw new ArgumentNullException ( " " ) ; } var proxy = new SubscribeProxy < TServiceType > ( callback ) ; Subscribe ( typeof ( TServiceType ) , proxy . Callback ) ; }
Calls back on the provided callback when someone has published the requested service.
Calls back on the provided callback when someone has published the requested service .
// Call the standard Subscribe method and use a generic proxy
If callback is null.
If callback is null .
callback
SubscribeServiceCallback<TServiceType>
A callback that will be invoked when the service is available.
A callback that will be invoked when the service is available .
typeparam
The type of service to subscribe.
The type of service to subscribe .