54 references to new
aspire (1)
Utils\NpmInstallDetection.cs (1)
28private static readonly AsyncLocal<IEnvironmentReader?> s_environmentOverride = new();
Aspire.Dashboard.Tests (2)
ResourceOutgoingPeerResolverTests.cs (1)
375var ambientValue = new AsyncLocal<string?> { Value = "request" };
TelemetryRepositoryTests\LogTests.cs (1)
824var asyncLocal = new AsyncLocal<string>();
Aspire.Hosting (2)
InteractionService.cs (1)
25private static readonly AsyncLocal<bool> s_nonInteractiveScope = new();
Pipelines\PipelineLoggerProvider.cs (1)
18private static readonly AsyncLocal<StepLoggerHolder?> s_currentStep = new();
Aspire.Hosting.Maui (1)
Lifecycle\MauiBuildQueueEventSubscriber.cs (1)
40private readonly AsyncLocal<bool> _isLaunchTimeoutStop = new();
Aspire.Hosting.Native.Client (1)
NativeProviderDefinition.cs (1)
46private readonly AsyncLocal<NativeClient.ProviderInvocation?> _invocation = new();
Aspire.Hosting.Testing (1)
DistributedApplicationEntryPointInvoker.cs (1)
94private static readonly AsyncLocal<EntryPointInvoker> s_currentListener = new();
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
GetDocument.Insider (1)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (1)
209private static readonly AsyncLocal<HostingListener> _currentListener = new();
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
DatabaseErrorPageMiddleware.cs (1)
24private static readonly AsyncLocal<DiagnosticHolder> _localDiagnostic = new AsyncLocal<DiagnosticHolder>();
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationValues.cs (1)
13private static readonly AsyncLocal<IDictionary<string, StringValues>?> _headers = new AsyncLocal<IDictionary<string, StringValues>?>();
Microsoft.AspNetCore.Http (1)
HttpContextAccessor.cs (1)
14private static readonly AsyncLocal<HttpContextHolder> _httpContextCurrent = new AsyncLocal<HttpContextHolder>();
Microsoft.AspNetCore.InternalTesting (1)
RepeatContext.cs (1)
10private static readonly AsyncLocal<RepeatContext> _current = new AsyncLocal<RepeatContext>();
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionContextAccessor.cs (1)
19private static readonly AsyncLocal<ActionContext> _storage = new AsyncLocal<ActionContext>();
Microsoft.AspNetCore.Mvc.Testing (1)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (1)
209private static readonly AsyncLocal<HostingListener> _currentListener = new();
Microsoft.AspNetCore.TestHost (1)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (1)
209private static readonly AsyncLocal<HostingListener> _currentListener = new();
Microsoft.Build (1)
ElementLocation\XmlDocumentWithLocation.cs (1)
59private readonly AsyncLocal<ElementLocation> _elementLocation = new AsyncLocal<ElementLocation>();
Microsoft.Build.Framework (1)
FileUtilities.cs (1)
47private static readonly AsyncLocal<string?> s_currentThreadWorkingDirectory = new();
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\9382845807600969\AnalysisEntityDataFlowOperationVisitor.cs (1)
1189internal static readonly AsyncLocal<Action<object, AnalysisEntityDataFlowScanKind, IOperation>?> Observer = new();
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (1)
70private static readonly AsyncLocal<FunctionInvocationContext?> _currentContext = new();
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
58private static readonly AsyncLocal<FunctionInvocationContext?> _currentContext = new();
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\UseDelegateChatClientTests.cs (4)
32AsyncLocal<int> asyncLocal = new(); 81AsyncLocal<int> asyncLocal = new(); 123AsyncLocal<int> asyncLocal = new(); 174AsyncLocal<int> asyncLocal = new();
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
31AsyncLocal<int> asyncLocal = new();
Microsoft.Extensions.AsyncState (1)
AsyncState.cs (1)
15private static readonly AsyncLocal<AsyncStateHolder> _asyncContextCurrent = new();
Microsoft.Extensions.Caching.Memory (1)
CacheEntry.cs (1)
18private static readonly AsyncLocal<CacheEntry?> _current = new AsyncLocal<CacheEntry?>();
Microsoft.Extensions.Http.Diagnostics (2)
Latency\Internal\HttpClientLatencyContext.cs (1)
11private readonly AsyncLocal<ILatencyContext?> _latencyContext = new();
Logging\Internal\OutgoingRequestContext.cs (1)
11private static readonly AsyncLocal<RequestMetadata> _asyncLocal = new();
Microsoft.Extensions.Logging (1)
LoggerFactoryScopeProvider.cs (1)
18private readonly AsyncLocal<Scope?> _currentScope = new AsyncLocal<Scope?>();
Microsoft.Extensions.Logging.Abstractions (1)
LoggerExternalScopeProvider.cs (1)
14private readonly AsyncLocal<Scope?> _currentScope = new AsyncLocal<Scope?>();
Microsoft.Extensions.Telemetry (1)
Logging\Import\LoggerFactoryScopeProvider.cs (1)
33private readonly AsyncLocal<Scope?> _currentScope = new AsyncLocal<Scope?>();
MSBuild (1)
OutOfProcTaskHostNode.cs (1)
224= new AsyncLocal<TaskExecutionContext>();
NuGet.Common (1)
ActivityCorrelationId.cs (1)
22private static readonly AsyncLocal<string?> _correlationId = new AsyncLocal<string?>();
PresentationCore (1)
MS\Internal\XpsLoadingContext.cs (1)
40private static readonly AsyncLocal<Uri> s_activePackageUri = new();
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (1)
20private static readonly AsyncLocal<RoslynTelemetry?> s_current = new();
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Activity.cs (1)
68private static readonly AsyncLocal<Activity?> s_current = new AsyncLocal<Activity?>();
System.Diagnostics.TraceSource (2)
System\Diagnostics\CorrelationManager.cs (2)
13private readonly AsyncLocal<Guid> _activityId = new AsyncLocal<Guid>(); 14private readonly AsyncLocal<StackNode?> _stack = new AsyncLocal<StackNode?>();
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
571Interlocked.CompareExchange<AsyncLocal<AssemblyLoadContext?>?>(ref s_asyncLocalCurrent, new AsyncLocal<AssemblyLoadContext?>(), null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
13internal static AsyncLocal<bool> AsyncDeserializationInProgress { get; } = new AsyncLocal<bool>();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
183Interlocked.CompareExchange(ref s_asyncLocalPrincipal, new AsyncLocal<IPrincipal?>(), null);
System.ServiceModel.Primitives (3)
Internals\System\Runtime\AsyncLock.cs (1)
21_currentSemaphore = new AsyncLocal<SemaphoreSlim>();
System\ServiceModel\OperationContext.cs (1)
22s_asyncContext = new AsyncLocal<OperationContext>();
System\ServiceModel\OperationContextScope.cs (1)
15s_asyncCurrentScope = new AsyncLocal<OperationContextScope>();
System.Threading (1)
System\Threading\HostExecutionContextManager.cs (1)
65_asyncLocal = new AsyncLocal<bool>();
System.Transactions.Local (1)
System\Transactions\Transaction.cs (1)
1061private static readonly AsyncLocal<ContextKey?> s_currentTransaction = new AsyncLocal<ContextKey?>();