Core/CafeLib.Core.IoC/ServiceRegistry.cs
/// <summary>
/// Register service as a singleton.
/// </summary>
/// <typeparam name="TService">service type</typeparam>
/// <typeparam name="TImpl">service implementation type</typeparam>
/// <returns>service registry</returns>
Register service as a singleton.
Register service as a singleton .
public IServiceRegistry AddSingleton<TService, TImpl>() where TService : class where TImpl : class, TService
        {
            _serviceContainer.RegisterSingleton<TService, TImpl>();
            return this;
        }
public IServiceRegistry AddSingleton < TService , TImpl > ( ) where TService : class where TImpl : class , TService { _serviceContainer . RegisterSingleton < TService , TImpl > ( ) ; return this ; }
Register service as a singleton.
Register service as a singleton .
None
typeparam
None
typeparam
service implementation type
service implementation type