Edit

Share via


RequestContext Class

Definition

This class holds information regarding the request currently being processed. It is explicitly intended to be available to application code.

public static class RequestContext
type RequestContext = class
Public Class RequestContext
Inheritance
RequestContext

Remarks

The request context is represented as a property bag. Some values are provided by default; others are derived from messages headers in the request that led to the current processing.

Information stored in RequestContext is propagated from Orleans clients to Orleans grains automatically by the Orleans runtime.

Properties

ActivityId

Gets or sets an activity ID that can be used for correlation.

Entries

Gets the collection of entries currently in the request context.

Keys

Gets the collection of keys for the values currently in the request context.

PropagateActivityId

Whether Trace.CorrelationManager.ActivityId settings should be propagated into grain calls.

ReentrancyId

Methods

AllowCallChainReentrancy()

Allows reentrancy for subsequent calls issued before the returned RequestContext.ReentrancySection is disposed.

Clear()

Clears the current request context.

Export(SerializationManager)
Get(String)

Retrieves a value from the request context.

Import(Dictionary<String,Object>)
Remove(String)

Remove a value from the request context.

Set(String, Object)

Sets a value in the request context.

SuppressCallChainReentrancy()

Suppresses reentrancy for subsequent calls issued before the returned RequestContext.ReentrancySection is disposed.

Applies to