public HttpResponseMessage Post(AgentConfiguration agentConfiguration)
        {
            if (agentConfiguration == null)
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }

            if (agentConfiguration.IsValid() == false)
            {
                throw new HttpResponseException(HttpStatusCode.NotAcceptable);
            }

            this.agentConfigurationService.SaveAgentConfiguration(agentConfiguration);
            return new HttpResponseMessage(HttpStatusCode.NoContent);
        }
 public void SaveAgentConfiguration(AgentConfiguration agentConfiguration)
 {
     this.agentConfigurationDataAccessor.Store(agentConfiguration);
 }
 public void Store(AgentConfiguration agentConfiguration)
 {
     string json = JsonConvert.SerializeObject(agentConfiguration);
     File.WriteAllText(this.configurationFilePath, json, this.encodingProvider.GetEncoding());
 }