Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

RequestContext Class

Definition

Namespace:
Orleans.Runtime
Assembly:
Orleans.dll
Assembly:
Orleans.Core.Abstractions.dll
Package:
Microsoft.Orleans.Core v1.5.10
Package:
Microsoft.Orleans.Core.Abstractions v10.0.0
Package:
Microsoft.Orleans.Core.Abstractions v2.4.5
Package:
Microsoft.Orleans.Core.Abstractions v3.6.5
Package:
Microsoft.Orleans.Core.Abstractions v7.2.5
Package:
Microsoft.Orleans.Core.Abstractions v8.0.0
Package:
Microsoft.Orleans.Core.Abstractions v8.1.0
Package:
Microsoft.Orleans.Core.Abstractions v8.2.0
Package:
Microsoft.Orleans.Core.Abstractions v9.0.0
Package:
Microsoft.Orleans.Core.Abstractions v9.1.2
Source:
RequestContext.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

Name Description
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

Name Description
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