예제 #1
0
 public FormCompileException(string message, XmlSourceNodeInformation xmlInformation, XmlSourceNodeInformation propertyXmlInformation, XmlSourceNodeInformation extraPropertyXmlInformation)
     : base(message)
 {
     _xmlInformation = xmlInformation;
     _propertyXmlInformation = propertyXmlInformation;
     _extraPropertyXmlInformation = extraPropertyXmlInformation;
 }
예제 #2
0
        public static ElementCompileTreeNode BuildRec(XElement element)
        {
            int depth = element.Ancestors().Count();

            var debugInfo = new XmlSourceNodeInformation(depth, element.Name.LocalName, element.Name.LocalName, element.Name.NamespaceName);

            var result = new ElementCompileTreeNode(debugInfo);
            foreach (var attribute in element.Attributes())
            {
                if (attribute.Name.LocalName == "xmlns") continue;

                bool isNamespaceDeclaration = attribute.Name.Namespace == "http://www.w3.org/2000/xmlns/";

                var property = new PropertyCompileTreeNode(attribute.Name.LocalName, debugInfo, isNamespaceDeclaration);
                property.Value = StringResourceSystemFacade.ParseString(attribute.Value);

                result.AddNamedProperty(property);
            }

            foreach (var node in element.Nodes())
            {
                if (node is XElement)
                {
                    result.Children.Add(BuildRec(node as XElement));
                    continue;
                }

                if (node is XText)
                {
                    string text = (node as XText).Value;

                    if (string.IsNullOrWhiteSpace(text))
                    {
                        continue;
                    }

                    var textProperty = new PropertyCompileTreeNode(CompilerGlobals.DefaultPropertyName, debugInfo);
                    textProperty.Value = StringResourceSystemFacade.ParseString(text);

                    result.DefaultProperties.Add(textProperty);
                    continue;
                }
            }

            return result;
        }
 /// <exclude />
 public PropertyCompileTreeNode(string name, XmlSourceNodeInformation sourceInformation, bool isNamespaceDeclaration = false)
     : base(sourceInformation)
 {
     _name = name;
     IsNamespaceDeclaration = isNamespaceDeclaration;
 }
예제 #4
0
 public FormCompileException(string message, XmlSourceNodeInformation xmlInformation, Exception inner)
     : base(message, inner)
 {
     _xmlInformation = xmlInformation;
 }
예제 #5
0
 /// <exclude />
 public PropertyCompileTreeNode(string name, XmlSourceNodeInformation sourceInformation, bool isNamespaceDeclaration = false)
     : base(sourceInformation)
 {
     _name = name;
     IsNamespaceDeclaration = isNamespaceDeclaration;
 }
예제 #6
0
 /// <exclude />
 public ElementCompileTreeNode(XmlSourceNodeInformation sourceInformation)
     : base(sourceInformation)
 {
 }
예제 #7
0
 /// <exclude />
 public ElementCompileTreeNode(XmlSourceNodeInformation sourceInformation)
     : base(sourceInformation)
 {
 }
예제 #8
0
        /// <exclude />
        public CompileTreeNode(XmlSourceNodeInformation xmlSourceNodeInformation)
        {
            _compilerId = _compilerIdCounter++;

            _xmlSourceNodeInformation = xmlSourceNodeInformation;
        }
예제 #9
0
        /// <exclude />
        public CompileTreeNode(XmlSourceNodeInformation xmlSourceNodeInformation)
        {
            _compilerId = _compilerIdCounter++;

            _xmlSourceNodeInformation = xmlSourceNodeInformation;
        }