89 writes to Value
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\LogTests.cs (1)
572asyncLocal.Value = "CustomValue";
Aspire.Hosting.Testing (1)
DistributedApplicationEntryPointInvoker.cs (1)
86s_currentListener.Value = this;
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.3.25155.12\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)
351asyncLocal3.Value = true; 367asyncLocal1.Value = true;
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)
36_httpContextCurrent.Value = new HttpContextHolder { Context = value };
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (1)
376_currentListener.Value = this;
Microsoft.AspNetCore.InternalTesting (1)
RepeatContext.cs (1)
15internal set => _current.Value = value;
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionContextAccessor.cs (1)
24set { _storage.Value = value; }
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.3.25155.12\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
233_currentListener.Value = this;
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
424_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\10.0.0-preview.3.25155.12\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
233_currentListener.Value = this;
Microsoft.AspNetCore.TestHost.Tests (2)
TestClientTests.cs (2)
890asyncLocal.Value = value; 915asyncLocal.Value = value;
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
2982_currentListener.Value = this; 3021_currentListener.Value = null;
Microsoft.Build (2)
ElementLocation\XmlDocumentWithLocation.cs (2)
182this._elementLocation.Value = location; 190this._elementLocation.Value = null;
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)
82protected 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; 205_current.Value = _previous;
Microsoft.Extensions.Http.Diagnostics (3)
Latency\Internal\HttpClientLatencyContext.cs (2)
20_latencyContext.Value = context; 25_latencyContext.Value = null;
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)
114_currentScope.Value = newScope; 144_provider._currentScope.Value = Parent;
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)
380s_asyncLocalCurrentCulture!.Value = value; 404s_asyncLocalCurrentUICulture!.Value = value;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
533s_asyncLocalCurrent!.Value = value; // Remove ! when compiler specially-recognizes CompareExchange for nullability
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)
352s_asyncLocalPrincipal.Value = value;
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)
23_output.Value = output; 78_asyncBrowser.Value = browser; 79_logs.Value = logs;
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
23_output.Value = output; 78_asyncBrowser.Value = browser; 79_logs.Value = logs;
Templates.Mvc.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
23_output.Value = output; 78_asyncBrowser.Value = browser; 79_logs.Value = logs;
Templates.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
23_output.Value = output; 78_asyncBrowser.Value = browser; 79_logs.Value = logs;
146 references to Value
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\LogTests.cs (1)
579tcs.SetResult(asyncLocal.Value);
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\10.0.0-preview.3.25155.12\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)
379asyncLocal1ValueInHandler = asyncLocal1.Value; 380asyncLocal3ValueInHandler = asyncLocal3.Value; 389Assert.False(asyncLocal1.Value); 390Assert.False(asyncLocal3.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; 25var holder = _httpContextCurrent.Value;
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (2)
454if (_currentListener.Value != this) 468if (_currentListener.Value != this)
Microsoft.AspNetCore.InternalTesting (1)
RepeatContext.cs (1)
14get => _current.Value;
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionContextAccessor.cs (1)
23get { return _storage.Value; }
Microsoft.AspNetCore.Mvc.Testing (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.3.25155.12\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
311if (_currentListener.Value != this) 325if (_currentListener.Value != this)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (2)
SnapshotTestHelper.cs (2)
502if (_currentListener.Value != this) 516if (_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\10.0.0-preview.3.25155.12\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
311if (_currentListener.Value != this) 325if (_currentListener.Value != this)
Microsoft.AspNetCore.TestHost.Tests (2)
TestClientTests.cs (2)
898capturedValue = asyncLocal.Value; 923capturedValue = asyncLocal.Value;
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2997if (_currentListener.Value != this)
Microsoft.Build (3)
ElementLocation\XmlDocumentWithLocation.cs (3)
206else if (_elementLocation?.Value != null) 208return new XmlElementWithLocation(prefix, localName, namespaceURI, this, _elementLocation.Value.Line, _elementLocation.Value.Column);
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)
81get => _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; 56if (_asyncContextCurrent.Value?.Features == null) 63EnsureCount(_asyncContextCurrent.Value.Features, token.Index + 1); 65value = _asyncContextCurrent.Value.Features[token.Index]; 83if (_asyncContextCurrent.Value?.Features == null) 89EnsureCount(_asyncContextCurrent.Value.Features, token.Index + 1); 91_asyncContextCurrent.Value.Features[token.Index] = value;
Microsoft.Extensions.Caching.Memory (4)
CacheEntry.cs (4)
48_previous = holder.Value; 54internal static CacheEntry? Current => _current.Value; 204Debug.Assert(_current.Value == this, "Entries disposed in invalid order"); 291if ((_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)
94Report(_currentScope.Value); 112Scope? parent = _currentScope.Value;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (2)
140get { 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)
525public 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)
335IPrincipal? principal = s_asyncLocalPrincipal?.Value;
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)
44public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 46public static ILogs Logs => _logs.Value; 48public static ITestOutputHelper Output => _output.Value;
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
44public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 46public static ILogs Logs => _logs.Value; 48public static ITestOutputHelper Output => _output.Value;
Templates.Mvc.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
44public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 46public static ILogs Logs => _logs.Value; 48public static ITestOutputHelper Output => _output.Value;
Templates.Tests (3)
src\Shared\E2ETesting\BrowserTestBase.cs (3)
44public static IWebDriver BrowserAccessor => _asyncBrowser.Value; 46public static ILogs Logs => _logs.Value; 48public static ITestOutputHelper Output => _output.Value;