Čítať v angličtine Upraviť

Zdieľať cez


AddInSegmentType Enum

Definition

Specifies the type of a pipeline segment.

C#
public enum AddInSegmentType
Inheritance
AddInSegmentType

Fields

Name Value Description
HostViewOfAddIn 0

Specifies the host view of the add-in segment.

HostSideAdapter 1

Specifies a host-side adapter segment.

Contract 2

Specifies a contract segment.

AddInSideAdapter 3

Specifies an add-in-side adapter segment.

AddInView 4

Specifies an add-in view segment.

AddIn 5

Specifies an add-in segment.

Examples

The following example uses the AddInSegmentType enumeration to evaluate an add-in's qualification data.

C#
// Use qualification data to control
// how an add-in should be activated.

if (selectedToken.QualificationData[AddInSegmentType.AddIn]["Isolation"].Equals("NewProcess"))
{
    // Create an external process.
    AddInProcess external = new AddInProcess();

    // Activate an add-in in the new process
    // with the full trust security level.
    Calculator CalcAddIn5 =
        selectedToken.Activate<Calculator>(external,
        AddInSecurityLevel.FullTrust);
    Console.WriteLine("Add-in activated per qualification data.");
}
else
{
    Console.WriteLine("This add-in is not designated to be activated in a new process.");
}

Remarks

In this context, the type of a pipeline segment identifies the category of pipeline segment: add-in, add-in-side adapter, add-in view, contract, host-side adapter, or the host view of the add-in. If a pipeline segment's class has a QualificationDataAttribute attribute, you can obtain the data specified in the attribute with the QualificationData property of an AddInToken object.

Applies to

Produkt Verzie
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1