Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the type of a pipeline segment.
public enum class AddInSegmentType
public enum AddInSegmentType
type AddInSegmentType =
Public Enum AddInSegmentType
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. |
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.");
}
' Use qualification data to control
' how an add-in should be activated.
If selectedToken.QualificationData(AddInSegmentType.AddIn)("Isolation").Equals("NewProcess") Then
' Create an external process.
Dim external As AddInProcess = New AddInProcess
' Activate an add-in in an automatically generated
' application domain with a full trust security level.
Dim CalcAddin5 As Calculator =
selectedToken.Activate(Of 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.")
End If
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.
Product | Versions |
---|---|
.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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in