54 references to AddOrUpdate
Aspire.Dashboard (3)
Components\Pages\Resources.razor.cs (3)
329PageViewModel.ResourceTypesToVisibility.AddOrUpdate(resource.ResourceType, resourceTypeVisible(resource.ResourceType), (_, _) => resourceTypeVisible(resource.ResourceType)); 330PageViewModel.ResourceStatesToVisibility.AddOrUpdate(resource.State ?? string.Empty, stateVisible(resource.State ?? string.Empty), (_, _) => stateVisible(resource.State ?? string.Empty)); 331PageViewModel.ResourceHealthStatusesToVisibility.AddOrUpdate(resource.HealthStatus?.Humanize() ?? string.Empty, healthStatusVisible(resource.HealthStatus?.Humanize() ?? string.Empty), (_, _) => healthStatusVisible(resource.HealthStatus?.Humanize() ?? string.Empty));
Metrics (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Metrics.Legacy (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Microsoft.AspNetCore.SignalR.Core (1)
Internal\HubGroupList.cs (1)
70group.AddOrUpdate(connection.ConnectionId, connection, (_, __) => connection);
Microsoft.Build (1)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
547resolverState.AddOrUpdate(resolver, state, (sdkResolver, obj) => state);
Microsoft.CodeAnalysis.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
85localsToIsAssignedMap.AddOrUpdate(localReference.Local, true, (_1, _2) => true);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
689obj.AddOrUpdate("x", 1, (k, v) => v);
Microsoft.CodeAnalysis.LanguageServer (1)
LanguageServer\Handler\DebugConfiguration\ProjectTargetFrameworkManager.cs (1)
27_ = _projectToTargetFrameworkIdentifer.AddOrUpdate(projectId, identifier, (project, oldIdentifier) => identifier);
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Microsoft.Extensions.AI.Evaluation.Reporting (2)
ResponseCachingChatClient.cs (2)
40_ = _stopWatches.AddOrUpdate(key, addValue: stopwatch, updateValueFactory: (_, _) => stopwatch); 69_ = _stopWatches.AddOrUpdate(key, addValue: stopwatch, updateValueFactory: (_, _) => stopwatch);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
ManualHealthCheckTracker.cs (1)
19_ = _checks.AddOrUpdate(check, true, (_, _) => true);
Microsoft.ML.IntegrationTests (1)
Debugging.cs (1)
206Lines.AddOrUpdate(e.Message, 1, (key, oldValue) => oldValue + 1);
Roslyn.Diagnostics.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
System.ComponentModel.TypeConverter (1)
System\ComponentModel\PropertyDescriptor.cs (1)
176_valueChangedHandlers.AddOrUpdate(component, handler, (k, v) => (EventHandler?)Delegate.Combine(v, handler));
System.Private.Windows.Core.TestUtilities (1)
NoAssertContext.cs (1)
34s_suppressedThreads.AddOrUpdate(Environment.CurrentManagedThreadId, 1, (key, oldValue) => oldValue + 1);
Test.Utilities (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
Text.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
314_wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); 324_wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); 334_wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); 341_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));