public void SetNewClientConnection(string clientUsername, string url) { GrpcChannel channel = GrpcChannel.ForAddress(url); PuppetMasterClientService.PuppetMasterClientServiceClient client = new PuppetMasterClientService.PuppetMasterClientServiceClient(channel); clientSet.TryAdd(clientUsername, new Client(clientUsername, client)); SetNewPCSConnection(url); }
public Client(string username, PuppetMasterClientService.PuppetMasterClientServiceClient client) { Username = username ?? throw new ArgumentNullException("Client Username cannot be null."); Stub = client ?? throw new ArgumentNullException("Client cannot be null."); }