Bewerken

Share via


UnescapedXmlDiagnosticData Class

Definition

Provides unescaped XML data for the logging of user-provided trace data.

public ref class UnescapedXmlDiagnosticData
public class UnescapedXmlDiagnosticData
type UnescapedXmlDiagnosticData = class
Public Class UnescapedXmlDiagnosticData
Inheritance
UnescapedXmlDiagnosticData

Examples

The following code example demonstrates how to use UnescapedXmlDiagnosticData class. This code example is part of a larger example that is provided for the EventSchemaTraceListener class.

string testString = "<Test><InnerElement Val=\"1\" /><InnerElement Val=\"Data\"/><AnotherElement>11</AnotherElement></Test>";
UnescapedXmlDiagnosticData unXData = new UnescapedXmlDiagnosticData(testString);
ts.TraceData(TraceEventType.Error, 38, unXData);
Dim testString As String = "<Test><InnerElement Val=""1"" /><InnerElement Val=""Data""/><AnotherElement>11</AnotherElement></Test>"
Dim unXData As New UnescapedXmlDiagnosticData(testString)
ts.TraceData(TraceEventType.Error, 38, unXData)

Remarks

This class is used by the TraceData methods. It can also be used to pass XML data to the TraceData methods.

Note

The user-provided data is not checked for schema validity.

Constructors

UnescapedXmlDiagnosticData(String)

Initializes a new instance of the UnescapedXmlDiagnosticData class by using the specified XML data string.

Properties

UnescapedXml

Gets or sets the unescaped XML data string.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string representation of the UnescapedXmlDiagnosticData object.

Applies to