// Token: 0x060020E4 RID: 8420 RVA: 0x00096EC8 File Offset: 0x000950C8
        public void WriteStartDocument()
        {
            if (this._closed)
            {
                throw new InvalidOperationException(SR.Get("BamlWriterClosed"));
            }
            if (this._startDocumentWritten)
            {
                throw new InvalidOperationException(SR.Get("BamlWriterStartDoc"));
            }
            XamlDocumentStartNode xamlDocumentNode = new XamlDocumentStartNode(0, 0, this._depth);

            this._bamlRecordWriter.WriteDocumentStart(xamlDocumentNode);
            this._startDocumentWritten = true;
            this.Push(BamlRecordType.DocumentStart);
        }
Пример #2
0
 /// <summary>
 /// Write the start of document record, giving the baml version string
 /// </summary>
 /// <remarks>
 /// This must be the first call made when creating a new baml file.  This
 /// is needed to specify the start of the document and baml version.
 /// </remarks>
 public void WriteStartDocument()
 {
     if (_closed)
     {
         throw new InvalidOperationException(SR.Get(SRID.BamlWriterClosed));
     }
     if (_startDocumentWritten)
     {
         throw new InvalidOperationException(SR.Get(SRID.BamlWriterStartDoc));
     }
     
     XamlDocumentStartNode node = new XamlDocumentStartNode(0,0,_depth);
     _bamlRecordWriter.WriteDocumentStart(node);
     _startDocumentWritten = true;
     Push(BamlRecordType.DocumentStart);
 }