public ZaabyServer AddHostedService <THostedService>(ZaabyServer zaabyServer, Func <IServiceProvider, THostedService> implementationFactory) where THostedService : class, IHostedService { TryAddEnumerable(ServiceDescriptor.Singleton <IHostedService>(implementationFactory)); return(zaabyServer); }
public static IZaabyServer GetInstance() { if (_zaabyServer == null) { lock (LockObj) { if (_zaabyServer == null) { _zaabyServer = new ZaabyServer(); } } } return(_zaabyServer); }
public static ZaabyServer UseZaabyClient(this ZaabyServer zaabyServer, Type serviceDefineType, Dictionary <string, List <string> > baseUrls) => zaabyServer.ConfigureServices(services => { services.UseZaabyClient(serviceDefineType, baseUrls); });
public ZaabyServer AddHostedService <THostedService>(ZaabyServer zaabyServer) where THostedService : class, IHostedService { TryAddEnumerable(ServiceDescriptor.Singleton <IHostedService, THostedService>()); return(zaabyServer); }
public static ZaabyServer FromAssemblyNames(this ZaabyServer server, params AssemblyName[] assemblyNames) { LoadHelper.FromAssemblyNames(assemblyNames); return(server); }
public static ZaabyServer FromAssemblyOf <T>(this ZaabyServer server) { LoadHelper.FromAssemblyOf <T>(); return(server); }
public static ZaabyServer FromAssemblyOf(this ZaabyServer server, params Type[] types) { LoadHelper.FromAssemblyOf(types); return(server); }
public static ZaabyServer FromAssemblyOf <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(this ZaabyServer server) { LoadHelper.FromAssemblyOf <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(); return(server); }