public void Post(UpdateNamedConfiguration request) { var key = GetPathValue(2); var configurationType = _configurationManager.GetConfigurationType(key); var configuration = _jsonSerializer.DeserializeFromStream(request.RequestStream, configurationType); _configurationManager.SaveConfiguration(key, configuration); }
public async Task Post(UpdateNamedConfiguration request) { var key = GetPathValue(2); var configurationType = _configurationManager.GetConfigurationType(key); var configuration = await _jsonSerializer.DeserializeFromStreamAsync(request.RequestStream, configurationType).ConfigureAwait(false); _configurationManager.SaveConfiguration(key, configuration); }
public void Post(UpdateNamedConfiguration request) { var pathInfo = PathInfo.Parse(Request.PathInfo); var key = pathInfo.GetArgumentValue <string>(2); var configurationType = _configurationManager.GetConfigurationType(key); var configuration = _jsonSerializer.DeserializeFromStream(request.RequestStream, configurationType); _configurationManager.SaveConfiguration(key, configuration); }