private async Task RegisterAgent()
        {
            var model = new AgentRegistrationModel();

            model.SessionId = _sessionId;
            model.HostName  = Dns.GetHostName();
            await _serverClient.Register(model);

            _connectionState = ServerConnectionStateEnum.Opened;
        }
Exemple #2
0
        public async Task Register(AgentRegistrationModel model)
        {
            var response = await _client.PostAsJsonAsync("api/agents", model);

            response.EnsureSuccessStatusCode();
        }
Exemple #3
0
 public AgentModel Post([FromBody] AgentRegistrationModel model)
 {
     var data = _agentService.Create(AgentConverter.Convert(model));
     return AgentConverter.Convert(data);
 }