Bagikan melalui


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: XmlElement

    An XmlElement that has test configuration data.

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

See Also

Reference

DataCollector Class

Microsoft.VisualStudio.TestTools.Execution Namespace

DataCollectionEvents

DataCollectionSink

DataCollectionLogger

DataCollectionEnvironmentContext