102 writes to Value
aspire (2)
Utils\NpmInstallDetection.cs (2)
75s_environmentOverride.Value = new DictionaryEnvironmentReader(environment); 106s_environmentOverride.Value = previous;
Aspire.Dashboard.Tests (3)
ResourceOutgoingPeerResolverTests.cs (2)
375var ambientValue = new AsyncLocal<string?> { Value = "request" }; 390ambientValue.Value = null;
TelemetryRepositoryTests\LogTests.cs (1)
825asyncLocal.Value = "CustomValue";
Aspire.Hosting (4)
InteractionService.cs (2)
85s_nonInteractiveScope.Value = true; 90s_nonInteractiveScope.Value = _previousValue;
Pipelines\PipelineLoggerProvider.cs (2)
29s_currentStep.Value = null; 35s_currentStep.Value = new StepLoggerHolder { Step = value };
Aspire.Hosting.Maui (2)
Lifecycle\MauiBuildQueueEventSubscriber.cs (2)
449_isLaunchTimeoutStop.Value = true; 457_isLaunchTimeoutStop.Value = wasLaunchTimeoutStop;
Aspire.Hosting.Native.Client (1)
NativeProviderDefinition.cs (1)
56_invocation.Value = invocation;
Aspire.Hosting.Testing (1)
DistributedApplicationEntryPointInvoker.cs (1)
135s_currentListener.Value = this;
GenerateDocumentationAndConfigFiles (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
GetDocument.Insider (1)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (1)
243_currentListener.Value = this;
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
DatabaseErrorPageMiddleware.cs (1)
87_localDiagnostic.Value = new DiagnosticHolder();
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationValues.cs (1)
30_headers.Value = value;
Microsoft.AspNetCore.Http (1)
HttpContextAccessor.cs (1)
32_httpContextCurrent.Value = new HttpContextHolder { Context = value };
Microsoft.AspNetCore.InternalTesting (1)
RepeatContext.cs (1)
15internal set => _current.Value = value;
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionContextAccessor.cs (1)
26set { _storage.Value = value; }
Microsoft.AspNetCore.Mvc.Testing (1)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (1)
243_currentListener.Value = this;
Microsoft.AspNetCore.TestHost (1)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (1)
243_currentListener.Value = this;
Microsoft.Build (2)
ElementLocation\XmlDocumentWithLocation.cs (2)
184this._elementLocation.Value = location; 192this._elementLocation.Value = null;
Microsoft.Build.Framework (1)
FileUtilities.cs (1)
52set => s_currentThreadWorkingDirectory.Value = value;
Microsoft.CodeAnalysis.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
Microsoft.CodeAnalysis.CodeStyle (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
Microsoft.CodeAnalysis.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (1)
115protected set => _currentContext.Value = value;
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
107set => _currentContext.Value = value;
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\UseDelegateChatClientTests.cs (5)
61asyncLocal.Value = 42; 101asyncLocal.Value = 42; 143asyncLocal.Value = 42; 204asyncLocal.Value = 42; 214asyncLocal.Value = 42;
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
51asyncLocal.Value = 42;
Microsoft.Extensions.AsyncState (1)
AsyncState.cs (1)
30_asyncContextCurrent.Value = features;
Microsoft.Extensions.Caching.Memory (2)
CacheEntry.cs (2)
48holder.Value = this; 218_current.Value = _previous;
Microsoft.Extensions.Http.Diagnostics (2)
Latency\Internal\HttpClientLatencyContext.cs (1)
20_latencyContext.Value = context;
Logging\Internal\OutgoingRequestContext.cs (1)
15_asyncLocal.Value = metadata;
Microsoft.Extensions.Logging (2)
LoggerFactoryScopeProvider.cs (2)
95_currentScope.Value = newScope; 125_provider._currentScope.Value = Parent;
Microsoft.Extensions.Logging.Abstractions (2)
LoggerExternalScopeProvider.cs (2)
42_currentScope.Value = newScope; 72_provider._currentScope.Value = Parent;
Microsoft.Extensions.Telemetry (2)
Logging\Import\LoggerFactoryScopeProvider.cs (2)
110_currentScope.Value = newScope; 140_provider._currentScope.Value = Parent;
MSBuild (4)
OutOfProcTaskHostNode.cs (4)
1356_currentTaskContext.Value = context; 1364_currentTaskContext.Value = previousContext; 1666_currentTaskContext.Value = taskContext; 1833_currentTaskContext.Value = null;
NuGet.Common (2)
ActivityCorrelationId.cs (2)
54_correlationId.Value = correlationId; 63_correlationId.Value = null;
PresentationCore (1)
MS\Internal\XpsLoadingContext.cs (1)
49set => s_activePackageUri.Value = value;
Roslyn.Diagnostics.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (3)
45s_current.Value = telemetry; 46return new Registration(() => s_current.Value = previous); 152s_current.Value = null;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (2)
1286s_current.Value = activity; 1291s_current.Value = activity;
System.Diagnostics.TraceSource (4)
System\Diagnostics\CorrelationManager.cs (4)
28public Guid ActivityId { get { return _activityId.Value; } set { _activityId.Value = value; } } 61public override void Clear() => _stack.Value = null; 111_stack.Value = n!.Prev; 117_stack.Value = new StackNode(obj, _stack.Value);
System.Private.CoreLib (8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ActivityTracker.cs (2)
110m_current.Value = newActivity; 194m_current.Value = newCurrentActivity;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (2)
375s_asyncLocalCurrentCulture.Value = value; 399s_asyncLocalCurrentUICulture.Value = value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
573s_asyncLocalCurrent.Value = value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\DeserializationToken.cs (1)
26SerializationInfo.AsyncDeserializationInProgress.Value = false;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
92AsyncDeserializationInProgress.Value = true;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
185s_asyncLocalPrincipal.Value = value;
System.Security.Principal.Windows (3)
System\Security\Principal\WindowsIdentity.cs (3)
764s_currentImpersonatedToken.Value = previousToken; 782s_currentImpersonatedToken.Value = null; 787s_currentImpersonatedToken.Value = token;
System.ServiceModel.Primitives (11)
Internals\System\Runtime\AsyncLock.cs (8)
29_currentSemaphore.Value ??= _topLevelSemaphore; 32_currentSemaphore.Value = nextSem; 48_currentSemaphore.Value ??= _topLevelSemaphore; 52_currentSemaphore.Value = nextSem; 92_asyncLock._currentSemaphore.Value = null; 96_asyncLock._currentSemaphore.Value = _currentSemaphore; 115_asyncLock._currentSemaphore.Value = null; 119_asyncLock._currentSemaphore.Value = _currentSemaphore;
System\ServiceModel\OperationContext.cs (1)
112s_asyncContext.Value = value;
System\ServiceModel\OperationContextScope.cs (2)
55s_asyncCurrentScope.Value = this; 79s_asyncCurrentScope.Value = _originalScope;
System.Threading (1)
System\Threading\HostExecutionContextManager.cs (1)
66_asyncLocal.Value = true;
System.Transactions.Local (2)
System\Transactions\Transaction.cs (2)
1073s_currentTransaction.Value = contextKey; 1092s_currentTransaction.Value = null;
119 references to Value
aspire (4)
Utils\NpmInstallDetection.cs (4)
37var env = s_environmentOverride.Value ?? ProcessEnvironmentReader.Instance; 58var env = s_environmentOverride.Value ?? ProcessEnvironmentReader.Instance; 66var env = s_environmentOverride.Value ?? ProcessEnvironmentReader.Instance; 74var previous = s_environmentOverride.Value;
Aspire.Dashboard.Tests (2)
ResourceOutgoingPeerResolverTests.cs (1)
379callbackValue.SetResult(ambientValue.Value);
TelemetryRepositoryTests\LogTests.cs (1)
832tcs.SetResult(asyncLocal.Value);
Aspire.Hosting (3)
InteractionService.cs (2)
49if (s_nonInteractiveScope.Value) 84_previousValue = s_nonInteractiveScope.Value;
Pipelines\PipelineLoggerProvider.cs (1)
25get => s_currentStep.Value?.Step;
Aspire.Hosting.Maui (2)
Lifecycle\MauiBuildQueueEventSubscriber.cs (2)
448var wasLaunchTimeoutStop = _isLaunchTimeoutStop.Value; 542var wasCancelled = !_isLaunchTimeoutStop.Value && queueAnnotation.CancelResource(resource.Name);
Aspire.Hosting.Native.Client (2)
NativeProviderDefinition.cs (2)
50public CancellationToken CancellationToken => _invocation.Value?.CancellationToken ?? CancellationToken.None; 128if (_invocation.Value is { } invocation)
Aspire.Hosting.Testing (2)
DistributedApplicationEntryPointInvoker.cs (2)
195if (s_currentListener.Value != this) 227if (s_currentListener.Value != owner)
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
GetDocument.Insider (2)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (2)
321if (_currentListener.Value != this) 335if (_currentListener.Value != this)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (4)
DatabaseErrorPageMiddleware.cs (4)
97var contextType = _localDiagnostic.Value!.ContextType; 126var lastRecordedException = _localDiagnostic.Value!.Exception; 170_localDiagnostic.Value?.Hold(contextErrorEventData.Exception, contextErrorEventData.Context!.GetType()); 176_localDiagnostic.Value?.Hold(contextTypeErrorEventData.Exception, contextTypeErrorEventData.ContextType);
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationValues.cs (1)
26return _headers.Value;
Microsoft.AspNetCore.Http (2)
HttpContextAccessor.cs (2)
21return _httpContextCurrent.Value?.Context; 26_httpContextCurrent.Value?.Context = null;
Microsoft.AspNetCore.InternalTesting (1)
RepeatContext.cs (1)
14get => _current.Value;
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionContextAccessor.cs (1)
25get { return _storage.Value; }
Microsoft.AspNetCore.Mvc.Testing (2)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (2)
321if (_currentListener.Value != this) 335if (_currentListener.Value != this)
Microsoft.AspNetCore.TestHost (2)
src\dc0dd7c6a4fbfb95\HostFactoryResolver.cs (2)
321if (_currentListener.Value != this) 335if (_currentListener.Value != this)
Microsoft.Build (3)
ElementLocation\XmlDocumentWithLocation.cs (3)
208else if (_elementLocation?.Value != null) 210return new XmlElementWithLocation(prefix, localName, namespaceURI, this, _elementLocation.Value.Line, _elementLocation.Value.Column);
Microsoft.Build.Framework (1)
FileUtilities.cs (1)
51get => s_currentThreadWorkingDirectory.Value;
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
Microsoft.CodeAnalysis.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
Microsoft.CodeAnalysis.NetAnalyzers (2)
src\9382845807600969\AnalysisEntityDataFlowOperationVisitor.cs (2)
876var observer = AnalysisEntityDataFlowScanTestHook.Observer.Value; 959var observer = AnalysisEntityDataFlowScanTestHook.Observer.Value;
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (1)
114get => _currentContext.Value;
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
106get => _currentContext.Value;
Microsoft.Extensions.AI.Tests (13)
ChatCompletion\UseDelegateChatClientTests.cs (11)
41Assert.Equal(42, asyncLocal.Value); 50Assert.Equal(42, asyncLocal.Value); 66Assert.Equal(0, asyncLocal.Value); 70Assert.Equal(0, asyncLocal.Value); 90Assert.Equal(42, asyncLocal.Value); 108Assert.Equal(0, asyncLocal.Value); 132Assert.Equal(42, asyncLocal.Value); 159Assert.Equal(0, asyncLocal.Value); 183Assert.Equal(42, asyncLocal.Value); 192Assert.Equal(42, asyncLocal.Value); 230Assert.Equal(0, asyncLocal.Value);
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (2)
40Assert.Equal(42, asyncLocal.Value); 58Assert.Equal(0, asyncLocal.Value);
Microsoft.Extensions.AsyncState (7)
AsyncState.cs (7)
35var holder = _asyncContextCurrent.Value; 55if (_asyncContextCurrent.Value?.Features == null) 61EnsureCount(_asyncContextCurrent.Value.Features, token.Index + 1); 63value = _asyncContextCurrent.Value.Features[token.Index]; 80if (_asyncContextCurrent.Value?.Features == null) 85EnsureCount(_asyncContextCurrent.Value.Features, token.Index + 1); 87_asyncContextCurrent.Value.Features[token.Index] = value;
Microsoft.Extensions.Caching.Memory (4)
CacheEntry.cs (4)
47_previous = holder.Value; 53internal static CacheEntry? Current => _current.Value; 217Debug.Assert(_current.Value == this, "Entries disposed in invalid order"); 307if ((_tokens == null || !_tokens.CanPropagateTokens()) && _absoluteExpirationTicks < 0 || _current.Value is not CacheEntry parent)
Microsoft.Extensions.Http.Diagnostics (2)
Latency\Internal\HttpClientLatencyContext.cs (1)
15return _latencyContext.Value;
Logging\Internal\OutgoingRequestContext.cs (1)
18public RequestMetadata? RequestMetadata => _asyncLocal.Value;
Microsoft.Extensions.Logging (2)
LoggerFactoryScopeProvider.cs (2)
75Report(_currentScope.Value); 93Scope? parent = _currentScope.Value;
Microsoft.Extensions.Logging.Abstractions (2)
LoggerExternalScopeProvider.cs (2)
34Report(_currentScope.Value); 40Scope? parent = _currentScope.Value;
Microsoft.Extensions.Telemetry (2)
Logging\Import\LoggerFactoryScopeProvider.cs (2)
90Report(_currentScope.Value); 108Scope? parent = _currentScope.Value;
MSBuild (2)
OutOfProcTaskHostNode.cs (2)
1130TaskExecutionContext context = _currentTaskContext.Value; 1350var previousContext = _currentTaskContext.Value;
NuGet.Common (1)
ActivityCorrelationId.cs (1)
37var correlationId = _correlationId.Value;
PresentationCore (4)
MS\Internal\XpsLoadingContext.cs (4)
48get => s_activePackageUri.Value; 55internal static bool IsActive => s_activePackageUri.Value != null; 68return IsUriAllowedAgainstPackage(s_activePackageUri.Value, uri); 137parentUri = s_activePackageUri.Value;
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (2)
34=> s_current.Value ?? s_default; 44var previous = s_current.Value;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (2)
143get { return s_current.Value; } 1290Activity? previous = s_current.Value;
System.Diagnostics.TraceSource (9)
System\Diagnostics\CorrelationManager.cs (9)
28public Guid ActivityId { get { return _activityId.Value; } set { _activityId.Value = value; } } 65public override int Count => _stack.Value?.Count ?? 0; 67public override IEnumerator GetEnumerator() => GetEnumerator(_stack.Value); 69public override object? Peek() => _stack.Value?.Value; 73for (StackNode? n = _stack.Value; n != null; n = n.Prev) 89for (StackNode? n = _stack.Value; n != null; n = n.Prev) 106StackNode? n = _stack.Value; 117_stack.Value = new StackNode(obj, _stack.Value); 122StackNode? n = _stack.Value;
System.Private.CoreLib (7)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ActivityTracker.cs (4)
64ActivityInfo? currentActivity = m_current.Value; 93currentActivity = m_current.Value; 140log.DebugFacilityMessage("OnStopEnterActivityState", ActivityInfo.LiveActivities(m_current.Value)); 145ActivityInfo? currentActivity = m_current.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
565public static AssemblyLoadContext? CurrentContextualReflectionContext => s_asyncLocalCurrent?.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
26if (AsyncDeserializationInProgress.Value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
168IPrincipal? principal = s_asyncLocalPrincipal?.Value;
System.ServiceModel.Primitives (7)
Internals\System\Runtime\AsyncLock.cs (4)
30SemaphoreSlim currentSem = _currentSemaphore.Value; 49SemaphoreSlim currentSem = _currentSemaphore.Value; 85Fx.Assert(_nextSemaphore == _asyncLock._currentSemaphore.Value, "_nextSemaphore was expected to by the current semaphore"); 112Fx.Assert(_nextSemaphore == _asyncLock._currentSemaphore.Value, "_nextSemaphore was expected to by the current semaphore");
System\ServiceModel\OperationContext.cs (1)
100return s_asyncContext.Value;
System\ServiceModel\OperationContextScope.cs (2)
25private readonly OperationContextScope _originalScope = OperationContext.DisableAsyncFlow ? s_currentScope : s_asyncCurrentScope.Value; 63if ((OperationContext.DisableAsyncFlow ? s_currentScope : s_asyncCurrentScope.Value) != this)
System.Threading (1)
System\Threading\HostExecutionContextManager.cs (1)
43if (t_currentContext != switcher._currentContext || switcher._asyncLocal == null || !switcher._asyncLocal.Value)
System.Transactions.Local (2)
System\Transactions\Transaction.cs (2)
1080ContextKey? key = s_currentTransaction.Value; 1100ContextKey? contextKey = s_currentTransaction.Value;