Exemplo n.º 1
0
        public static IServiceCollection UseXrpc(this IServiceCollection service,
                                                 bool logToConsole, LogType logType, params System.Reflection.Assembly[] assemblies)
        {
            XRpcSettingHandler settingHandler = new XRpcSettingHandler();

            settingHandler.Assemblies   = assemblies;
            settingHandler.LogToConsole = logToConsole;
            settingHandler.LogTypeInfo  = logType;
            settingHandler.Services     = service;
            service.AddSingleton <XRpcSettingHandler>(settingHandler);
            ServiceCollection services = new ServiceCollection();

            return(service.AddHostedService <XrpcServer>());
        }
Exemplo n.º 2
0
 public XrpcServer(XRpcSettingHandler handler)
 {
     _xRpcSettingHandler = handler;
 }