src/Tiantianquan.Common/Tiantianquan.Common/Dependency/ObjectContainer.cs
/// <summary>Register a implementer type instance as a service implementation.
/// </summary>
/// <typeparam name="TService">The service type.</typeparam>
/// <typeparam name="TImplementer">The implementer type.</typeparam>
/// <param name="instance">The implementer type instance.</param>
/// <param name="serviceName">The service name.</param>
Register a implementer type instance as a service implementation.
Register a implementer type instance as a service implementation .
public static void RegisterInstance<TService, TImplementer>(TImplementer instance, string serviceName = null)
            where TService : class
            where TImplementer : class, TService
        {
            Current.RegisterInstance<TService, TImplementer>(instance, serviceName);
        }
public static void RegisterInstance < TService , TImplementer > ( TImplementer instance , string serviceName = null ) where TService : class where TImplementer : class , TService { Current . RegisterInstance < TService , TImplementer > ( instance , serviceName ) ; }
Register a implementer type instance as a service implementation.
Register a implementer type instance as a service implementation .
instance
TImplementer
The implementer type instance.
The implementer type instance .
serviceName
string
The service name.
The service name .
typeparam
The service type.
The service type .
typeparam
The implementer type.
The implementer type .