private async Task RegisterAgent() { var model = new AgentRegistrationModel(); model.SessionId = _sessionId; model.HostName = Dns.GetHostName(); await _serverClient.Register(model); _connectionState = ServerConnectionStateEnum.Opened; }
public async Task Register(AgentRegistrationModel model) { var response = await _client.PostAsJsonAsync("api/agents", model); response.EnsureSuccessStatusCode(); }
public AgentModel Post([FromBody] AgentRegistrationModel model) { var data = _agentService.Create(AgentConverter.Convert(model)); return AgentConverter.Convert(data); }