System.Data.Common.CommandTrees.DbCommandTree.Dump(System.Data.Common.CommandTrees.Internal.ExpressionDumper)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.DbCommandTree.Dump(System.Data.Common.CommandTrees.Internal.ExpressionDumper) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: referencesource
Source File: DbCommandTree.cs
View license
internal string DumpXml()
        {
            //
            // This is a convenience method that dumps the command tree in an XML format.
            // This is intended primarily as a debugging aid to allow inspection of the tree structure.
            //
            // Create a new MemoryStream that the XML dumper should write to.
            //
            MemoryStream stream = new MemoryStream();

            //
            // Create the dumper
            //
            XmlExpressionDumper dumper = new XmlExpressionDumper(stream);

            //
            // Dump this tree and then close the XML dumper so that the end document tag is written
            // and the output is flushed to the stream.
            //
            this.Dump(dumper);
            dumper.Close();

            //
            // Construct a string from the resulting memory stream and return it to the caller
            //
            return XmlExpressionDumper.DefaultEncoding.GetString(stream.ToArray());
        }