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 Operation
Declaration
public OperationContext(MessageHeaders incomingMessageHeaders)
Parameters
Type | Name | Description |
---|---|---|
Message |
incomingMessageHeaders | The existing incoming message headers. |
OperationContext(MessageHeaders, MessageHeaders)
Initializes a new instance of the Operation
Declaration
public OperationContext(MessageHeaders incomingMessageHeaders = null, MessageHeaders outgoingMessageHeaders = null)
Parameters
Type | Name | Description |
---|---|---|
Message |
incomingMessageHeaders | The existing incoming message headers. |
Message |
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 |
---|---|
Operation |
The Operation |
IncomingMessageHeaders
Gets the incoming message headers for the Operation
Declaration
public MessageHeaders IncomingMessageHeaders { get; }
Property Value
Type | Description |
---|---|
Message |
A |
OutgoingMessageHeaders
Gets the outgoing message headers for the active Operation
Declaration
public MessageHeaders OutgoingMessageHeaders { get; }
Property Value
Type | Description |
---|---|
Message |
A |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()