Пример #1
0
        public object HandlePut(string fragmentExpression, IEnumerable <Selector> selectors, ExtractBodyDelegate extractBodyCallback)
        {
            var response   = new DynamicMBeanResource();
            var objectName = selectors.ExtractObjectName();

            var request = (XmlFragment <DynamicMBeanResource>)extractBodyCallback(typeof(XmlFragment <DynamicMBeanResource>));

            var values = _server.SetAttributes(objectName, request.Value.Property.Select(x => new AttributeValue(x.name, x.Deserialize())));

            response.Property = values.Select(x => new NamedGenericValueType(x.Name, x.Value)).ToArray();
            return(new XmlFragment <DynamicMBeanResource>(response));
        }