コード例 #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;
        }
コード例 #3
0
 /// <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
ファイル: CompileTreeNode.cs プロジェクト: DBailey635/C1-CMS
        /// <exclude />
        public CompileTreeNode(XmlSourceNodeInformation xmlSourceNodeInformation)
        {
            _compilerId = _compilerIdCounter++;

            _xmlSourceNodeInformation = xmlSourceNodeInformation;
        }