DataCollector.Initialize Method
Called by the testing framework to initialize the internal objects and data for a custom diagnostic data adapter.
Namespace: Microsoft.VisualStudio.TestTools.Execution
Assembly: Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)
Syntax
'Declaration
Public MustOverride Sub Initialize ( _
configurationElement As XmlElement, _
events As DataCollectionEvents, _
dataSink As DataCollectionSink, _
logger As DataCollectionLogger, _
environmentContext As DataCollectionEnvironmentContext _
)
public abstract void Initialize(
XmlElement configurationElement,
DataCollectionEvents events,
DataCollectionSink dataSink,
DataCollectionLogger logger,
DataCollectionEnvironmentContext environmentContext
)
public:
virtual void Initialize(
XmlElement^ configurationElement,
DataCollectionEvents^ events,
DataCollectionSink^ dataSink,
DataCollectionLogger^ logger,
DataCollectionEnvironmentContext^ environmentContext
) abstract
abstract Initialize :
configurationElement:XmlElement *
events:DataCollectionEvents *
dataSink:DataCollectionSink *
logger:DataCollectionLogger *
environmentContext:DataCollectionEnvironmentContext -> unit
public abstract function Initialize(
configurationElement : XmlElement,
events : DataCollectionEvents,
dataSink : DataCollectionSink,
logger : DataCollectionLogger,
environmentContext : DataCollectionEnvironmentContext
)
Parameters
configurationElement
Type: XmlElementAn XmlElement that has test configuration data.
events
Type: Microsoft.VisualStudio.TestTools.Execution.DataCollectionEventsA DataCollectionEvents object that has the events for which your custom diagnostic data adapter can register.
dataSink
Type: Microsoft.VisualStudio.TestTools.Execution.DataCollectionSinkA DataCollectionSink object that your custom diagnostic data adapter can use to save files and data.
logger
Type: Microsoft.VisualStudio.TestTools.Execution.DataCollectionLoggerA DataCollectionLogger object that your custom diagnostic data adapter can use to log information during a test.
environmentContext
Type: Microsoft.VisualStudio.TestTools.Execution.DataCollectionEnvironmentContextA DataCollectionEnvironmentContext that has information about the context of the current test.
Remarks
When you create a custom diagnostic data adapter, you must implement this Initialize method, where you will register the events that you want to use.
.NET Framework Security
- 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.