AddInSegmentType Enumeration

AddInSegmentType Enumeration

Specifies the type of a pipeline segment.

Namespace:  System.AddIn.Hosting
Assembly:  System.AddIn (in System.AddIn.dll)

public enum AddInSegmentType

Member nameDescription
HostViewOfAddInSpecifies the host view of the add-in segment.
HostSideAdapterSpecifies a host-side adapter segment.
ContractSpecifies a contract segment.
AddInSideAdapterSpecifies an add-in-side adapter segment.
AddInViewSpecifies an add-in view segment.
AddInSpecifies an add-in segment.

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.

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


// 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.");


.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2016 Microsoft