Пример #1
0
        public static ScriptElement Load(XElement xml, string filename)
        {
            FileDefinitionHelper.ValidateElementName(xml, ElementName);

            var result = new ScriptElement();

            result.DecodeAttributes(xml);
            result.DecodeValue(xml, filename);
            FileDefinitionHelper.ValidateAttribute(result.Name, ElementName, AttributeName);

            return(result);
        }
Пример #2
0
        public static DatasetElement Load(XElement xml)
        {
            FileDefinitionHelper.ValidateElementName(xml, ElementName);

            var result = new DatasetElement();

            result.DecodeAttributes(xml);
            result.DecodeData(xml);
            FileDefinitionHelper.ValidateAttribute(result.Name, ElementName, AttributeName);

            return(result);
        }