Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UnescapedXmlDiagnosticData Class

 

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

Namespace:   System.Diagnostics
Assembly:  System.Core (in System.Core.dll)

System.Object
  System.Diagnostics.UnescapedXmlDiagnosticData

<HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort := True)>
Public Class UnescapedXmlDiagnosticData

NameDescription
System_CAPS_pubmethodUnescapedXmlDiagnosticData(String)

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

NameDescription
System_CAPS_pubpropertyUnescapedXml

Gets or sets the unescaped XML data string.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string representation of the UnescapedXmlDiagnosticData object.(Overrides Object.ToString().)

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

System_CAPS_noteNote

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

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.

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)

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2017 Microsoft