IDataCollector::Initialize Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Called by Test and Lab Manager to initialize the custom diagnostic data adapter.
Namespace: Microsoft.VisualStudio.TestTools.Execution
Assembly: Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)
void Initialize(
XmlElement^ configurationElement,
DataCollectionEvents^ events,
DataCollectionSink^ dataSink,
DataCollectionLogger^ logger,
AgentContext^ agentContext
)
Parameters
- configurationElement
- Type: System.Xml::XmlElement
An XmlElement object that contains configuration information for the diagnostic data adapter. Will be nullptr if no configuration information has been defined for it.
- events
- Type: Microsoft.VisualStudio.TestTools.Execution::DataCollectionEvents
A DataCollectionEvents object to contain the execution events that the custom diagnostic data adapter registers.
- dataSink
- Type: Microsoft.VisualStudio.TestTools.Execution::DataCollectionSink
The DataCollectionSink that the diagnostic data adapter uses to send its data.
- logger
- Type: Microsoft.VisualStudio.TestTools.Execution::DataCollectionLogger
A DataCollectionLogger object that the diagnostic data adapter uses to send warnings, errors, or other messages.
- agentContext
- Type: Microsoft.VisualStudio.TestTools.Execution::AgentContext
An AgentContext object with environmental settings for the remote environment.
The Initialize(XmlElement, DataCollectionEvents, DataCollectionSink, DataCollectionLogger) method should be implemented to perform the following tasks:
Assign the input parameter values to local class-level variables so that registered events can use them if and when needed.
Register the events that are relevant to the custom diagnostic data adapter's purpose.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Show: