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); }
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); } }