internal static PTXReaderState AnyState(PropertyTreeXmlReader r, XmlReader reader) { while (reader.Read()) { return ChooseState(reader); } return EOF; }
internal static PTXReaderState AnyState(PropertyTreeXmlReader r, XmlReader reader) { while (reader.Read()) { return(ChooseState(reader)); } return(EOF); }
// On element, after attributes public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { if (reader.IsEmptyElement) { r.PushState(PropertyNodeType.EndPropertyTree); return(AnyState(r, reader)); } return(AnyState(r, reader).Accept(r, reader)); }
public override void Load(TextReader reader, object instance) { if (reader == null) { throw new ArgumentNullException("reader"); } var ptx = PropertyTreeXmlReader.Create(reader); ptx.Bind(instance); }
public override object Load(TextReader reader, Type instanceType) { if (reader == null) { throw new ArgumentNullException("reader"); } var ptx = PropertyTreeXmlReader.Create(reader); return(ptx.Bind(instanceType)); }
internal bool MoveToNextAttribute(PropertyTreeXmlReader r, XmlReader reader) { while (reader.MoveToNextAttribute()) { if (IsXmlnsDefinition(reader)) { r.ExportNamespace(); } else { return(true); } } return(false); }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { r.PushState(PropertyNodeType.PropertyTree); if (MoveToFirstAttribute(r, reader)) { return(Attribute); } else if (reader.IsEmptyElement) { return(EndEmptyElement); } else { return(EndStartElement); } }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { r.PushState(PropertyNodeType.EndPropertyTree, PropertyNodeType.EndPropertyTree); if (r._elisionPosition > 0) { r._elisionPosition--; return(this); } if (MoveToNextAttribute(r, reader)) { return(PTXReaderState.Attribute); } else { reader.MoveToElement(); return(PTXReaderState.EndStartElement); } }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { if (r.PushState(PropertyNodeType.Property)) { r._elisionPosition++; return(this); } if (r._elisionPosition > 0) { // Don't repeat the property - but end all elided property trees r._elisionPosition--; return(PTXReaderState.EndAttributeElided); } if (MoveToNextAttribute(r, reader)) { return(this); } else { reader.MoveToElement(); return(PTXReaderState.EndStartElement); } }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { r.PushState(PropertyNodeType.Property); if (MoveToNextAttribute(r, reader)) { return this; } else { reader.MoveToElement(); return PTXReaderState.EndStartElement; } }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { r.PushState(PropertyNodeType.EndPropertyTree); return AnyState(r, reader); }
public abstract PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader);
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { throw new NotImplementedException(); }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { return(AnyState(r, reader).Accept(r, reader)); }
// On element, after attributes public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { if (reader.IsEmptyElement) { r.PushState(PropertyNodeType.EndPropertyTree); return AnyState(r, reader); } return AnyState(r, reader).Accept(r, reader); }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { r.PushState(PropertyNodeType.EndPropertyTree); return(AnyState(r, reader)); }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { r.PushState(PropertyNodeType.PropertyTree); if (MoveToFirstAttribute(r, reader)) return Attribute; else if (reader.IsEmptyElement) return EndEmptyElement; else return EndStartElement; }
internal bool MoveToFirstAttribute(PropertyTreeXmlReader r, XmlReader reader) { if (reader.MoveToFirstAttribute()) { if (IsXmlnsDefinition(reader)) { r.ExportNamespace(); return MoveToNextAttribute(r, reader); } else { return true; } } return false; }
public override PTXReaderState Accept(PropertyTreeXmlReader r, XmlReader reader) { return AnyState(r, reader).Accept(r, reader); }