次の方法で共有


TenantContextHelper.GetWorkerId(HttpContext) Method

Definition

Extracts the worker ID from the HttpContext. Checks in order: user claims, request headers, and request items.

public static string? GetWorkerId(Microsoft.AspNetCore.Http.HttpContext? context);
static member GetWorkerId : Microsoft.AspNetCore.Http.HttpContext -> string
Public Shared Function GetWorkerId (context As HttpContext) As String

Parameters

context
HttpContext

The HttpContext to extract worker ID from.

Returns

The worker ID if found, otherwise null.

Applies to