示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }