src/Misc/EFTools/XmlCore/Core/Context/ServiceManager.cs
/// <summary>
///     Publishes the given service.  Once published, the service instance remains in the
///     service collection until the editing context is disposed.
/// </summary>
/// <typeparam name="ServiceType">The type of service to publish.</typeparam>
/// <param name="serviceInstance">The instance of the service to publish.</param>
/// <exception cref="ArgumentException">If ServiceType has already been published.</exception>
Publishes the given service.  Once published, the service instance remains in the
service collection until the editing context is disposed.
Publishes the given service . Once published the service instance remains in the service collection until the editing context is disposed .
public void Publish<TServiceType>(TServiceType serviceInstance)
        {
            if (serviceInstance == null)
            {
                throw new ArgumentNullException("serviceInstance");
            }
            Publish(typeof(TServiceType), serviceInstance);
        }
public void Publish < TServiceType > ( TServiceType serviceInstance ) { if ( serviceInstance == null ) { throw new ArgumentNullException ( " " ) ; } Publish ( typeof ( TServiceType ) , serviceInstance ) ; }
Publishes the given service.
Publishes the given service .
If ServiceType has already been published.
If ServiceType has already been published .
serviceInstance
TServiceType
The instance of the service to publish.
The instance of the service to publish .
typeparam
The type of service to publish.
The type of service to publish .