Class OperationContext
Provides access to the execution context of a service method.
Inheritance
Implements
Namespace: Copper.Common.Context
Assembly: Copper.Common.dll
Syntax
public sealed class OperationContext : IDisposable
Constructors
View SourceOperationContext(MessageHeaders)
Initializes a new instance of the OperationContext class.
Declaration
public OperationContext(MessageHeaders incomingMessageHeaders)
Parameters
Type | Name | Description |
---|---|---|
MessageHeaders | incomingMessageHeaders | The existing incoming message headers. |
OperationContext(MessageHeaders, MessageHeaders)
Initializes a new instance of the OperationContext class.
Declaration
public OperationContext(MessageHeaders incomingMessageHeaders = null, MessageHeaders outgoingMessageHeaders = null)
Parameters
Type | Name | Description |
---|---|---|
MessageHeaders | incomingMessageHeaders | The existing incoming message headers. |
MessageHeaders | outgoingMessageHeaders | The existing outgoing message headers. |
Properties
View SourceCurrent
Gets the execution context for the current thread.
Declaration
public static OperationContext Current { get; }
Property Value
Type | Description |
---|---|
OperationContext | The OperationContext that represents the messaging and execution context of the current method. |
IncomingMessageHeaders
Gets the incoming message headers for the OperationContext.
Declaration
public MessageHeaders IncomingMessageHeaders { get; }
Property Value
Type | Description |
---|---|
MessageHeaders | A |
OutgoingMessageHeaders
Gets the outgoing message headers for the active OperationContext.
Declaration
public MessageHeaders OutgoingMessageHeaders { get; }
Property Value
Type | Description |
---|---|
MessageHeaders | A |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()