forked from dotnet/dotnet-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAddInEnvironment.xml
More file actions
115 lines (100 loc) · 7.28 KB
/
AddInEnvironment.xml
File metadata and controls
115 lines (100 loc) · 7.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<Type Name="AddInEnvironment" FullName="System.AddIn.Hosting.AddInEnvironment">
<TypeSignature Language="C#" Value="public sealed class AddInEnvironment" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit AddInEnvironment extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.AddIn.Hosting.AddInEnvironment" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class AddInEnvironment" />
<TypeSignature Language="F#" Value="type AddInEnvironment = class" />
<TypeSignature Language="C++ CLI" Value="public ref class AddInEnvironment sealed" />
<AssemblyInfo>
<AssemblyName>System.AddIn</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides access to the application domain and process of an add-in.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this class to load add-ins into a desired environment, which can be one of the following:
- An existing application domain for which you have the <xref:System.AppDomain> object.
- An application domain that was automatically generated to activate an add-in.
- An existing external process.
To obtain the <xref:System.AddIn.Hosting.AddInEnvironment> object for an add-in, pass the add-in's application domain to the <xref:System.AddIn.Hosting.AddInEnvironment> class constructor. Alternatively, you can use the <xref:System.AddIn.Hosting.AddInController.AddInEnvironment> property of the <xref:System.AddIn.Hosting.AddInController> class to obtain the add-in's <xref:System.AddIn.Hosting.AddInEnvironment> object.
After you obtain the <xref:System.AddIn.Hosting.AddInEnvironment> object, you can do the following:
- Pass that <xref:System.AddIn.Hosting.AddInEnvironment> object to the appropriate <xref:System.AddIn.Hosting.AddInToken.Activate*> method overload. The add-in will be activated in the application domain and process that is represented by the <xref:System.AddIn.Hosting.AddInEnvironment> object.
- Use the <xref:System.AddIn.Hosting.AddInEnvironment.Process> property to obtain an <xref:System.AddIn.Hosting.AddInProcess> object. Then pass that object to the appropriate <xref:System.AddIn.Hosting.AddInToken.Activate*> method overload. The add-in will be activated in the process that is represented by the <xref:System.AddIn.Hosting.AddInProcess> object but in a new application domain.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AddInEnvironment (AppDomain appDomain);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.AppDomain appDomain) cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Hosting.AddInEnvironment.#ctor(System.AppDomain)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (appDomain As AppDomain)" />
<MemberSignature Language="F#" Value="new System.AddIn.Hosting.AddInEnvironment : AppDomain -> System.AddIn.Hosting.AddInEnvironment" Usage="new System.AddIn.Hosting.AddInEnvironment appDomain" />
<MemberSignature Language="C++ CLI" Value="public:
 AddInEnvironment(AppDomain ^ appDomain);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="appDomain" Type="System.AppDomain" />
</Parameters>
<Docs>
<param name="appDomain">The application domain that contains the add-in.</param>
<summary>Initializes a new instance of the <see cref="T:System.AddIn.Hosting.AddInEnvironment" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you have access to the application domain that contains the add-in you need, you can use this constructor to obtain the add-in's <xref:System.AddIn.Hosting.AddInEnvironment> object. Otherwise, you can use the <xref:System.AddIn.Hosting.AddInController.AddInEnvironment> property of the <xref:System.AddIn.Hosting.AddInController> class to obtain the <xref:System.AddIn.Hosting.AddInEnvironment> object.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="appDomain" /> is <see langword="null" />.</exception>
<exception cref="T:System.Security.SecurityException">Full-trust permission is demanded. A caller in the call chain does not have sufficient permission.</exception>
</Docs>
</Member>
<Member MemberName="Process">
<MemberSignature Language="C#" Value="public System.AddIn.Hosting.AddInProcess Process { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.AddIn.Hosting.AddInProcess Process" />
<MemberSignature Language="DocId" Value="P:System.AddIn.Hosting.AddInEnvironment.Process" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Process As AddInProcess" />
<MemberSignature Language="F#" Value="member this.Process : System.AddIn.Hosting.AddInProcess" Usage="System.AddIn.Hosting.AddInEnvironment.Process" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::AddIn::Hosting::AddInProcess ^ Process { System::AddIn::Hosting::AddInProcess ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.AddIn.Hosting.AddInProcess</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.AddIn.Hosting.AddInProcess" /> object that represents the process in which the add-in is running.</summary>
<value>The process in which the add-in is running.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to activate multiple add-ins in the same process but in different domains.
Pass the <xref:System.AddIn.Hosting.AddInProcess> object obtained with this property to the appropriate <xref:System.AddIn.Hosting.AddInToken.Activate*> method overload.
If you want to activate them in the same domain in an external process you should pass the <xref:System.AddIn.Hosting.AddInEnvironment> object directly to the <xref:System.AddIn.Hosting.AddInToken.Activate``1(System.AddIn.Hosting.AddInEnvironment)?displayProperty=nameWithType> method overload.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>