/// <summary> /// Writes the contents of a binary loyc file to the current output stream. /// </summary> /// <param name="Nodes"></param> public void WriteFileContents(IReadOnlyList <LNode> Nodes) { using (var memStream = new MemoryStream()) using (var childWriter = new LoycBinaryWriter(memStream, this)) { var state = new WriterState(); childWriter.WriteList(Nodes, node => childWriter.WritePrefixedNode(state, node)); memStream.Seek(0, SeekOrigin.Begin); WriteHeader(state); memStream.CopyTo(Writer.BaseStream); } }
/// <summary> /// Writes a call node template definition. /// </summary> /// <param name="Writer"></param> public override void Write(LoycBinaryWriter Writer) { Writer.Writer.Write(TargetSymbolIndex); Writer.WriteList(ArgumentTypes, Writer.WriteEncodingType); }
/// <summary> /// Writes an attribute list node template definition. /// </summary> /// <param name="Writer"></param> public override void Write(LoycBinaryWriter Writer) { Writer.WriteList(ArgumentTypes, Writer.WriteEncodingType); }