101 writes to Value
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\LogTests.cs (1)
571asyncLocal.Value = "CustomValue";
Aspire.Hosting (2)
Pipelines\PipelineLoggerProvider.cs (2)
31s_currentStep.Value = null; 37s_currentStep.Value = new StepLoggerHolder { Step = value };
Aspire.Hosting.Testing (1)
DistributedApplicationEntryPointInvoker.cs (1)
86s_currentListener.Value = this;
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\11.0.0-preview.3.26153.117\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
233_currentListener.Value = this;
InMemory.FunctionalTests (15)
RequestTests.cs (15)
326local.Value++; 332local.Value++; 336local.Value++; 356local.Value = new IntAsClass(); 398local.Value++; 404local.Value++; 430local.Value++; 436local.Value++; 440local.Value++; 446local.Value++; 464local.Value = new IntAsClass(); 510local.Value++; 518local.Value++; 524local.Value++; 530local.Value++;
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\CircuitHostTest.cs (2)
352asyncLocal3.Value = true; 368asyncLocal1.Value = true;
Microsoft.AspNetCore.Components.Tests (2)
RendererTest.cs (2)
5043ServiceAccessor.TestAsyncLocal.Value = "AmbientValue"; 5056ServiceAccessor.TestAsyncLocal.Value = null;
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)
.packages\microsoft.extensions.hostfactoryresolver.sources\11.0.0-preview.3.26153.117\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
233_currentListener.Value = this;
Microsoft.AspNetCore.Shared.Tests (1)
NonCapturingTimerTest.cs (1)
18message.Value = "Hey, this is a value stored in the execuion context";
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\11.0.0-preview.3.26153.117\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
233_currentListener.Value = this;
Microsoft.AspNetCore.TestHost.Tests (2)
TestClientTests.cs (2)
1089asyncLocal.Value = value; 1123asyncLocal.Value = value;
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
2984_currentListener.Value = this; 3023_currentListener.Value = null;
Microsoft.Build.Framework (1)
FileUtilities.cs (1)
41set => s_currentThreadWorkingDirectory.Value = value;
Microsoft.DotNet.Helix.Sdk (1)
LoggerExtensions.cs (1)
22set => s_localCategoryStack.Value = value;
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Modeler\ServiceClientModelFactory.cs (4)
51_typeNameStack.Value = new Stack<string>(); 52_propertyNameStack.Value = new Stack<string>(); 53_parameterNameStack.Value = new Stack<string>(); 54_methodNameStack.Value = new Stack<string>();
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
105protected set => _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)
49holder.Value = this; 209_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;
Microsoft.Extensions.Validation.GeneratorTests (1)
ValidationsGeneratorTestBase.cs (1)
430_currentListener.Value = this;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (2)
1268s_current.Value = activity; 1273s_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\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ActivityTracker.cs (2)
109m_current.Value = newActivity; 193m_current.Value = newCurrentActivity;
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (2)
375s_asyncLocalCurrentCulture.Value = value; 399s_asyncLocalCurrentUICulture.Value = value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
534s_asyncLocalCurrent.Value = value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\DeserializationToken.cs (1)
26SerializationInfo.AsyncDeserializationInProgress.Value = false;
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
92AsyncDeserializationInProgress.Value = true;
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
357s_asyncLocalPrincipal.Value = value;
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;
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
24_output.Value = output; 92_asyncBrowser.Value = browser; 93_logs.Value = logs;
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
24_output.Value = output; 92_asyncBrowser.Value = browser; 93_logs.Value = logs;
Templates.Mvc.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
24_output.Value = output; 92_asyncBrowser.Value = browser; 93_logs.Value = logs;
Templates.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
24_output.Value = output; 92_asyncBrowser.Value = browser; 93_logs.Value = logs;
152 references to Value
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\LogTests.cs (1)
578tcs.SetResult(asyncLocal.Value);
Aspire.Hosting (1)
Pipelines\PipelineLoggerProvider.cs (1)
27get => s_currentStep.Value?.Step;
Aspire.Hosting.Testing (2)
DistributedApplicationEntryPointInvoker.cs (2)
146if (s_currentListener.Value != this) 178if (s_currentListener.Value != owner)
GetDocument.Insider (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\11.0.0-preview.3.26153.117\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
311if (_currentListener.Value != this) 325if (_currentListener.Value != this)
InMemory.FunctionalTests (29)
RequestTests.cs (29)
321var value = local.Value; 355Assert.Null(local.Value); 358var value = local.Value.Value; 363local.Value.Value++; 369local.Value.Value++; 373local.Value.Value++; 393var value = local.Value; 399Assert.Equal(1, local.Value); 405Assert.Equal(1, local.Value); 425var value = local.Value; 431Assert.Equal(2, local.Value); 437Assert.Equal(2, local.Value); 441Assert.Equal(1, local.Value); 447Assert.Equal(2, local.Value); 463Assert.Null(local.Value); 466var value = local.Value.Value; 471local.Value.Value++; 472Assert.Equal(2, local.Value.Value); // Second 477local.Value.Value++; 478Assert.Equal(4, local.Value.Value); // Fourth 481local.Value.Value++; 482Assert.Equal(1, local.Value.Value); // First 487local.Value.Value++; 488Assert.Equal(3, local.Value.Value); // Third 505var value = local.Value; 511Assert.Equal(2, local.Value); 519Assert.Equal(2, local.Value); 525Assert.Equal(1, local.Value); 531Assert.Equal(2, local.Value);
Microsoft.AspNetCore.Components.Server.Tests (4)
Circuits\CircuitHostTest.cs (4)
380asyncLocal1ValueInHandler = asyncLocal1.Value; 381asyncLocal3ValueInHandler = asyncLocal3.Value; 390Assert.False(asyncLocal1.Value); 391Assert.False(asyncLocal3.Value);
Microsoft.AspNetCore.Components.Tests (2)
RendererTest.cs (2)
5052var expected = ServiceAccessor.TestAsyncLocal.Value; 5364HotReloadValue = ServiceAccessor.TestAsyncLocal.Value;
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)
.packages\microsoft.extensions.hostfactoryresolver.sources\11.0.0-preview.3.26153.117\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
311if (_currentListener.Value != this) 325if (_currentListener.Value != this)
Microsoft.AspNetCore.Shared.Tests (2)
NonCapturingTimerTest.cs (2)
26tcs.SetResult(message.Value); 37Assert.NotNull(await Task.Run(() => message.Value));
Microsoft.AspNetCore.TestHost (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\11.0.0-preview.3.26153.117\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
311if (_currentListener.Value != this) 325if (_currentListener.Value != this)
Microsoft.AspNetCore.TestHost.Tests (2)
TestClientTests.cs (2)
1102capturedValue = asyncLocal.Value; 1139capturedValue = asyncLocal.Value;
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2999if (_currentListener.Value != this)
Microsoft.Build.Framework (1)
FileUtilities.cs (1)
40get => s_currentThreadWorkingDirectory.Value;
Microsoft.DotNet.Helix.Sdk (1)
LoggerExtensions.cs (1)
21get => s_localCategoryStack.Value ?? ImmutableStack<string>.Empty;
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (16)
Modeler\ServiceClientModelFactory.cs (16)
56private string CurrentMethodName => _methodNameStack.Value.Count != 0 ? _methodNameStack.Value.Peek() : null; 58private string CurrentParameterName => _parameterNameStack.Value.Count != 0 ? _parameterNameStack.Value.Peek() : "Value"; 60private string CurrentTypeName => _typeNameStack.Value.Count != 0 ? _typeNameStack.Value.Peek() : null; 62private string CurrentPropertyName => _propertyNameStack.Value.Count != 0 ? _propertyNameStack.Value.Peek() : "Value"; 66_methodNameStack.Value.Push(name); 70if (_methodNameStack.Value.Pop() != name) 80_parameterNameStack.Value.Push(name); 84if (_parameterNameStack.Value.Pop() != name) 94_typeNameStack.Value.Push(name); 98if (_typeNameStack.Value.Pop() != name) 108_propertyNameStack.Value.Push(name); 112if (_propertyNameStack.Value.Pop() != name)
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
104get => _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)
48_previous = holder.Value; 54internal static CacheEntry? Current => _current.Value; 208Debug.Assert(_current.Value == this, "Entries disposed in invalid order"); 295if ((_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;
Microsoft.Extensions.Validation.GeneratorTests (2)
ValidationsGeneratorTestBase.cs (2)
508if (_currentListener.Value != this) 522if (_currentListener.Value != this)
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (2)
143get { return s_current.Value; } 1272Activity? 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\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ActivityTracker.cs (4)
63ActivityInfo? currentActivity = m_current.Value; 92currentActivity = m_current.Value; 139log.DebugFacilityMessage("OnStopEnterActivityState", ActivityInfo.LiveActivities(m_current.Value)); 144ActivityInfo? currentActivity = m_current.Value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
526public static AssemblyLoadContext? CurrentContextualReflectionContext => s_asyncLocalCurrent?.Value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
26if (AsyncDeserializationInProgress.Value)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
340IPrincipal? 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;
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
45public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 47public static ILogs Logs => _logs.Value; 49public static ITestOutputHelper Output => _output.Value;
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
45public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 47public static ILogs Logs => _logs.Value; 49public static ITestOutputHelper Output => _output.Value;
Templates.Mvc.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
45public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 47public static ILogs Logs => _logs.Value; 49public static ITestOutputHelper Output => _output.Value;
Templates.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
45public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 47public static ILogs Logs => _logs.Value; 49public static ITestOutputHelper Output => _output.Value;