-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
IParameterInspector.xml
211 lines (175 loc) · 14.4 KB
/
IParameterInspector.xml
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<Type Name="IParameterInspector" FullName="System.ServiceModel.Dispatcher.IParameterInspector">
<TypeSignature Language="C#" Value="public interface IParameterInspector" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IParameterInspector" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<TypeSignature Language="DocId" Value="T:System.ServiceModel.Dispatcher.IParameterInspector" />
<TypeSignature Language="VB.NET" Value="Public Interface IParameterInspector" />
<TypeSignature Language="F#" Value="type IParameterInspector = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IParameterInspector" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IParameterInspector" FrameworkAlternate="net-8.0" />
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.6.0.0</AssemblyVersion>
<AssemblyVersion>4.7.0.0</AssemblyVersion>
<AssemblyVersion>4.9.0.0</AssemblyVersion>
<AssemblyVersion>4.10.0.0</AssemblyVersion>
<AssemblyVersion>4.10.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>6.2.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Private.ServiceModel</AssemblyName>
<AssemblyVersion>4.10.3.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.ServiceModel" FromVersion="4.0.0.0" To="System.ServiceModel.Primitives" ToVersion="0.0.0.0" FrameworkAlternate="dotnet-uwp-10.0" />
</TypeForwardingChain>
<Interfaces />
<Docs>
<summary>Defines the contract implemented by custom parameter inspectors that enables inspection or modification of information prior to and subsequent to calls on either the client or the service.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Implement the <xref:System.ServiceModel.Dispatcher.IParameterInspector> interface to create a custom parameter inspector that can view and modify the contents of a call both before the call and after the call in either client or service applications.
On outbound calls from a client, the inspector is invoked before the request contents are serialized and sent to the service. The inspector is also called after the response has been deserialized but before the return values have been dispatched to the proxy method.
On inbound calls to a service, the inspector is invoked after parameters are deserialized but before they are dispatched to the service operation.
Use the <xref:System.ServiceModel.Dispatcher.ClientOperation.ParameterInspectors%2A?displayProperty=nameWithType> or the <xref:System.ServiceModel.Dispatcher.DispatchOperation.ParameterInspectors%2A?displayProperty=nameWithType> properties to add an <xref:System.ServiceModel.Dispatcher.IParameterInspector> implementation to the inspectors collection for a particular operation.
**Note** Developers and administrators must ensure that the interaction with other <xref:System.ServiceModel.Dispatcher.IParameterInspector> implementations is understood.
## Examples
The following code example shows an <xref:System.ServiceModel.Dispatcher.IParameterInspector> implementation that:
- Writes the operation name and return value to the console after a response has been deserialized by the service or a request has been serialized by a client.
- Writes the operation name to the console after deserializing a response on the client or after a response has been serialized on the service.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet4":::
The following code example shows how to use either <xref:System.ServiceModel.Description.IOperationBehavior?displayProperty=nameWithType>, <xref:System.ServiceModel.Description.IEndpointBehavior?displayProperty=nameWithType> or <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> to insert <xref:System.ServiceModel.Dispatcher.IParameterInspector> objects.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet5":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AfterCall">
<MemberSignature Language="C#" Value="public void AfterCall (string operationName, object[] outputs, object returnValue, object correlationState);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void AfterCall(string operationName, object[] outputs, object returnValue, object correlationState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.Dispatcher.IParameterInspector.AfterCall(System.String,System.Object[],System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub AfterCall (operationName As String, outputs As Object(), returnValue As Object, correlationState As Object)" />
<MemberSignature Language="F#" Value="abstract member AfterCall : string * obj[] * obj * obj -> unit" Usage="iParameterInspector.AfterCall (operationName, outputs, returnValue, correlationState)" />
<MemberSignature Language="C++ CLI" Value="public:
 void AfterCall(System::String ^ operationName, cli::array <System::Object ^> ^ outputs, System::Object ^ returnValue, System::Object ^ correlationState);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Private.ServiceModel</AssemblyName>
<AssemblyVersion>4.10.3.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="operationName" Type="System.String" />
<Parameter Name="outputs" Type="System.Object[]" />
<Parameter Name="returnValue" Type="System.Object" />
<Parameter Name="correlationState" Type="System.Object" />
</Parameters>
<Docs>
<param name="operationName">The name of the invoked operation.</param>
<param name="outputs">Any output objects.</param>
<param name="returnValue">The return value of the operation.</param>
<param name="correlationState">Any correlation state returned from the <see cref="M:System.ServiceModel.Dispatcher.IParameterInspector.BeforeCall(System.String,System.Object[])" /> method, or <see langword="null" />.</param>
<summary>Called after client calls are returned and before service responses are sent.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
On outbound calls from a client, the inspector is invoked before the request contents are serialized and sent to the service. The inspector is also called after the response has been deserialized but before the return values have been dispatched to the proxy method.
On inbound calls to a service, the inspector is invoked after parameters are deserialized but before they are dispatched to the service operation.
## Examples
The following code example shows an <xref:System.ServiceModel.Dispatcher.IParameterInspector> implementation that:
- Writes the operation name and return value to the console after a response has been deserialized by the service or a request has been serialized by a client.
- Writes the operation name to the console after deserializing a response on the client or after a response has been serialized on the service.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet4":::
The following code example shows how to use either <xref:System.ServiceModel.Description.IOperationBehavior?displayProperty=nameWithType>, <xref:System.ServiceModel.Description.IEndpointBehavior?displayProperty=nameWithType>, or <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> to insert <xref:System.ServiceModel.Dispatcher.IParameterInspector> objects.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet5":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BeforeCall">
<MemberSignature Language="C#" Value="public object BeforeCall (string operationName, object[] inputs);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object BeforeCall(string operationName, object[] inputs) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.Dispatcher.IParameterInspector.BeforeCall(System.String,System.Object[])" />
<MemberSignature Language="VB.NET" Value="Public Function BeforeCall (operationName As String, inputs As Object()) As Object" />
<MemberSignature Language="F#" Value="abstract member BeforeCall : string * obj[] -> obj" Usage="iParameterInspector.BeforeCall (operationName, inputs)" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Object ^ BeforeCall(System::String ^ operationName, cli::array <System::Object ^> ^ inputs);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Private.ServiceModel</AssemblyName>
<AssemblyVersion>4.10.3.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="operationName" Type="System.String" />
<Parameter Name="inputs" Type="System.Object[]" />
</Parameters>
<Docs>
<param name="operationName">The name of the operation.</param>
<param name="inputs">The objects passed to the method by the client.</param>
<summary>Called before client calls are sent and after service responses are returned.</summary>
<returns>The correlation state that is returned as the <paramref name="correlationState" /> parameter in <see cref="M:System.ServiceModel.Dispatcher.IParameterInspector.AfterCall(System.String,System.Object[],System.Object,System.Object)" />. Return <see langword="null" /> if you do not intend to use correlation state.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
On outbound calls from a client, the inspector is invoked before the request contents are serialized and sent to the service. The inspector is also called after the response has been deserialized but before the return values have been dispatched to the proxy method.
On inbound calls to a service, the inspector is invoked after the request contents are deserialized and dispatched to the service operation and before the response contents are serialized and sent to the client.
## Examples
The following code example shows an <xref:System.ServiceModel.Dispatcher.IParameterInspector> implementation that:
- Writes the operation name and return value to the console after a response has been deserialized by the service or a request has been serialized by a client.
- Writes the operation name to the console after deserializing a response on the client or after a response is serialized on the service.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/interceptors.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/interceptors.vb" id="Snippet4":::
The following code example shows how to use either <xref:System.ServiceModel.Description.IOperationBehavior?displayProperty=nameWithType>, <xref:System.ServiceModel.Description.IEndpointBehavior?displayProperty=nameWithType> or <xref:System.ServiceModel.Description.IServiceBehavior?displayProperty=nameWithType> to insert <xref:System.ServiceModel.Dispatcher.IParameterInspector> objects.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/interceptors/cs/insertingbehaviors.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/interceptors/vb/insertingbehaviors.vb" id="Snippet5":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>