System.Configuration.XmlUtilWriter.Flush C# (CSharp) Метод

Flush() приватный Метод

private Flush ( ) : void
Результат void
        internal void Flush() {
            _writer.Flush();
        }

Usage Example

Пример #1
0
        //
        // Copy a configuration section to a string, and advance the reader.
        //
        internal string CopySection()
        {
            ResetCachedStringWriter();

            // Preserve whitespace for sections for backcompat
            WhitespaceHandling originalHandling = _reader.WhitespaceHandling;

            _reader.WhitespaceHandling = WhitespaceHandling.All;

            // Create string writer to write to
            XmlUtilWriter utilWriter = new XmlUtilWriter(_cachedStringWriter, false);

            // Copy the element
            CopyElement(utilWriter);

            // Reset whitespace handling
            _reader.WhitespaceHandling = originalHandling;

            if ((originalHandling == WhitespaceHandling.None) &&
                (Reader.NodeType == XmlNodeType.Whitespace))
            {
                // If we were previously suppose to skip whitespace, and now we
                // are at it, then lets jump to the next item
                _reader.Read();
            }

            utilWriter.Flush();
            string s = ((StringWriter)utilWriter.Writer).ToString();

            return(s);
        }
All Usage Examples Of System.Configuration.XmlUtilWriter::Flush