DataCollector.Initialize 方法

由测试框架调用以初始化内部对象和自定义诊断数据适配器的数据。

命名空间:  Microsoft.VisualStudio.TestTools.Execution
程序集:  Microsoft.VisualStudio.QualityTools.ExecutionCommon(在 Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll 中)

语法

声明
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
)

参数

备注

当您创建自定义诊断数据适配器时,您必须实现此 Initialize 方法,您将在其中注册您要使用的事件。

.NET Framework 安全性

请参见

参考

DataCollector 类

Microsoft.VisualStudio.TestTools.Execution 命名空间

DataCollectionEvents

DataCollectionSink

DataCollectionLogger

DataCollectionEnvironmentContext