QualificationDataItem.Segment 属性

定义

获取一个值,该值标识限定数据项所应用到的管线段。Gets a value that identifies the pipeline segment the qualification data item was applied to.

public:
 property System::AddIn::Hosting::AddInSegmentType Segment { System::AddIn::Hosting::AddInSegmentType get(); };
public System.AddIn.Hosting.AddInSegmentType Segment { get; }
member this.Segment : System.AddIn.Hosting.AddInSegmentType
Public ReadOnly Property Segment As AddInSegmentType

属性值

数据项所应用到的管线段的类型。The kind of pipeline segment the data item was applied to.

示例

下面的示例列出了与标记集合中的每个AddInToken关联的管道段的限定数据。The following example lists the qualification data for the pipeline segments associated with each AddInToken in a collection of tokens. Segment属性用于显示段的种类。The Segment property is used to display the kind of segment.

// Show the qualification data for each
// token in an AddInToken collection.
foreach (AddInToken token in tokens)
{
    foreach (QualificationDataItem qdi in token)
    {
        Console.WriteLine("{0} {1}\n\t QD Name: {2}, QD Value: {3}",
            token.Name,
            qdi.Segment, 
            qdi.Name, 
            qdi.Value);
    }
}

' Show the qualification data for each
' token in an AddInToken collection.
For Each token As AddInToken In tokens
    For Each qdi As QualificationDataItem In token
        Console.WriteLine("{0} {1}\n\t QD Name: {2}, QD Value: {3}", _
            token.Name, qdi.Segment, qdi.Name, qdi.Value)
    Next
Next

注解

枚举限定数据时, 请使用此属性来标识属于特定管道段的限定数据。When you enumerate qualification data, use this property to identify the qualification data that belongs to a particular segment of the pipeline.

备注

外接程序模型不使用应用于外接程序的宿主视图的限定数据。The add-in model does not use qualification data that is applied to the host view of the add-in. 因此, 枚举限定数据时, 将找不到任何Segment属性为HostViewOfAddIn的项。As a result, when you enumerate qualification data you will not find any items whose Segment property is HostViewOfAddIn.

适用于