Share via


DataCollectorMessageInfo Class

Represents an error message or warning message for diagnostic data adapters.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TestTools.Common.DataCollectorMessageInfo
    Microsoft.VisualStudio.TestTools.Common.DataCollectorExceptionMessageInfo

Namespace:  Microsoft.VisualStudio.TestTools.Common
Assembly:  Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class DataCollectorMessageInfo _
    Implements IXmlTestStore, IXmlTestStoreCustom
[SerializableAttribute]
public class DataCollectorMessageInfo : IXmlTestStore, 
    IXmlTestStoreCustom
[SerializableAttribute]
public ref class DataCollectorMessageInfo : IXmlTestStore, 
    IXmlTestStoreCustom
[<SerializableAttribute>]
type DataCollectorMessageInfo =  
    class 
        interface IXmlTestStore 
        interface IXmlTestStoreCustom 
    end
public class DataCollectorMessageInfo implements IXmlTestStore, IXmlTestStoreCustom

The DataCollectorMessageInfo type exposes the following members.

Constructors

  Name Description
Protected method DataCollectorMessageInfo Initializes a new instance of the DataCollectorMessageInfo class.

Top

Properties

  Name Description
Public property AgentName Gets or sets the display name of the agent for the data collector that sent the message.
Public property DataCollectorFriendlyName Gets or sets the name of the diagnostic data adapter that sent the message.
Public property DataCollectorUri Gets or sets the uniform resource identifier (URI) for the diagnostic data adapter that sent the message.
Protected property ElementName Gets the name of the tag to use to persist this object ("DataCollectorMessage").
Public property Level Gets or sets the severity level of the message.
Public property Text Gets or sets the text of the message.
Public property Timestamp Gets or sets the date and time that the message was created.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Load Loads the object from the provided XML element.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method Save Saves this object under the provided XML element.
Public method ToString Returns a string representation of the message and its properties. (Overrides Object.ToString.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IXmlTestStore.Load Loads the object from the provided XML element.
Explicit interface implemetationPrivate method IXmlTestStore.Save Saves this object under the provided XML element.
Explicit interface implemetationPrivate property IXmlTestStoreCustom.ElementName Gets the name of the tag to use to persist this object.
Explicit interface implemetationPrivate property IXmlTestStoreCustom.NamespaceUri Gets the XML namespace to use to store the element.

Top

Remarks

Although this class can be used in your custom diagnostic data adapter, it is instantiated and populated only by the Visual Studio Professional 2012 testing framework.

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.TestTools.Common Namespace

IXmlTestStore

IXmlTestStoreCustom

DataCollectionLogger

Other Resources

Creating a Diagnostic Data Adapter to Collect Custom Data or Affect a Test Machine