示例#1
0
        public RpcManager(RpcSteamListener steamListener, IConfiguration configuration)
        {
            var grpcServer = configuration.GetSection("Grpc").GetSection("SteamBots").GetSection("Client");

            var serverHost = grpcServer.GetSection("Host").Value;
            var serverPort = int.Parse(grpcServer.GetSection("Port").Value);

            _server = new Server
            {
                Services = { StatusChanged.BindService(steamListener) },
                Ports    = { new ServerPort(serverHost, serverPort, ServerCredentials.Insecure) }
            };
        }
示例#2
0
 public BotManager(RpcSteamListener rpcSteamListener, IRepoServiceFactory factory)
 {
     _botServiceRepo = factory.BotRepoService;
     rpcSteamListener.OnBotStatusChanged += RpcSteamListenerOnOnBotStatusChanged;
 }