Esempio n. 1
0
 protected XmlNodeBase(XObject @object, ElementNode parent, Options options) : base(parent)
 {
     Options = options;
     if (@object is XAttribute)
     {
         XmlType = XmlObjectType.Attribute;
         Attribute = @object.As<XAttribute>();
     }
     else if (@object is XElement)
     {
         XmlType = XmlObjectType.Element;
         Element = @object.As<XElement>();
     }
     else throw new XObjectNotSupportedException(@object);
 }
Esempio n. 2
0
 protected XmlNodeBase(XObject @object, ElementNode parent, Options options) : base(parent)
 {
     Options = options;
     if (@object is XAttribute)
     {
         XmlType   = XmlObjectType.Attribute;
         Attribute = @object.As <XAttribute>();
     }
     else if (@object is XElement)
     {
         XmlType = XmlObjectType.Element;
         Element = @object.As <XElement>();
     }
     else
     {
         throw new XObjectNotSupportedException(@object);
     }
 }