Close() private method

private Close ( WriteState currentState ) : void
currentState WriteState
return void
        public override void Close()
        {
            _wrapped.Close();

            if (_checkWellFormedDoc && !_hasDocElem)
            {
                // Need at least one document element
                throw new XmlException(SR.Xml_NoRoot, string.Empty);
            }
        }
Example #2
0
 public override void Close()
 {
     // Flush any cached events to an Xml writer
     EnsureWrappedWriter(XmlOutputMethod.Xml);
     _wrapped.Close();
 }