Ejemplo n.º 1
0
 public OList(XmlFormatter formatter, XmlNode node, Dictionary <String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     foreach (XmlNode n in node.ChildNodes)
     {
         if (n.Name == "Element")
         {
             elements.Add(formatter.ParseNode(n, objects, errorCallback));
         }
     }
 }
Ejemplo n.º 2
0
 public Object(XmlFormatter formatter, XmlNode node, Dictionary <String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     foreach (XmlNode n in node.ChildNodes)
     {
         if (n.Name == "Member")
         {
             members.Add(n.Attributes["name"].Value, formatter.ParseNode(n, objects, errorCallback));
         }
     }
 }
Ejemplo n.º 3
0
 public ODictionary(XmlFormatter formatter, XmlNode node, Dictionary <String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     foreach (XmlNode n2 in node.ChildNodes)
     {
         if (n2.Name == "Element")
         {
             INode key = null, value = null;
             foreach (XmlNode n4 in n2.ChildNodes)
             {
                 if (n4.Name == "Key")
                 {
                     key = formatter.ParseNode(n4, objects, errorCallback);
                 }
                 if (n4.Name == "Value")
                 {
                     value = formatter.ParseNode(n4, objects, errorCallback);
                 }
             }
             elements.Add(new KeyValuePair <INode, INode>(key, value));
         }
     }
 }
Ejemplo n.º 4
0
            public OArray(XmlFormatter formatter, XmlNode node, Dictionary <String, INode> objects, ErrorHandler errorCallback)
                : base(formatter, node, objects, errorCallback)
            {
                String size = node.Attributes["size"].Value;

                String[] ss = size.Split(new string[] { ", " }, StringSplitOptions.None);
                sizes = new object[ss.Length];
                for (int i = 0; i < sizes.Length; i++)
                {
                    sizes[i] = int.Parse(ss[i], formatter.format);
                }
                foreach (XmlNode n in node.ChildNodes)
                {
                    if (n.Name == "Element")
                    {
                        elements.Add(formatter.ParseNode(n, objects, errorCallback));
                    }
                }
            }
 public OList(XmlFormatter formatter, XmlNode node, Dictionary<String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     foreach (XmlNode n in node.ChildNodes)
         if (n.Name == "Element")
             elements.Add(formatter.ParseNode(n, objects, errorCallback));
 }
 public ODictionary(XmlFormatter formatter, XmlNode node, Dictionary<String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     foreach (XmlNode n2 in node.ChildNodes)
     {
         if (n2.Name == "Element")
         {
             INode key = null, value = null;
             foreach (XmlNode n4 in n2.ChildNodes)
             {
                 if (n4.Name == "Key") key = formatter.ParseNode(n4, objects, errorCallback);
                 if (n4.Name == "Value") value = formatter.ParseNode(n4, objects, errorCallback);
             }
             elements.Add(new KeyValuePair<INode, INode>(key, value));
         }
     }
 }
 public Object(XmlFormatter formatter, XmlNode node, Dictionary<String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     foreach (XmlNode n in node.ChildNodes)
         if (n.Name == "Member")
             members.Add(n.Attributes["name"].Value, formatter.ParseNode(n, objects, errorCallback));
 }
 public OArray(XmlFormatter formatter, XmlNode node, Dictionary<String, INode> objects, ErrorHandler errorCallback)
     : base(formatter, node, objects, errorCallback)
 {
     String size = node.Attributes["size"].Value;
     String[] ss = size.Split(new string[] { ", " }, StringSplitOptions.None);
     sizes = new object[ss.Length];
     for (int i = 0; i < sizes.Length; i++) sizes[i] = int.Parse(ss[i], formatter.format);
     foreach (XmlNode n in node.ChildNodes)
         if (n.Name == "Element")
             elements.Add(formatter.ParseNode(n, objects, errorCallback));
 }