public XamlBackgroundReader (XamlReader wrappedReader) { if (wrappedReader == null) throw new ArgumentNullException ("wrappedReader"); r = wrappedReader; q = new XamlNodeQueue (r.SchemaContext) { LineInfoProvider = r as IXamlLineInfo }; }
public void WriteNode (XamlReader reader) { if (reader == null) throw new ArgumentNullException ("reader"); switch (reader.NodeType) { case XamlNodeType.StartObject: WriteStartObject (reader.Type); break; case XamlNodeType.GetObject: WriteGetObject (); break; case XamlNodeType.EndObject: WriteEndObject (); break; case XamlNodeType.StartMember: WriteStartMember (reader.Member); break; case XamlNodeType.EndMember: WriteEndMember (); break; case XamlNodeType.Value: WriteValue (reader.Value); break; case XamlNodeType.NamespaceDeclaration: WriteNamespace (reader.Namespace); break; default: throw NotImplemented (); // documented behavior } }
public XamlNodeQueue (XamlSchemaContext schemaContext) { if (schemaContext == null) throw new ArgumentNullException ("schemaContext"); this.ctx = schemaContext; reader = new XamlNodeQueueReader (this); writer = new XamlNodeQueueWriter (this); }
public static Object Load (XamlReader xamlReader) { if (xamlReader == null) throw new ArgumentNullException ("xamlReader"); var w = new XamlObjectWriter (xamlReader.SchemaContext); Transform (xamlReader, w); return w.Result; }
public static void Transform (XamlReader xamlReader, XamlWriter xamlWriter, bool closeWriter) { if (xamlReader == null) throw new ArgumentNullException ("xamlReader"); if (xamlWriter == null) throw new ArgumentNullException ("xamlWriter"); if (xamlReader.NodeType == XamlNodeType.None) xamlReader.Read (); while (!xamlReader.IsEof) { xamlWriter.WriteNode (xamlReader); xamlReader.Read (); } if (closeWriter) xamlWriter.Close (); }
public static void Transform (XamlReader xamlReader, XamlWriter xamlWriter) { Transform (xamlReader, xamlWriter, true); }
internal XamlSubtreeReader (XamlReader source) { this.source = source; }
public abstract object Load(XamlReader xamlReader, IServiceProvider serviceProvider);
internal XamlSubtreeReader(XamlReader source) { this.source = source; }
public abstract object Load (XamlReader xamlReader, IServiceProvider serviceProvider);