Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
913 lines (837 sloc) 57.9 KB
<Type Name="OperationContext" FullName="System.ServiceModel.OperationContext">
<TypeSignature Language="C#" Value="public sealed class OperationContext : System.ServiceModel.IExtensibleObject&lt;System.ServiceModel.OperationContext&gt;" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit OperationContext extends System.Object implements class System.ServiceModel.IExtensibleObject`1&lt;class System.ServiceModel.OperationContext&gt;" />
<TypeSignature Language="DocId" Value="T:System.ServiceModel.OperationContext" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class OperationContext&#xA;Implements IExtensibleObject(Of OperationContext)" />
<TypeSignature Language="C++ CLI" Value="public ref class OperationContext sealed : System::ServiceModel::IExtensibleObject&lt;System::ServiceModel::OperationContext ^&gt;" />
<TypeSignature Language="F#" Value="type OperationContext = class&#xA; interface IExtensibleObject&lt;OperationContext&gt;" />
<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.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ServiceModel.IExtensibleObject&lt;System.ServiceModel.OperationContext&gt;</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Provides access to the execution context of a service method.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.OperationContext> from within a service operation to access the current operation execution environment. In particular, the operation context is used to access callback channels in duplex services, to store extra state data across portions of the operations, and to access incoming message headers and properties as well as add outgoing message headers and properties.
For more information about using extensions to store state data, see [Extensible Objects](~/docs/framework/wcf/extending/extensible-objects.md).
The <xref:System.ServiceModel.OperationContext> has the following properties and methods.
- The <xref:System.ServiceModel.OperationContext.Current%2A> property returns the <xref:System.ServiceModel.OperationContext> object representing the current execution context.
- The <xref:System.ServiceModel.OperationContext.ServiceSecurityContext%2A> property returns the security environment under which the method executes.
- The <xref:System.ServiceModel.OperationContext.EndpointDispatcher%2A> property gets the operation's <xref:System.ServiceModel.Dispatcher.EndpointDispatcher?displayProperty=nameWithType>.
- The <xref:System.ServiceModel.OperationContext.Extensions%2A> property returns an extension collection for the current <xref:System.ServiceModel.OperationContext>.
- The <xref:System.ServiceModel.OperationContext.Host%2A> property returns the <xref:System.ServiceModel.ServiceHostBase> object that manages the service.
- The <xref:System.ServiceModel.OperationContext.HasSupportingTokens%2A> property returns a value that indicates whether the method has supporting tokens, if so, the <xref:System.ServiceModel.OperationContext.SupportingTokens%2A> property gets them.
- The <xref:System.ServiceModel.OperationContext.IncomingMessageHeaders%2A>, <xref:System.ServiceModel.OperationContext.IncomingMessageProperties%2A>, and <xref:System.ServiceModel.OperationContext.IncomingMessageVersion%2A> properties get these items from the incoming message.
- The <xref:System.ServiceModel.OperationContext.OperationCompleted> event is fired when the operation has completed.
- The <xref:System.ServiceModel.OperationContext.OutgoingMessageHeaders%2A> and <xref:System.ServiceModel.OperationContext.OutgoingMessageProperties%2A> properties get these items for the outbound message.
- The <xref:System.ServiceModel.OperationContext.RequestContext%2A> property returns the <xref:System.ServiceModel.Channels.RequestContext> implementation for the method.
- The <xref:System.ServiceModel.OperationContext.InstanceContext%2A> property returns the <xref:System.ServiceModel.InstanceContext> associated with the operation.
- The <xref:System.ServiceModel.OperationContext.SessionId%2A> property returns the session identifier for the current channel and object.
- The <xref:System.ServiceModel.OperationContext.GetCallbackChannel%2A> method returns a callback channel to the caller in the case of duplex communication.
- The <xref:System.ServiceModel.OperationContext.SetTransactionComplete%2A> method commits the current transaction.
## Examples
The following code example uses the <xref:System.ServiceModel.OperationContext.Current%2A> property and <xref:System.ServiceModel.OperationContext.GetCallbackChannel%2A> method to obtain the channel back to the caller from within a method. All methods in this example are one-way methods, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service.
[!code-csharp[SCA.CallbackContract#1](~/samples/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs#1)]
[!code-vb[SCA.CallbackContract#1](~/samples/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb#1)]
The following client implements the `SampleDuplexHelloCallback` to receive the callback message. The imported callback contract is not the same name as the one in the service, due to the use of the <xref:System.ServiceModel.ServiceContractAttribute.Name%2A> property in the preceding example. Note that the client makes no assumptions about whether or when it might receive a callback; the server callback is entirely independent of the client's outbound call.
> [!NOTE]
> For an example that uses the <xref:System.ServiceModel.OperationContext> class in a client scenario, see <xref:System.ServiceModel.OperationContextScope>.
[!code-csharp[SCA.CallbackContract#3](~/samples/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.cs#3)]
[!code-vb[SCA.CallbackContract#3](~/samples/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb#3)]
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public OperationContext (System.ServiceModel.IContextChannel channel);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.ServiceModel.IContextChannel channel) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.OperationContext.#ctor(System.ServiceModel.IContextChannel)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (channel As IContextChannel)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; OperationContext(System::ServiceModel::IContextChannel ^ channel);" />
<MemberSignature Language="F#" Value="new System.ServiceModel.OperationContext : System.ServiceModel.IContextChannel -&gt; System.ServiceModel.OperationContext" Usage="new System.ServiceModel.OperationContext channel" />
<MemberType>Constructor</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="channel" Type="System.ServiceModel.IContextChannel" />
</Parameters>
<Docs>
<param name="channel">The <see cref="T:System.ServiceModel.IContextChannel" /> used to create a new client <see cref="T:System.ServiceModel.OperationContext" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.ServiceModel.OperationContext" /> class that uses the specified <see cref="T:System.ServiceModel.IContextChannel" /> in a client application.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.OperationContext.%23ctor%2A> constructor to create a new operation context within the scope of which the proxy is associated in order to modify outbound items such as headers.
## Examples
The following example shows how to use the <xref:System.ServiceModel.OperationContextScope> to create a new context in a client application in order to add a custom header to the outgoing message.
[!code-csharp[OperationContextScope#4](~/samples/snippets/csharp/VS_Snippets_CFX/operationcontextscope/cs/client.cs#4)]
[!code-vb[OperationContextScope#4](~/samples/snippets/visualbasic/VS_Snippets_CFX/operationcontextscope/vb/client.vb#4)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The channel is null.</exception>
</Docs>
</Member>
<Member MemberName="Channel">
<MemberSignature Language="C#" Value="public System.ServiceModel.IContextChannel Channel { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.IContextChannel Channel" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.Channel" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Channel As IContextChannel" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::IContextChannel ^ Channel { System::ServiceModel::IContextChannel ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Channel : System.ServiceModel.IContextChannel" Usage="System.ServiceModel.OperationContext.Channel" />
<MemberType>Property</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.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.IContextChannel</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the channel associated with the current <see cref="T:System.ServiceModel.OperationContext" /> object.</summary>
<value>An <see cref="T:System.ServiceModel.IContextChannel" /> associated with the current <see cref="T:System.ServiceModel.OperationContext" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ClaimsPrincipal">
<MemberSignature Language="C#" Value="public System.Security.Claims.ClaimsPrincipal ClaimsPrincipal { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Security.Claims.ClaimsPrincipal ClaimsPrincipal" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.ClaimsPrincipal" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ClaimsPrincipal As ClaimsPrincipal" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Security::Claims::ClaimsPrincipal ^ ClaimsPrincipal { System::Security::Claims::ClaimsPrincipal ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ClaimsPrincipal : System.Security.Claims.ClaimsPrincipal" Usage="System.ServiceModel.OperationContext.ClaimsPrincipal" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Claims.ClaimsPrincipal</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the claims-based principal associated with the operation.</summary>
<value>The claims principal.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Current">
<MemberSignature Language="C#" Value="public static System.ServiceModel.OperationContext Current { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property class System.ServiceModel.OperationContext Current" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.Current" />
<MemberSignature Language="VB.NET" Value="Public Shared Property Current As OperationContext" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property System::ServiceModel::OperationContext ^ Current { System::ServiceModel::OperationContext ^ get(); void set(System::ServiceModel::OperationContext ^ value); };" />
<MemberSignature Language="F#" Value="member this.Current : System.ServiceModel.OperationContext with get, set" Usage="System.ServiceModel.OperationContext.Current" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.OperationContext</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the execution context for the current thread.</summary>
<value>The <see cref="T:System.ServiceModel.OperationContext" /> that represents the messaging and execution context of the current method.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.OperationContext.Current%2A> property to obtain the execution and message context for the current method.
## Examples
The following code example uses the <xref:System.ServiceModel.OperationContext.Current%2A> property and <xref:System.ServiceModel.OperationContext.GetCallbackChannel%2A> method to create a channel back to the caller from within a method. All methods in this example are one-way methods, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service.
[!code-csharp[SCA.CallbackContract#1](~/samples/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs#1)]
[!code-vb[SCA.CallbackContract#1](~/samples/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="EndpointDispatcher">
<MemberSignature Language="C#" Value="public System.ServiceModel.Dispatcher.EndpointDispatcher EndpointDispatcher { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Dispatcher.EndpointDispatcher EndpointDispatcher" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.EndpointDispatcher" />
<MemberSignature Language="VB.NET" Value="Public Property EndpointDispatcher As EndpointDispatcher" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Dispatcher::EndpointDispatcher ^ EndpointDispatcher { System::ServiceModel::Dispatcher::EndpointDispatcher ^ get(); void set(System::ServiceModel::Dispatcher::EndpointDispatcher ^ value); };" />
<MemberSignature Language="F#" Value="member this.EndpointDispatcher : System.ServiceModel.Dispatcher.EndpointDispatcher with get, set" Usage="System.ServiceModel.OperationContext.EndpointDispatcher" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.Dispatcher.EndpointDispatcher</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the endpoint dispatcher for the endpoint to inspect or modify.</summary>
<value>The endpoint dispatcher for the endpoint to inspect or modify.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Extensions">
<MemberSignature Language="C#" Value="public System.ServiceModel.IExtensionCollection&lt;System.ServiceModel.OperationContext&gt; Extensions { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.IExtensionCollection`1&lt;class System.ServiceModel.OperationContext&gt; Extensions" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.Extensions" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Extensions As IExtensionCollection(Of OperationContext)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::IExtensionCollection&lt;System::ServiceModel::OperationContext ^&gt; ^ Extensions { System::ServiceModel::IExtensionCollection&lt;System::ServiceModel::OperationContext ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Extensions : System.ServiceModel.IExtensionCollection&lt;System.ServiceModel.OperationContext&gt;" Usage="System.ServiceModel.OperationContext.Extensions" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ServiceModel.IExtensibleObject`1.Extensions</InterfaceMember>
</Implements>
<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.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.IExtensionCollection&lt;System.ServiceModel.OperationContext&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the collection of service extensions from the current message context.</summary>
<value>A collection of extensions of <see cref="T:System.ServiceModel.OperationContext" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.OperationContext.Extensions%2A> property to obtain a collection of all extensions of the <xref:System.ServiceModel.OperationContext> used to modify the context or add custom state. For more information about extensions, see [Extensible Objects](~/docs/framework/wcf/extending/extensible-objects.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetCallbackChannel&lt;T&gt;">
<MemberSignature Language="C#" Value="public T GetCallbackChannel&lt;T&gt; ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance !!T GetCallbackChannel&lt;T&gt;() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.OperationContext.GetCallbackChannel``1" />
<MemberSignature Language="VB.NET" Value="Public Function GetCallbackChannel(Of T) () As T" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename T&gt;&#xA; T GetCallbackChannel();" />
<MemberSignature Language="F#" Value="member this.GetCallbackChannel : unit -&gt; 'T" Usage="operationContext.GetCallbackChannel " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>T</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters />
<Docs>
<typeparam name="T">The type of channel used to call back to the client.</typeparam>
<summary>Gets a channel to the client instance that called the current operation.</summary>
<returns>A channel to the client instance that called the operation of the type specified in the <see cref="P:System.ServiceModel.ServiceContractAttribute.CallbackContract" /> property.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call the <xref:System.ServiceModel.OperationContext.GetCallbackChannel%2A> property to obtain a channel that you can use to call operations on the client instance that called the service.
## Examples
The following code example uses the <xref:System.ServiceModel.OperationContext.Current%2A> property and <xref:System.ServiceModel.OperationContext.GetCallbackChannel%2A> method to create a channel back to the caller from within a operation. All operations in this example are one-way operations, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service.
[!code-csharp[SCA.CallbackContract#1](~/samples/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs#1)]
[!code-vb[SCA.CallbackContract#1](~/samples/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb#1)]
The following client implements the `SampleDuplexHelloCallback` to receive the callback message. The imported callback contract is not the same name as the one in the service, due to the use of the <xref:System.ServiceModel.ServiceContractAttribute.Name%2A> property in the preceding example. Note that the client makes no assumptions about whether or when it might receive a callback; the server callback is entirely independent of the client's outbound call.
> [!NOTE]
> For an example that uses the <xref:System.ServiceModel.OperationContext> class in a client scenario, see <xref:System.ServiceModel.OperationContextScope>.
[!code-csharp[SCA.CallbackContract#3](~/samples/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.cs#3)]
[!code-vb[SCA.CallbackContract#3](~/samples/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HasSupportingTokens">
<MemberSignature Language="C#" Value="public bool HasSupportingTokens { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HasSupportingTokens" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.HasSupportingTokens" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property HasSupportingTokens As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool HasSupportingTokens { bool get(); };" />
<MemberSignature Language="F#" Value="member this.HasSupportingTokens : bool" Usage="System.ServiceModel.OperationContext.HasSupportingTokens" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the incoming message has supporting tokens.</summary>
<value>
<see langword="true" /> if the incoming message has supporting tokens; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Host">
<MemberSignature Language="C#" Value="public System.ServiceModel.ServiceHostBase Host { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.ServiceHostBase Host" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.Host" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Host As ServiceHostBase" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::ServiceHostBase ^ Host { System::ServiceModel::ServiceHostBase ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Host : System.ServiceModel.ServiceHostBase" Usage="System.ServiceModel.OperationContext.Host" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.ServiceHostBase</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.ServiceModel.ServiceHost" /> for the current service object.</summary>
<value>A <see cref="T:System.ServiceModel.ServiceHost" /> object.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IncomingMessageHeaders">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.MessageHeaders IncomingMessageHeaders { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.MessageHeaders IncomingMessageHeaders" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.IncomingMessageHeaders" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IncomingMessageHeaders As MessageHeaders" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::MessageHeaders ^ IncomingMessageHeaders { System::ServiceModel::Channels::MessageHeaders ^ get(); };" />
<MemberSignature Language="F#" Value="member this.IncomingMessageHeaders : System.ServiceModel.Channels.MessageHeaders" Usage="System.ServiceModel.OperationContext.IncomingMessageHeaders" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.MessageHeaders</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the incoming message headers for the <see cref="T:System.ServiceModel.OperationContext" />.</summary>
<value>A <see cref="T:System.ServiceModel.Channels.MessageHeaders" /> object that contains the incoming message headers.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to inspect or modify the request headers that arrive at a service operation or reply headers that arrive at a client proxy.
## Examples
The following code example shows how to read the incoming message headers in a service operation.
[!code-csharp[OperationContextScope#2](~/samples/snippets/csharp/VS_Snippets_CFX/operationcontextscope/cs/services.cs#2)]
[!code-vb[OperationContextScope#2](~/samples/snippets/visualbasic/VS_Snippets_CFX/operationcontextscope/vb/services.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IncomingMessageProperties">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.MessageProperties IncomingMessageProperties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.MessageProperties IncomingMessageProperties" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.IncomingMessageProperties" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IncomingMessageProperties As MessageProperties" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::MessageProperties ^ IncomingMessageProperties { System::ServiceModel::Channels::MessageProperties ^ get(); };" />
<MemberSignature Language="F#" Value="member this.IncomingMessageProperties : System.ServiceModel.Channels.MessageProperties" Usage="System.ServiceModel.OperationContext.IncomingMessageProperties" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.MessageProperties</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the message properties for the incoming message in the <see cref="T:System.ServiceModel.OperationContext" />.</summary>
<value>A <see cref="T:System.ServiceModel.Channels.MessageProperties" /> object that contains the message properties on the incoming message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to inspect or modify the message properties for a request message in a service operation or a reply message in a client proxy.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IncomingMessageVersion">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.MessageVersion IncomingMessageVersion { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.MessageVersion IncomingMessageVersion" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.IncomingMessageVersion" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IncomingMessageVersion As MessageVersion" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::MessageVersion ^ IncomingMessageVersion { System::ServiceModel::Channels::MessageVersion ^ get(); };" />
<MemberSignature Language="F#" Value="member this.IncomingMessageVersion : System.ServiceModel.Channels.MessageVersion" Usage="System.ServiceModel.OperationContext.IncomingMessageVersion" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.MessageVersion</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the incoming SOAP message version for the <see cref="T:System.ServiceModel.OperationContext" />.</summary>
<value>The SOAP version of the incoming message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to inspect the SOAP version of the request message that arrives at a service operation or the SOAP version of the reply message that arrives at a client proxy.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="InstanceContext">
<MemberSignature Language="C#" Value="public System.ServiceModel.InstanceContext InstanceContext { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.InstanceContext InstanceContext" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.InstanceContext" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property InstanceContext As InstanceContext" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::InstanceContext ^ InstanceContext { System::ServiceModel::InstanceContext ^ get(); };" />
<MemberSignature Language="F#" Value="member this.InstanceContext : System.ServiceModel.InstanceContext" Usage="System.ServiceModel.OperationContext.InstanceContext" />
<MemberType>Property</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>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.InstanceContext</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.ServiceModel.InstanceContext" /> object that manages the current service instance.</summary>
<value>The <see cref="T:System.ServiceModel.InstanceContext" /> object for the current service.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.OperationContext.InstanceContext%2A> property to access the run-time object that manages the current service object.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsUserContext">
<MemberSignature Language="C#" Value="public bool IsUserContext { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsUserContext" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.IsUserContext" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsUserContext As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsUserContext { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsUserContext : bool" Usage="System.ServiceModel.OperationContext.IsUserContext" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>This property is intended for system use and should not be called by users.</summary>
<value>
<see langword="true" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OperationCompleted">
<MemberSignature Language="C#" Value="public event EventHandler OperationCompleted;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler OperationCompleted" />
<MemberSignature Language="DocId" Value="E:System.ServiceModel.OperationContext.OperationCompleted" />
<MemberSignature Language="VB.NET" Value="Public Custom Event OperationCompleted As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ OperationCompleted;" />
<MemberSignature Language="F#" Value="member this.OperationCompleted : EventHandler " Usage="member this.OperationCompleted : System.EventHandler " />
<MemberType>Event</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the operation has completed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.ServiceModel.OperationContext.OperationCompleted> event to dispose parameters or a return value if you set <xref:System.ServiceModel.OperationBehaviorAttribute.AutoDisposeParameters%2A?displayProperty=nameWithType> to `false`. Normally you set <xref:System.ServiceModel.OperationBehaviorAttribute.AutoDisposeParameters%2A?displayProperty=nameWithType> to `false` to prevent WCF from calling <xref:System.IDisposable.Dispose%2A?displayProperty=nameWithType> on the parameter and return value objects. However, if some parameters need to be preserved while others need to be disposed, this event is the best place to dispose those parameters.
Also, with duplex bindings, this event can be used to send a request on the callback channel after the reply for the current operation is sent.
> [!NOTE]
> If a caller is listening for the <xref:System.ServiceModel.OperationContext.OperationCompleted?displayProperty=nameWithType> event for an <xref:System.ServiceModel.OperationContractAttribute.IsTerminating%2A?displayProperty=nameWithType> operation, it is possible to block when the response is received. The proper way to handle this is to schedule work on another thread when <xref:System.ServiceModel.OperationContext.OperationCompleted> is raised and then immediately return from that event handler.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OutgoingMessageHeaders">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.MessageHeaders OutgoingMessageHeaders { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.MessageHeaders OutgoingMessageHeaders" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.OutgoingMessageHeaders" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property OutgoingMessageHeaders As MessageHeaders" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::MessageHeaders ^ OutgoingMessageHeaders { System::ServiceModel::Channels::MessageHeaders ^ get(); };" />
<MemberSignature Language="F#" Value="member this.OutgoingMessageHeaders : System.ServiceModel.Channels.MessageHeaders" Usage="System.ServiceModel.OperationContext.OutgoingMessageHeaders" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.MessageHeaders</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the outgoing message headers for the active <see cref="T:System.ServiceModel.OperationContext" />.</summary>
<value>A <see cref="T:System.ServiceModel.Channels.MessageHeaders" /> object that contains outbound message headers for the active <see cref="T:System.ServiceModel.OperationContext" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to add reply headers that are sent by a service operation or request headers that are sent by a WCF client object.
## Examples
The following example shows how to use the <xref:System.ServiceModel.OperationContextScope> to create a new context in a client application in order to add a custom header to the outgoing message.
[!code-csharp[OperationContextScope#4](~/samples/snippets/csharp/VS_Snippets_CFX/operationcontextscope/cs/client.cs#4)]
[!code-vb[OperationContextScope#4](~/samples/snippets/visualbasic/VS_Snippets_CFX/operationcontextscope/vb/client.vb#4)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OutgoingMessageProperties">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.MessageProperties OutgoingMessageProperties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.MessageProperties OutgoingMessageProperties" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.OutgoingMessageProperties" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property OutgoingMessageProperties As MessageProperties" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::MessageProperties ^ OutgoingMessageProperties { System::ServiceModel::Channels::MessageProperties ^ get(); };" />
<MemberSignature Language="F#" Value="member this.OutgoingMessageProperties : System.ServiceModel.Channels.MessageProperties" Usage="System.ServiceModel.OperationContext.OutgoingMessageProperties" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.MessageProperties</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the message properties for the outbound message in the active <see cref="T:System.ServiceModel.OperationContext" />.</summary>
<value>A <see cref="T:System.ServiceModel.Channels.MessageProperties" /> object that contains the message properties on the outbound message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to add message properties for a reply message from a service operation or message properties for a request message from a client proxy.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RequestContext">
<MemberSignature Language="C#" Value="public System.ServiceModel.Channels.RequestContext RequestContext { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.Channels.RequestContext RequestContext" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.RequestContext" />
<MemberSignature Language="VB.NET" Value="Public Property RequestContext As RequestContext" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::Channels::RequestContext ^ RequestContext { System::ServiceModel::Channels::RequestContext ^ get(); void set(System::ServiceModel::Channels::RequestContext ^ value); };" />
<MemberSignature Language="F#" Value="member this.RequestContext : System.ServiceModel.Channels.RequestContext with get, set" Usage="System.ServiceModel.OperationContext.RequestContext" />
<MemberType>Property</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>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.RequestContext</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="T:System.ServiceModel.Channels.RequestContext" /> implementation for this method.</summary>
<value>An <see cref="T:System.ServiceModel.Channels.RequestContext" /> implementation, or null if there is no request context.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
One-way operations are do not have a request context.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ServiceSecurityContext">
<MemberSignature Language="C#" Value="public System.ServiceModel.ServiceSecurityContext ServiceSecurityContext { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.ServiceSecurityContext ServiceSecurityContext" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.ServiceSecurityContext" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ServiceSecurityContext As ServiceSecurityContext" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::ServiceSecurityContext ^ ServiceSecurityContext { System::ServiceModel::ServiceSecurityContext ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ServiceSecurityContext : System.ServiceModel.ServiceSecurityContext" Usage="System.ServiceModel.OperationContext.ServiceSecurityContext" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.ServiceSecurityContext</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="T:System.ServiceModel.ServiceSecurityContext" /> within which this method executes.</summary>
<value>A <see cref="T:System.ServiceModel.ServiceSecurityContext" /> object.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SessionId">
<MemberSignature Language="C#" Value="public string SessionId { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SessionId" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.SessionId" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property SessionId As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ SessionId { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.SessionId : string" Usage="System.ServiceModel.OperationContext.SessionId" />
<MemberType>Property</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>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.String" /> used to identify the current session.</summary>
<value>The session identifier.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetTransactionComplete">
<MemberSignature Language="C#" Value="public void SetTransactionComplete ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetTransactionComplete() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.OperationContext.SetTransactionComplete" />
<MemberSignature Language="VB.NET" Value="Public Sub SetTransactionComplete ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SetTransactionComplete();" />
<MemberSignature Language="F#" Value="member this.SetTransactionComplete : unit -&gt; unit" Usage="operationContext.SetTransactionComplete " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Commits the currently executing transaction.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is only useful in operations that set <xref:System.ServiceModel.OperationBehaviorAttribute.TransactionAutoComplete%2A?displayProperty=nameWithType> to `false`. Typically, services do this on some but not all operations. When <xref:System.ServiceModel.OperationBehaviorAttribute.TransactionAutoComplete%2A?displayProperty=nameWithType> is false the transaction completes automatically. Use <xref:System.ServiceModel.OperationContext.SetTransactionComplete%2A> in cases where it is not possible to determine at design-time whether an operation needs to complete the transaction.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">There is no transaction in the context.</exception>
</Docs>
</Member>
<Member MemberName="SupportingTokens">
<MemberSignature Language="C#" Value="public System.Collections.Generic.ICollection&lt;System.ServiceModel.Security.SupportingTokenSpecification&gt; SupportingTokens { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.ICollection`1&lt;class System.ServiceModel.Security.SupportingTokenSpecification&gt; SupportingTokens" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.OperationContext.SupportingTokens" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property SupportingTokens As ICollection(Of SupportingTokenSpecification)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::Generic::ICollection&lt;System::ServiceModel::Security::SupportingTokenSpecification ^&gt; ^ SupportingTokens { System::Collections::Generic::ICollection&lt;System::ServiceModel::Security::SupportingTokenSpecification ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.SupportingTokens : System.Collections.Generic.ICollection&lt;System.ServiceModel.Security.SupportingTokenSpecification&gt;" Usage="System.ServiceModel.OperationContext.SupportingTokens" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Primitives</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.ICollection&lt;System.ServiceModel.Security.SupportingTokenSpecification&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Collections.Generic.ICollection`1" /> of type <see cref="T:System.IdentityModel.Tokens.SecurityToken" />.</summary>
<value>A collection of security tokens.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.