Repository navigation
Expand file tree
/
Copy pathIContract.xml
More file actions
187 lines (176 loc) · 11.3 KB
/
Copy pathIContract.xml
File metadata and controls
187 lines (176 loc) · 11.3 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<Type Name="IContract" FullName="System.AddIn.Contract.IContract">
<TypeSignature Language="C#" Value="public interface IContract" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IContract" />
<TypeSignature Language="DocId" Value="T:System.AddIn.Contract.IContract" />
<TypeSignature Language="VB.NET" Value="Public Interface IContract" />
<TypeSignature Language="C++ CLI" Value="public interface class IContract" />
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces />
<Docs>
<summary>Represents the base interface for all contracts that are used for communication between components that are updated independently.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.AddIn.Contract.IContract> interface defines a contract that independently updated components, such as an application and an add-in, can use to communicate. Components can use <xref:System.AddIn.Contract.IContract> to communicate across process or application domain boundaries, or to communicate with other components in the same process or application domain. <xref:System.AddIn.Contract.IContract> serves a similar purpose for components created using the .NET Framework as the `IUnknown` interface serves for components created using COM. To determine whether an object implements a particular contract, use the <xref:System.AddIn.Contract.IContract.QueryContract%2A> method.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AcquireLifetimeToken">
<MemberSignature Language="C#" Value="public int AcquireLifetimeToken ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 AcquireLifetimeToken() cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Contract.IContract.AcquireLifetimeToken" />
<MemberSignature Language="VB.NET" Value="Public Function AcquireLifetimeToken () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 int AcquireLifetimeToken();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Specifies that the contract is accessible to a client until the client revokes the contract.</summary>
<returns>A value, also known as a lifetime token, that identifies the client that has acquired the contract.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Clients of an object that implements <xref:System.AddIn.Contract.IContract> call the <xref:System.AddIn.Contract.IContract.AcquireLifetimeToken%2A> method to notify the object that the client requires access to the contract. An <xref:System.AddIn.Contract.IContract> is guaranteed to be usable as long as at least one lifetime token that it passed to a client has not been revoked.
To revoke a contract, clients call the <xref:System.AddIn.Contract.IContract.RevokeLifetimeToken%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetRemoteHashCode">
<MemberSignature Language="C#" Value="public int GetRemoteHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetRemoteHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Contract.IContract.GetRemoteHashCode" />
<MemberSignature Language="VB.NET" Value="Public Function GetRemoteHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 int GetRemoteHashCode();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a hash code for the <see cref="T:System.AddIn.Contract.IContract" />.</summary>
<returns>A hash code for the <see cref="T:System.AddIn.Contract.IContract" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="QueryContract">
<MemberSignature Language="C#" Value="public System.AddIn.Contract.IContract QueryContract (string contractIdentifier);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.AddIn.Contract.IContract QueryContract(string contractIdentifier) cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Contract.IContract.QueryContract(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function QueryContract (contractIdentifier As String) As IContract" />
<MemberSignature Language="C++ CLI" Value="public:
 System::AddIn::Contract::IContract ^ QueryContract(System::String ^ contractIdentifier);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.AddIn.Contract.IContract</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="contractIdentifier" Type="System.String" />
</Parameters>
<Docs>
<param name="contractIdentifier">A string that identifies the contract that is being requested.</param>
<summary>Returns a contract that is implemented by this contract.</summary>
<returns>An <see cref="T:System.AddIn.Contract.IContract" /> that represents a contract that a client is requesting from the current contract; <see langword="null" /> if the current contract does not support the contract that is requested.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.AddIn.Contract.IContract.QueryContract%2A> method enables <xref:System.AddIn.Contract.IContract> objects to expose other contracts. <xref:System.AddIn.Contract.IContract.QueryContract%2A> serves a purpose similar to that of the `IUnknown.QueryInterface` method in COM.
The format of the strings used to identify contracts is defined by the <xref:System.AddIn.Contract.IContract> implementation. It is recommended that you use the <xref:System.Type.AssemblyQualifiedName%2A> of the contract that is being queried.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RemoteEquals">
<MemberSignature Language="C#" Value="public bool RemoteEquals (System.AddIn.Contract.IContract contract);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool RemoteEquals(class System.AddIn.Contract.IContract contract) cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Contract.IContract.RemoteEquals(System.AddIn.Contract.IContract)" />
<MemberSignature Language="VB.NET" Value="Public Function RemoteEquals (contract As IContract) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 bool RemoteEquals(System::AddIn::Contract::IContract ^ contract);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="contract" Type="System.AddIn.Contract.IContract" />
</Parameters>
<Docs>
<param name="contract">The contract to compare with this <see cref="T:System.AddIn.Contract.IContract" />.</param>
<summary>Indicates whether the specified contract is equal to this <see cref="T:System.AddIn.Contract.IContract" />.</summary>
<returns>
<see langword="true" /> if <paramref name="contract" /> is equal to this <see cref="T:System.AddIn.Contract.IContract" />; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RemoteToString">
<MemberSignature Language="C#" Value="public string RemoteToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string RemoteToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Contract.IContract.RemoteToString" />
<MemberSignature Language="VB.NET" Value="Public Function RemoteToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:
 System::String ^ RemoteToString();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a string representation of the current <see cref="T:System.AddIn.Contract.IContract" />.</summary>
<returns>A string representation of the current <see cref="T:System.AddIn.Contract.IContract" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RevokeLifetimeToken">
<MemberSignature Language="C#" Value="public void RevokeLifetimeToken (int token);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RevokeLifetimeToken(int32 token) cil managed" />
<MemberSignature Language="DocId" Value="M:System.AddIn.Contract.IContract.RevokeLifetimeToken(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub RevokeLifetimeToken (token As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:
 void RevokeLifetimeToken(int token);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.AddIn.Contract</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="token" Type="System.Int32" />
</Parameters>
<Docs>
<param name="token">A value, also known as a lifetime token, that identifies the client that is revoking the contract.</param>
<summary>Specifies that the contract is no longer accessible to a client.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Clients of an object that implements <xref:System.AddIn.Contract.IContract> call the <xref:System.AddIn.Contract.IContract.RevokeLifetimeToken%2A> method to notify the object that the client no longer needs the contract. An <xref:System.AddIn.Contract.IContract> is guaranteed to be usable as long as at least one lifetime token that it passed to a client has not been revoked.
To acquire a contract, clients call the <xref:System.AddIn.Contract.IContract.AcquireLifetimeToken%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>