193 implementations of TryGetValue
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
541public bool TryGetValue(string name, out object value)
GenerateDocumentationAndConfigFiles (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
308public bool TryGetValue(string key, out StringValues value) => _innerHeaders.TryGetValue(key, out value);
Http3\Http3ConnectionTests.cs (1)
872public bool TryGetValue(string key, out StringValues value) => _innerHeaders.TryGetValue(key, out value);
Metrics (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Metrics.Legacy (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.AspNetCore.Components (1)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
603public bool TryGetValue(string key, out object? value)
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
74bool IDictionary<object, object?>.TryGetValue(object key, out object? value)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1438public bool TryGetValue(string key, out StringValues value)
Microsoft.AspNetCore.Http (4)
HeaderDictionary.cs (1)
317public bool TryGetValue(string key, out StringValues value)
Internal\ItemsDictionary.cs (1)
70bool IDictionary<object, object?>.TryGetValue(object key, out object? value)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
481public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.AspNetCore.Http.Abstractions (1)
Routing\RouteValueDictionary.cs (1)
603public bool TryGetValue(string key, out object? value)
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
129public bool TryGetValue(object key, [MaybeNullWhen(false)] out ValidationStateEntry value)
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
DictionaryModelBinderIntegrationTest.cs (2)
1615bool IDictionary<string, string>.TryGetValue(string key, out string value) 1720bool IDictionary<TKey, TValue>.TryGetValue(TKey key, out TValue value)
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
AttributeDictionary.cs (1)
292public bool TryGetValue(string key, out string? value)
TempDataDictionary.cs (1)
234public bool TryGetValue(string key, out object? value)
ViewDataDictionary.cs (1)
546public bool TryGetValue(string key, out object? value)
Microsoft.AspNetCore.Owin (3)
DictionaryStringArrayWrapper.cs (1)
68bool IDictionary<string, string[]>.TryGetValue(string key, out string[] value)
DictionaryStringValuesWrapper.cs (1)
113bool IDictionary<string, StringValues>.TryGetValue(string key, out StringValues value)
OwinEnvironment.cs (1)
99bool IDictionary<string, object>.TryGetValue(string key, out object value)
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
242public bool TryGetValue(string key, out StringValues value)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
133public bool TryGetValue(string key, out StringValues value)
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
242public bool TryGetValue(string key, out StringValues value)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
133public bool TryGetValue(string key, out StringValues value)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpHeaders.cs (1)
262bool IDictionary<string, StringValues>.TryGetValue(string key, out StringValues value)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1213public bool TryGetValue(string key, out StringValues value) => _innerHeaders.TryGetValue(key, out value);
Microsoft.AspNetCore.Shared.Tests (5)
ClosedGenericMatcherTest.cs (1)
338bool IDictionary<string, object>.TryGetValue(string key, out object value)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
481public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
242public bool TryGetValue(string key, out StringValues value)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
133public bool TryGetValue(string key, out StringValues value)
Microsoft.Build.Framework (3)
ImmutableSegmentedDictionary`2.cs (1)
273public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
ImmutableSegmentedDictionary`2+Builder.cs (1)
211public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
SegmentedDictionary`2.cs (1)
823public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.CodeAnalysis (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Analyzers (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
140public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.CodeStyle (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Collections.Package (5)
Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Extensions.Package (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.InteractiveHost (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Threading.Package (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Workspaces (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.Extensions.AI (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Extensions.AI.Abstractions (3)
AdditionalPropertiesDictionary{TValue}.cs (1)
199bool IDictionary<string, TValue>.TryGetValue(string key, out TValue value) => _dictionary.TryGetValue(key, out value!);
Functions\AIFunctionArguments.cs (1)
160public bool TryGetValue(string key, out object? value) => _arguments.TryGetValue(key, out value);
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Extensions.AI.Ollama (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Extensions.Configuration (1)
ConfigurationManager.cs (1)
343public bool TryGetValue(string key, [NotNullWhen(true)] out object? value)
Microsoft.Extensions.Http.Diagnostics (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Gen.Logging.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Gen.Metrics.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.Interop.SourceGeneration (1)
ValueEqualityImmutableDictionary.cs (1)
57public bool TryGetValue(T key, out U value) => Map.TryGetValue(key, out value);
Microsoft.Maui.Controls (3)
OrderedDictionary.cs (1)
226 public bool TryGetValue(TKey key, out TValue value)
ResourceDictionary.cs (1)
307 public bool TryGetValue(string key, out object value)
Shell\ShellNavigationQueryParameters.cs (1)
99 public bool TryGetValue(string key, out object value)
Microsoft.ML.Core (1)
Utilities\Tree.cs (1)
98public bool TryGetValue(TKey key, out Tree<TKey, TValue> value)
Microsoft.ML.SearchSpace (3)
Option\NestOption.cs (1)
146public bool TryGetValue(string key, out OptionBase value)
Parameter.cs (1)
317public bool TryGetValue(string key, out Parameter value)
SearchSpace.cs (1)
329public bool TryGetValue(string key, out OptionBase value)
Microsoft.ML.TorchSharp (1)
Utils\DefaultDictionary.cs (1)
99public bool TryGetValue(TKey key, out TValue value)
PresentationCore (4)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
634public bool TryGetValue(int key, out ushort value)
System\Windows\Media\CharacterMetricsDictionary.cs (1)
46public bool TryGetValue(int key, out CharacterMetrics value)
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
51public bool TryGetValue(XmlLanguage key, out string value)
System\Windows\Media\GlyphTypeface.cs (1)
1755public bool TryGetValue(ushort key, out double value)
PresentationFramework (2)
MS\Internal\Annotations\ObservableDictionary.cs (1)
139public bool TryGetValue(string key, out string value)
MS\Internal\WeakDictionary.cs (1)
222public bool TryGetValue(TKey key, out TValue value)
Roslyn.Diagnostics.Analyzers (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Shared (1)
EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
System.Collections (3)
System\Collections\Generic\OrderedDictionary.cs (1)
921public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => TryGetValue(key, out value, out _);
System\Collections\Generic\SortedDictionary.cs (1)
257public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System\Collections\Generic\SortedList.cs (1)
671public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System.Collections.Concurrent (1)
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
517public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System.Collections.Immutable (5)
System\Collections\Frozen\FrozenDictionary.cs (1)
612public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
591public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
414public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
466public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
448public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
53public bool TryGetValue(string key, out object value)
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\ActivityTagsCollection.cs (1)
240public bool TryGetValue(string key, out object? value)
System.Linq.Expressions (1)
System\Dynamic\ExpandoObject.cs (1)
660bool IDictionary<string, object?>.TryGetValue(string key, out object? value)
System.Net.Http (1)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (1)
325bool System.Collections.Generic.IDictionary<string, object?>.TryGetValue(string key, out object value) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); }
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
1441public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (1)
46public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
110public bool TryGetValue(string key, [MaybeNullWhen(false)] out object? value)
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
185public bool TryGetValue(CoseHeaderLabel key, out CoseHeaderValue value) => _headerParameters.TryGetValue(key, out value);
System.ServiceModel.Primitives (1)
netstandard.cs (1)
1747public bool TryGetValue(string name, out object value) { value = default; return default; }
System.Speech (1)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (1)
317bool System.Collections.Generic.IDictionary<System.String,System.Speech.Recognition.SemanticValue>.TryGetValue(string key, out System.Speech.Recognition.SemanticValue value) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
System.Text.Json (1)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (1)
227bool IDictionary<string, JsonNode?>.TryGetValue(string propertyName, out JsonNode? jsonNode)
System.Xaml (2)
System\Xaml\NameScope.cs (1)
208public bool TryGetValue(string key, out object value)
System\Xaml\NameScopeDictionary.cs (1)
315bool IDictionary<string, object>.TryGetValue(string key, out object value)
System.Xaml.Tests (2)
System\Xaml\XamlTypeTests.cs (2)
3196bool IDictionary<string, int>.TryGetValue(string key, out int value) => throw new NotImplementedException(); 3198bool IDictionary<int, string>.TryGetValue(int key, out string value) => throw new NotImplementedException();
Test.Utilities (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Text.Analyzers (5)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
802 references to TryGetValue
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
243data.TryGetValue(nameof(Languages), out var languages);
Aspire.Dashboard (3)
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
26if (Context.Request.Headers.TryGetValue(ApiKeyHeaderName, out var apiKey))
Components\Pages\Resources.razor.cs (1)
132static bool IsKeyValueTrue(string key, IDictionary<string, bool> dictionary) => dictionary.TryGetValue(key, out var value) && value;
Model\ResourceViewModel.cs (1)
142if (resourceByName.TryGetValue(resourceName, out resource))
Aspire.Hosting (8)
Dashboard\DashboardServiceAuth.cs (1)
41if (!Request.Headers.TryGetValue(ApiKeyHeaderName, out var headerValues))
Dcp\DcpExecutor.cs (2)
423else if (resource.Metadata.Annotations?.TryGetValue(CustomResource.ServiceProducerAnnotation, out var servicesProducedAnnotationJson) == true) 1532if (resource is Executable exe && exe.Metadata.Annotations.TryGetValue(CustomResource.ResourceReplicaCount, out var value) && int.TryParse(value, CultureInfo.InvariantCulture, out var replicas) && replicas > 1)
Dcp\Model\ModelCommon.cs (4)
33public string? AppModelResourceName => Metadata.Annotations?.TryGetValue(ResourceNameAnnotation, out var value) is true ? value : null; 35public string? AppModelInitialState => Metadata.Annotations?.TryGetValue(ResourceStateAnnotation, out var value) is true ? value : null; 85bool found = annotations.TryGetValue(annotationName, out annotationValue); 106if (annotations.TryGetValue(annotationName, out var annotationVal) && !string.IsNullOrWhiteSpace(annotationVal))
Dcp\Model\Service.cs (1)
91public string? EndpointName => Metadata.Annotations?.TryGetValue(EndpointNameAnnotation, out var value) is true ? value : null;
Aspire.Hosting.Azure (1)
AspireV8ResourceNamePropertyResolver.cs (1)
36if (resource.ProvisionableProperties.TryGetValue("Tags", out var tags) &&
Aspire.Hosting.Tests (2)
DistributedApplicationTests.cs (2)
975Assert.True(resource.Item2.Metadata.Annotations.TryGetValue(Container.ResourceNameAnnotation, out var value)); 989Assert.True(resource.Item2.Metadata.Annotations.TryGetValue(Executable.ResourceNameAnnotation, out var value));
BasicWebSite (2)
Controllers\TestingController.cs (2)
44if (!Request.Headers.TryGetValue("X-Added-Header", out var value)) 70if (Request.Headers.TryGetValue("X-Added-Header", out var value))
CSharpSyntaxGenerator (3)
AbstractFileWriter.cs (3)
223if (derivedTypeName != null && _parentMap.TryGetValue(derivedTypeName, out var baseType)) 241=> _nodeMap.TryGetValue(typeName, out var node) ? node : null; 244=> _typeMap.TryGetValue(typeName, out var node) ? node : null;
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
198var version = urlPackages != null && urlPackages.TryGetValue(packageId, out var urlPackageVersion) ? urlPackageVersion : kvp.Value;
dotnet-svcutil-lib (7)
FrameworkFork\System.ServiceModel\System\IdentityModel\Policy\UnconditionalPolicy.cs (1)
233if (!evaluationContext.Properties.TryGetValue(SecurityUtils.Identities, out obj))
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
159if (!Properties.TryGetValue(propertyName, out dictionaryValue))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UnrecognizedAssertionsBindingElement.cs (2)
66if (!OperationAssertions.TryGetValue(operation, out existent)) 80if (!MessageAssertions.TryGetValue(message, out existent))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceMetadataExtension.cs (1)
277else if (!_updatePortsByScheme.TryGetValue(uri.Scheme, out port))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (1)
575if (authContext.Properties.TryGetValue(SecurityUtils.Identities, out obj))
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceSecurityContext.cs (1)
133if (authContext != null && authContext.Properties.TryGetValue(SecurityUtils.Identities, out identities))
dotnet-user-jwts (2)
Commands\PrintCommand.cs (1)
47if (!jwtStore.Jwts.TryGetValue(id, out var jwt))
Commands\RemoveCommand.cs (1)
53if (!jwtStore.Jwts.TryGetValue(id, out var jwt))
GenerateDocumentationAndConfigFiles (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
GenericHostWebSite (2)
Controllers\TestingController.cs (2)
43if (!Request.Headers.TryGetValue("X-Added-Header", out var value)) 56if (Request.Headers.TryGetValue("X-Added-Header", out var value))
illink (3)
InMemory.FunctionalTests (7)
Http2\Http2ConnectionTests.cs (2)
308public bool TryGetValue(string key, out StringValues value) => _innerHeaders.TryGetValue(key, out value); 505if (persistentStateCollection.TryGetValue("Counter", out var value))
Http2\Http2WebSocketTests.cs (3)
26Assert.False(context.Request.Headers.TryGetValue(":protocol", out var _)); 88Assert.False(context.Request.Headers.TryGetValue(":protocol", out var _)); 164Assert.False(context.Request.Headers.TryGetValue(":protocol", out var _));
Http3\Http3ConnectionTests.cs (1)
872public bool TryGetValue(string key, out StringValues value) => _innerHeaders.TryGetValue(key, out value);
RequestTests.cs (1)
2141if (persistentStateCollection.TryGetValue("Counter", out var value))
InProcessWebSite (3)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (3)
472if (ctx.Request.Headers.TryGetValue(headerName, out var headerValue) || (string[])headerValue is not null) 659if (ctx.Request.Headers.TryGetValue("Response-Content-Type", out var contentType)) 691if (ctx.Request.Headers.TryGetValue("Response-Content-Type", out var contentType))
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
837if (persistentStateCollection.TryGetValue("Counter", out var value))
Kestrel.SampleApp (1)
ClientCertBufferingFeature.cs (1)
30&& !connectionItems.Items.TryGetValue("tls.clientcert.negotiated", out var _))
Metrics (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Metrics.Legacy (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.Analyzers.Local (2)
ApiLifecycle\Json\JsonObject.cs (2)
44get => _properties.TryGetValue(key, out var value) 106if (_properties.TryGetValue(oldKey, out var value))
Microsoft.AspNetCore (5)
WebApplication.cs (1)
300if (_webApplication.Properties.TryGetValue("__MiddlewareDescriptions", out var value) &&
WebApplicationBuilder.cs (4)
395if (app.Properties.TryGetValue(EndpointRouteBuilderKey, out var priorRouteBuilder)) 417if (!_builtApplication.Properties.TryGetValue(EndpointRouteBuilderKey, out var localRouteBuilder)) 498if (_builtApplication.Properties.TryGetValue(MiddlewareDescriptionsKey, out var sourceValue) && 499app.Properties.TryGetValue(MiddlewareDescriptionsKey, out var destinationValue) &&
Microsoft.AspNetCore.Antiforgery (3)
Internal\DefaultAntiforgery.cs (2)
366if (responseHeaders.TryGetValue(HeaderNames.CacheControl, out var cacheControlHeader) && 381if (responseHeaders.TryGetValue(HeaderNames.Pragma, out var pragmaHeader) && pragmaHeader.Count > 0)
src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (1)
180if (!dictionary.TryGetValue(key, out var value))
Microsoft.AspNetCore.Authentication (2)
RemoteAuthenticationHandler.cs (2)
205&& ticket.Properties.Items.TryGetValue(AuthSchemeKey, out var authenticatedScheme) 252if (!properties.Items.TryGetValue(CorrelationProperty, out var correlationId))
Microsoft.AspNetCore.Authentication.Abstractions (6)
AuthenticationProperties.cs (4)
126return Items.TryGetValue(key, out var value) ? value : null; 153=> Parameters.TryGetValue(key, out var obj) && obj is T value ? value : default; 171if (Items.TryGetValue(key, out var value) && bool.TryParse(value, out var boolValue)) 202if (Items.TryGetValue(key, out var value)
TokenExtensions.cs (2)
66return properties.Items.TryGetValue(tokenKey, out var value) ? value : null; 100if (properties.Items.TryGetValue(TokenNamesKey, out var value) && !string.IsNullOrEmpty(value))
Microsoft.AspNetCore.Authentication.Core (3)
AuthenticationSchemeProvider.cs (3)
123=> Task.FromResult(_schemes.TryGetValue(name, out var scheme) ? scheme : null); 187if (!_schemes.TryGetValue(name, out _)) 193if (_schemes.TryGetValue(name, out var scheme))
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
100else if (!properties.Items.TryGetValue(name, out value))
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
114else if (!properties.Items.TryGetValue(name, out value))
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
210if (context.Properties.Items.TryGetValue(OAuthConstants.CodeVerifierKey, out var codeVerifier))
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (2)
958properties.Items.TryGetValue(OpenIdConnectDefaults.UserstatePropertiesKey, out var userstate); 1269if (properties.Items.TryGetValue(OAuthConstants.CodeVerifierKey, out var codeVerifier))
UniqueJsonKeyClaimAction.cs (1)
49return c.Properties.TryGetValue(JwtSecurityTokenHandler.ShortClaimTypeProperty, out var shortType)
Microsoft.AspNetCore.Authentication.Test (3)
OpenIdConnect\TestSettings.cs (1)
298if (actualParams.TryGetValue(parameterName, out actualValue))
WsFederation\WsFederationTest.cs (1)
312if (!context.ProtocolMessage.Parameters.TryGetValue("suppressWctx", out var suppress))
WsFederation\WsFederationTest_Handler.cs (1)
301if (!context.ProtocolMessage.Parameters.TryGetValue("suppressWctx", out var suppress))
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (2)
197properties.Items.TryGetValue(WsFederationDefaults.UserstatePropertiesKey, out var userState); 214if (properties.Items.TryGetValue(CorrelationProperty, out string? correlationId)
Microsoft.AspNetCore.BrowserTesting (3)
BrowserManagerConfiguration.cs (2)
51if (!BrowserOptions.TryGetValue(browser, out var browserOptions)) 66Combine(GetContextOptions(browser.ToString()), ContextOptions.TryGetValue(contextName, out var context) ? context : throw new InvalidOperationException("Invalid context name"));
ContextInformation.cs (1)
45if (Pages.TryGetValue(page, out var info))
Microsoft.AspNetCore.Components (2)
PersistentComponentState.cs (1)
207if (_existingState.TryGetValue(key, out value))
src\Http\Routing\src\ParameterPolicyActivator.cs (1)
92return inlineParameterPolicyMap.TryGetValue(policyKey, out policyType);
Microsoft.AspNetCore.Components.Endpoints (3)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
300if (!httpContext.Items.TryGetValue(ComponentSequenceKey, out var result))
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (2)
171if (!httpContext.Items.TryGetValue(InvokedRenderModesKey, out var result)) 196return httpContext.Items.TryGetValue(InvokedRenderModesKey, out var result)
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitHandleRegistry.cs (2)
10if (circuitHandles.TryGetValue(circuitKey, out var circuitHandle)) 20if (circuitHandles.TryGetValue(circuitKey, out var circuitHandle))
Microsoft.AspNetCore.Components.Tests (2)
PersistentState\ComponentStatePersistenceManagerTest.cs (2)
128Assert.True(testStore.State.TryGetValue(typeof(PersistentServicesRegistry).FullName, out var registrations)); 157Assert.True(store.State.TryGetValue("MyState", out var persisted));
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (18)
ContentEncodingNegotiatorTests.cs (18)
29Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 31Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 51Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 52Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 72Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 74Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 95Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 97Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 118Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 120Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 141Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 143Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 164Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 166Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 186Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 187Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader)); 207Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding)); 209Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
Microsoft.AspNetCore.Components.WebView (2)
FileExtensionContentTypeProvider.cs (1)
447return Mappings.TryGetValue(extension, out contentType);
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
390if (!existing.TryGetValue(key, out var existingNode))
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoWebViewManager.cs (1)
56headers.TryGetValue("Content-Type", out contentType);
Microsoft.AspNetCore.Components.WebView.Test (1)
StaticContentProviderTests.cs (1)
40Assert.True(headers.TryGetValue("Content-Type", out var contentTypeValue));
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
src\Shared\EventSource.Testing\TestCounterListener.cs (2)
52if (payload.TryGetValue("Increment", out var increment)) 56if (payload.TryGetValue("Mean", out var mean))
Microsoft.AspNetCore.Connections.Abstractions (3)
ConnectionItems.cs (3)
45if (Items.TryGetValue(key, out var value)) 76return Items.TryGetValue(key, out value); 116if (Items.TryGetValue(item.Key, out var value) && Equals(item.Value, value))
Microsoft.AspNetCore.Cors (2)
Infrastructure\CorsOptions.cs (1)
91if (PolicyMap.TryGetValue(name, out var result))
Infrastructure\DefaultCorsPolicyProvider.cs (1)
30if (_options.PolicyMap.TryGetValue(policyName, out var result))
Microsoft.AspNetCore.Diagnostics (5)
ExceptionHandler\ExceptionHandlerExtensions.cs (1)
114if (app.Properties.TryGetValue(RerouteHelper.GlobalRouteBuilderKey, out var routeBuilder) && routeBuilder is not null)
src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
StatusCodePage\StatusCodePagesExtensions.cs (2)
152if (app.Properties.TryGetValue(RerouteHelper.GlobalRouteBuilderKey, out var routeBuilder) && routeBuilder is not null) 184if (app.Properties.TryGetValue(RerouteHelper.GlobalRouteBuilderKey, out var routeBuilder) && routeBuilder is not null)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
HealthCheckMiddleware.cs (1)
49if (!_healthCheckOptions.ResultStatusCodes.TryGetValue(result.Status, out var statusCode))
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Latency\AddServerTimingHeaderMiddleware.cs (1)
42if (httpContext.Response.Headers.TryGetValue(ServerTimingHeaderName, out var existing))
Logging\HeaderReader.cs (1)
40if (headers.TryGetValue(header.Key, out var headerValue))
Logging\RequestHeadersLogEnricher.cs (1)
69if (request.Headers.TryGetValue(header.Key, out var headerValue) && !string.IsNullOrEmpty(headerValue))
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (2)
74Assert.False(httpContextMock.Response.Headers.TryGetValue(TelemetryConstants.ServerApplicationNameHeader, out var val)); 133Assert.False(httpContextMock.Response.Headers.TryGetValue(TelemetryConstants.ServerApplicationNameHeader, out var val));
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
UnaryServerCallHandlerTests.cs (2)
1380c.UserState.TryGetValue("__HttpContext", out requestHttpContext); 1402c.UserState.TryGetValue("IntercepterRun", out interceptorRun);
Microsoft.AspNetCore.Grpc.Swagger.Tests (18)
Binding\BodyTests.cs (4)
28Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 47Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 63Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 77Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation));
Binding\ParametersTests.cs (9)
28Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation)); 44Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation)); 60Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 81Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 98Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation)); 112Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation)); 128Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation)); 150Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation)); 178Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation));
Binding\ResponseBodyTests.cs (4)
29Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 43Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 59Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation)); 84Assert.True(path.Operations.TryGetValue(OperationType.Post, out var operation));
GrpcSwaggerServiceExtensionsTests.cs (1)
48Assert.True(path.Operations.TryGetValue(OperationType.Get, out var operation));
Microsoft.AspNetCore.HeaderParsing (3)
HeaderParsingFeature.cs (1)
139if (feature.Context!.Request.Headers.TryGetValue(header.Name, out var values))
HeaderRegistry.cs (2)
41if (!_options.MaxCachedValuesPerHeader.TryGetValue(id.HeaderName, out maxCachedValues)) 48if (_options.DefaultValues.TryGetValue(id.HeaderName, out var defValue))
Microsoft.AspNetCore.HeaderPropagation (2)
HeaderPropagationMessageHandler.cs (1)
64if (captured.TryGetValue(entry.CapturedHeaderName, out var stringValues) &&
HeaderPropagationMiddleware.cs (1)
71context.Request.Headers.TryGetValue(entry.InboundHeaderName, out var value);
Microsoft.AspNetCore.HostFiltering.Tests (2)
HostFilteringMiddlewareTests.cs (2)
65Assert.False(c.Request.Headers.TryGetValue(HeaderNames.Host, out var host)); 106Assert.True(c.Request.Headers.TryGetValue(HeaderNames.Host, out var host));
Microsoft.AspNetCore.Hosting (3)
GenericHost\WebHostBuilderBase.cs (1)
76if (!context.Properties.TryGetValue(typeof(WebHostBuilderContext), out var contextVal))
src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
390if (!existing.TryGetValue(key, out var existingNode))
Microsoft.AspNetCore.Hosting.Tests (2)
src\Shared\EventSource.Testing\TestCounterListener.cs (2)
52if (payload.TryGetValue("Increment", out var increment)) 56if (payload.TryGetValue("Mean", out var mean))
Microsoft.AspNetCore.Http (7)
Builder\ApplicationBuilder.cs (2)
107return Properties.TryGetValue(key, out var value) ? (T?)value : default(T); 214if (_applicationBuilder.Properties.TryGetValue("__MiddlewareDescriptions", out var value) &&
Internal\ItemsDictionary.cs (3)
32if (_items != null && _items.TryGetValue(key, out var value)) 73return _items != null && _items.TryGetValue(key, out value); 122if (_items.TryGetValue(item.Key, out var value) && Equals(item.Value, value))
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
116return ReadDictionary.TryGetValue(key, out value);
Timeouts\RequestTimeoutsMiddleware.cs (1)
67if (options.Policies.TryGetValue(timeoutMetadata.PolicyName!, out var policy))
Microsoft.AspNetCore.Http.Abstractions (4)
Extensions\UsePathBaseExtensions.cs (1)
33if (app.Properties.TryGetValue(RerouteHelper.GlobalRouteBuilderKey, out var routeBuilder) && routeBuilder is not null)
Internal\ParsingHelpers.cs (2)
14return headers.TryGetValue(key, out value) ? value : StringValues.Empty; 46return headers.TryGetValue(key, out values) ? values : StringValues.Empty;
src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
Microsoft.AspNetCore.Http.Extensions.Tests (3)
ValidationFilterEndpointFactoryTests.cs (3)
60Assert.True(problemDetails.Extensions.TryGetValue("errors", out var errorsObj)); 110Assert.True(problemDetails.Extensions.TryGetValue("errors", out var errorsObj)); 168Assert.True(problemDetails.Extensions.TryGetValue("errors", out var errorsObj));
Microsoft.AspNetCore.HttpLogging (5)
W3CLoggingMiddleware.cs (5)
146if (request.Headers.TryGetValue(HeaderNames.Host, out var host)) 154if (request.Headers.TryGetValue(HeaderNames.Referer, out var referer)) 162if (request.Headers.TryGetValue(HeaderNames.UserAgent, out var agent)) 172if (request.Headers.TryGetValue(HeaderNames.Cookie, out var cookie)) 184if (request.Headers.TryGetValue(additionalRequestHeaders[i], out var headerValue))
Microsoft.AspNetCore.Identity (4)
SignInManager.cs (4)
852if (!properties.Items.TryGetValue(PasskeyCreationOptionsKey, out var optionsJson) || optionsJson is null) 890if (!properties.Items.TryGetValue(PasskeyRequestOptionsKey, out var optionsJson) || optionsJson is null) 1253if (auth?.Principal == null || items == null || !items.TryGetValue(LoginProviderKey, out var provider)) 1260if (!items.TryGetValue(XsrfKey, out var userId) ||
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
src\Identity\test\Shared\PriorityOrderer.cs (1)
72if (dictionary.TryGetValue(key, out var result))
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\HtmlPageContext.cs (1)
25_properties.TryGetValue(key, out var rawValue) ? (TValue)rawValue : default;
Microsoft.AspNetCore.Identity.InMemory.Test (1)
src\Identity\test\Shared\PriorityOrderer.cs (1)
72if (dictionary.TryGetValue(key, out var result))
Microsoft.AspNetCore.Identity.Test (1)
src\Identity\test\Shared\PriorityOrderer.cs (1)
72if (dictionary.TryGetValue(key, out var result))
Microsoft.AspNetCore.JsonPatch (3)
Internal\DictionaryAdapterOfTU.cs (3)
61if (!dictionary.TryGetValue(convertedKey, out var valueAsT)) 150if (!dictionary.TryGetValue(convertedKey, out var currentValue)) 197if (dictionary.TryGetValue(convertedKey, out var valueAsT))
Microsoft.AspNetCore.JsonPatch.SystemTextJson (3)
Internal\DictionaryAdapterOfTU.cs (3)
55if (!dictionary.TryGetValue(convertedKey, out var valueAsT)) 141if (!dictionary.TryGetValue(convertedKey, out var currentValue)) 187if (dictionary.TryGetValue(convertedKey, out var valueAsT))
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (3)
CustomNamingStrategyTests.cs (1)
33cont.TryGetValue("customTest", out var valueFromDictionary);
TestObjectModels\DynamicTestObject.cs (1)
70return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
WriteOnceDynamicTestObject.cs (1)
84return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
Microsoft.AspNetCore.JsonPatch.Tests (8)
CustomNamingStrategyTests.cs (2)
81cont.TryGetValue("customStringProperty", out var valueFromDictionary); 109cont.TryGetValue("customTest", out var valueFromDictionary);
IntegrationTests\ExpandoObjectIntegrationTest.cs (4)
233cont.TryGetValue("IntegerValue", out object valueFromDictionary); 255cont.TryGetValue("StringProperty", out var valueFromDictionary); 295cont.TryGetValue("Test", out object valueFromDictionary); 336cont.TryGetValue("Test", out object valueFromDictionary);
TestObjectModels\DynamicTestObject.cs (1)
70return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
WriteOnceDynamicTestObject.cs (1)
84return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
Microsoft.AspNetCore.MiddlewareAnalysis (1)
AnalysisBuilder.cs (1)
66if (Properties.TryGetValue(NextMiddlewareName, out var middlewareNameObj) && middlewareNameObj != null)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Abstractions\ActionDescriptorExtensions.cs (1)
22if (actionDescriptor.Properties.TryGetValue(typeof(T), out var value))
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiDescriptionExtensions.cs (1)
22if (apiDescription.Properties.TryGetValue(typeof(T), out var value))
ApiResponseTypeProvider.cs (2)
40action.Properties.TryGetValue(typeof(ApiConventionResult), out var result)) 48if (action.Properties.TryGetValue(typeof(ProducesErrorResponseTypeAttribute), out result))
Microsoft.AspNetCore.Mvc.Core (17)
ApplicationModels\AttributeRouteModel.cs (1)
409if (!values.TryGetValue(token, out var value))
Formatters\TextOutputFormatter.cs (1)
184OutputMediaTypeCache.TryGetValue(mediaType, out var mediaTypeWithCharset))
Infrastructure\ActionSelectionTable.cs (2)
73a.RouteValues?.TryGetValue(key, out value); 95e.Metadata.GetMetadata<ActionDescriptor>()?.RouteValues?.TryGetValue(key, out value);
Infrastructure\ControllerActionInvoker.cs (1)
545if (!actionParameters.TryGetValue(parameterInfo.Name!, out var value) || value is null)
Infrastructure\DefaultProblemDetailsFactory.cs (1)
99if (_options.ClientErrorMapping.TryGetValue(statusCode, out var clientErrorData))
Infrastructure\ResourceInvoker.Log.cs (2)
42if (action.RouteValues.TryGetValue("page", out var page) && page != null) 103if (action.RouteValues.TryGetValue("page", out var page) && page != null)
ModelBinding\Binders\HeaderModelBinder.cs (1)
107if (request.Headers.TryGetValue(headerName, out var header))
ModelBinding\JQueryFormValueProvider.cs (1)
30if (values.TryGetValue(FormValueHelper.CultureInvariantFieldName, out var invariantKeys) && invariantKeys.Count > 0)
ModelBinding\JQueryValueProvider.cs (1)
77if (_values.TryGetValue(key, out var values) && values.Count > 0)
ModelBinding\Validation\ShortFormDictionaryValidationStrategy.cs (1)
98if (_model.TryGetValue(_keyMappingEnumerator.Current.Value, out value))
ResponseCacheAttribute.cs (1)
89options.CacheProfiles.TryGetValue(CacheProfileName, out selectedProfile);
Routing\KnownRouteValueConstraint.cs (1)
103if (action.RouteValues.TryGetValue(routeKey, out var value) &&
Routing\NormalizedRouteValue.cs (1)
35if (actionDescriptor.RouteValues.TryGetValue(key, out var value) &&
Routing\UrlHelperFactory.cs (1)
38if (httpContext.Items.TryGetValue(typeof(IUrlHelper), out var value) && value is IUrlHelper urlHelper)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
116return ReadDictionary.TryGetValue(key, out value);
Microsoft.AspNetCore.Mvc.Core.Test (4)
ResponseCacheAttributeTest.cs (4)
221Assert.True(response.Headers.TryGetValue("Cache-Control", out values)); 224Assert.True(response.Headers.TryGetValue("Vary", out values)); 277Assert.True(context.HttpContext.Response.Headers.TryGetValue("Cache-Control", out values)); 296Assert.True(context.HttpContext.Response.Headers.TryGetValue("Cache-Control", out values));
Microsoft.AspNetCore.Mvc.Cors (1)
CorsHttpMethodActionConstraint.cs (1)
34request.Headers.TryGetValue(AccessControlRequestMethod, out var accessControlRequestMethod) &&
Microsoft.AspNetCore.Mvc.FunctionalTests (9)
RoutingAcrossPipelineBranchesTest.cs (4)
58Assert.True(subdirContent.RouteValues.TryGetValue("subdir", out var subdir)); 62Assert.True(commonContent.RouteValues.TryGetValue("common", out var common)); 66Assert.True(defaultContent.RouteValues.TryGetValue("default", out var @default)); 171Assert.True(content.RouteValues.TryGetValue("action", out var action));
RoutingDynamicOrderTest.cs (4)
74Assert.True(content.RouteValues.TryGetValue("identifier", out var identifier)); 97Assert.False(content.RouteValues.TryGetValue("identifier", out var identifier)); 119Assert.True(content.RouteValues.TryGetValue("identifier", out var identifier)); 163Assert.True(content.RouteValues.TryGetValue("identifier", out var identifier));
RoutingGroupsTest.cs (1)
46Assert.True(content.RouteValues.TryGetValue("org", out var org));
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
DictionaryModelBinderIntegrationTest.cs (2)
1617return _data.TryGetValue(key, out value); 1722return _data.TryGetValue(key, out value);
Microsoft.AspNetCore.Mvc.Razor (2)
LanguageViewLocationExpander.cs (1)
59context.Values.TryGetValue(ValueKey, out var value);
RazorPage.cs (1)
161if (PreviousSectionWriters.TryGetValue(sectionName, out var renderDelegate))
Microsoft.AspNetCore.Mvc.RazorPages (2)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensions.cs (2)
30if (builder.Items.TryGetValue(EndpointRouteBuilderKey, out var endpointBuilder)) 32var (resolver, registered) = builder.Items.TryGetValue(ResourceCollectionResolverKey, out var value)
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageBinderFactoryTest.cs (1)
832if (_args.TryGetValue(parameter.Name, out var result))
Microsoft.AspNetCore.Mvc.TagHelpers (1)
OptionTagHelper.cs (1)
74context.Items.TryGetValue(typeof(SelectTagHelper), out var formDataEntry);
Microsoft.AspNetCore.Mvc.ViewFeatures (15)
DefaultEditorTemplates.cs (1)
199if (htmlAttributes.TryGetValue("class", out var htmlClassObject))
DefaultHtmlGenerator.cs (1)
1536htmlAttributeDictionary.TryGetValue(fallbackAttributeName, out var attributeObject);
Filters\SaveTempDataFilter.cs (1)
111if (httpContext.Items.TryGetValue(SaveTempDataFilterContextKey, out var value))
Filters\SaveTempDataPropertyFilterBase.cs (1)
49OriginalValues.TryGetValue(property.PropertyInfo, out var originalValue);
NameAndIdProvider.cs (2)
46if (items.TryGetValue(PreviousNameAndIdKey, out previousNameAndIdObject) && 145if (items.TryGetValue(PreviousNameAndIdKey, out previousNameAndIdObject) &&
PartialViewResultExecutor.cs (1)
175if (actionDescriptor.RouteValues.TryGetValue(ActionNameKey, out var value) &&
TempDataDictionaryFactory.cs (1)
35if (context.Items.TryGetValue(Key, out obj))
TryGetValueDelegate.cs (1)
7/// A delegate for <see cref="System.Collections.Generic.IDictionary{TKey, TValue}.TryGetValue(TKey, out TValue)"/>.
TryGetValueProvider.cs (1)
89var success = strongDict.TryGetValue((TKey)(object)key, out strongValue);
ViewComponents\DefaultViewComponentInvoker.cs (1)
214if (!parameters.TryGetValue(parameterInfo.Name!, out var value))
ViewDataDictionary.cs (2)
310_data.TryGetValue(index, out var result); 550return _data.TryGetValue(key, out value);
ViewDataEvaluator.cs (1)
162success = dict.TryGetValue(key, out value);
ViewResultExecutor.cs (1)
175if (actionDescriptor.RouteValues.TryGetValue(ActionNameKey, out var value) &&
Microsoft.AspNetCore.OpenApi (6)
Services\OpenApiDocumentService.cs (1)
175annotations.TryGetValue(OpenApiConstants.DescriptionId, out var descriptionId) &&
Services\Schemas\OpenApiSchemaService.cs (5)
159schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var resolvedBaseSchemaId)) 214schema.Metadata.TryGetValue(OpenApiConstants.RefId, out var refId) && 217if (schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var schemaId) && 232schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var referenceId) && 333if (schema.Properties.TryGetValue(propertyInfo.Name, out var propertySchema))
Microsoft.AspNetCore.OpenApi.Tests (52)
Services\CreateSchemaReferenceIdTests.cs (3)
38Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 52Assert.True(document.Components.Schemas.TryGetValue("MyShapeMyTriangle", out var triangleSchema)); 55Assert.True(document.Components.Schemas.TryGetValue("MyShapeMySquare", out var squareSchema));
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
695Assert.True(response.Content.TryGetValue("application/json", out var mediaType));
Services\OpenApiSchemaService\OpenApiSchemaService.PolymorphicSchemas.cs (25)
24Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 38Assert.True(document.Components.Schemas.TryGetValue("ShapeTriangle", out var triangleSchema)); 41Assert.True(document.Components.Schemas.TryGetValue("ShapeSquare", out var squareSchema)); 61Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 77Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithCity", out var citySchema)); 81Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithTimeSeries", out var timeSeriesSchema)); 85Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithLocalNews", out var newsSchema)); 106Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 120Assert.True(document.Components.Schemas.TryGetValue("PersonStudent", out var citySchema)); 124Assert.True(document.Components.Schemas.TryGetValue("PersonTeacher", out var timeSeriesSchema)); 145Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 156Assert.True(document.Components.Schemas.TryGetValue("ColorPaintColor", out var paintSchema)); 160Assert.True(document.Components.Schemas.TryGetValue("ColorFabricColor", out var fabricSchema)); 164Assert.True(document.Components.Schemas.TryGetValue("ColorBase", out var colorSchema)); 184Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 208Assert.True(document.Components.Schemas.TryGetValue("PetDog", out var dogSchema)); 212Assert.True(document.Components.Schemas.TryGetValue("PetCat", out var catSchema)); 216Assert.True(document.Components.Schemas.TryGetValue("PetPet", out var petSchema)); 237Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 248Assert.True(document.Components.Schemas.TryGetValue("OrganismAnimal", out var animalSchema)); 250Assert.True(document.Components.Schemas.TryGetValue("OrganismPlant", out var plantSchema)); 252Assert.True(document.Components.Schemas.TryGetValue("OrganismBase", out var baseSchema)); 272Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 290Assert.True(document.Components.Schemas.TryGetValue("EmployeeManager", out var managerSchema)); 292Assert.True(document.Components.Schemas.TryGetValue("EmployeeEmployee", out var employeeSchema));
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (2)
329Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); 369Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (12)
48Assert.True(response.Content.TryGetValue(contentType, out var mediaType)); 69Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 183Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 249Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 303Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 371Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 411Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 473Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 522Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 602Assert.True(response.Content.TryGetValue("application/problem+json", out var mediaType)); 660Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); 690Assert.True(response.Content.TryGetValue("application/json", out var mediaType));
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
301Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _));
Transformers\SchemaTransformerTests.cs (8)
233Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _)); 512Assert.True(triangleSubschema.Extensions.TryGetValue("x-my-extension", out var _)); 589Assert.True(triangleSubschema.Extensions.TryGetValue("x-my-extension", out var triangleExtension)); 595Assert.True(squareSubschema.Extensions.TryGetValue("x-my-extension", out var squareExtension)); 631Assert.True(triangleSubschema.Extensions.TryGetValue("x-my-extension", out var triangleExtension)); 637Assert.True(squareSubschema.Extensions.TryGetValue("x-my-extension", out var squareExtension)); 673Assert.True(triangleSubschema.Extensions.TryGetValue("x-my-extension", out var triangleExtension)); 679Assert.True(squareSubschema.Extensions.TryGetValue("x-my-extension", out var squareExtension));
Microsoft.AspNetCore.Owin (22)
DictionaryStringArrayWrapper.cs (1)
71if (Inner.TryGetValue(key, out temp))
DictionaryStringValuesWrapper.cs (3)
32return Inner.TryGetValue(key, out values) ? values : null; 50if (!Inner.TryGetValue(HeaderNames.ContentLength, out rawValue)) 116if (Inner.TryGetValue(key, out temp))
OwinEnvironment.cs (5)
82bool IDictionary<string, object>.ContainsKey(string key) => ((IDictionary<string, object>)this).TryGetValue(key, out _); 105return _context.Items.TryGetValue(key, out value); 123if (_context.Items.TryGetValue(key, out value)) 517return _contextEntries.TryGetValue(key, out entry); 531return _contextDependentEntries.TryGetValue(key, out entry);
OwinExtensions.cs (1)
137if (env.TryGetValue(typeof(HttpContext).FullName, out obj))
OwinFeatureCollection.cs (6)
63if (Environment.TryGetValue(key, out value) && value is T) 232if (Environment.TryGetValue(OwinConstants.SendFiles.SendAsync, out obj)) 246&& (Environment.TryGetValue(OwinConstants.CommonKeys.LoadClientCertAsync, out obj) 247|| Environment.TryGetValue(OwinConstants.CommonKeys.ClientCertificate, out obj)) 307return Environment.TryGetValue(OwinConstants.WebSocket.AcceptAlt, out _); 314if (!Environment.TryGetValue(OwinConstants.WebSocket.AcceptAlt, out obj))
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
119if (environment.TryGetValue(OwinConstants.WebSocket.Accept, out accept) && accept is WebSocketAccept)
WebSockets\OwinWebSocketAcceptContext.cs (1)
37if (_options != null && _options.TryGetValue(OwinConstants.WebSocket.SubProtocol, out obj))
WebSockets\OwinWebSocketAdapter.cs (2)
61if (_websocketContext.TryGetValue(OwinConstants.WebSocket.ClientCloseStatus, out obj)) 75if (_websocketContext.TryGetValue(OwinConstants.WebSocket.ClientCloseDescription, out obj))
WebSockets\WebSocketAcceptAdapter.cs (2)
66if (environment.TryGetValue(OwinConstants.WebSocket.AcceptAlt, out accept) && accept is WebSocketAcceptAlt) 76if (adapter._options != null && adapter._options.TryGetValue(typeof(WebSocketAcceptContext).FullName, out obj))
Microsoft.AspNetCore.Owin.Microbenchmarks (4)
Benchmarks\OwinEnvironmentBenchmark.cs (4)
29_ = env.TryGetValue("server.LocalPort", out var localPort); 30_ = env.TryGetValue("server.RemotePort", out var remotePort); 35_ = env.TryGetValue("owin.RequestHeaders", out var requestHeaders); 39_ = env.TryGetValue("owin.ResponseHeaders", out var responseHeaders);
Microsoft.AspNetCore.Owin.Tests (6)
OwinEnvironmentTests.cs (5)
16return environment.TryGetValue(key, out value) ? (T)value : default(T); 107Assert.False(env.TryGetValue(key, out value)); 122Assert.True(env.TryGetValue("owin.CallCancelled", out value), "owin.CallCancelled"); 123Assert.True(env.TryGetValue("owin.Version", out value), "owin.Version"); 216Assert.True(owinEnvironment.TryGetValue("owin.ResponseBody", out var responseBody));
OwinFeatureCollectionTests.cs (1)
19return env.TryGetValue(key, out value) ? (T)value : default(T);
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
116return ReadDictionary.TryGetValue(key, out value);
Microsoft.AspNetCore.RequestDecompression (1)
DefaultRequestDecompressionProvider.cs (1)
48if (_providers.TryGetValue(encodingName, out var matchingProvider))
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
161if (context.CachedResponseHeaders.TryGetValue(key, out var values))
Microsoft.AspNetCore.Rewrite (5)
ApacheModRewrite\FlagParser.cs (1)
77if (!_ruleFlagLookup.TryGetValue(tokenSpan[hasPayload[0]].ToString(), out flag))
ApacheModRewrite\Flags.cs (2)
36if (!FlagDictionary.TryGetValue(flag, out var res)) 49if (!FlagDictionary.TryGetValue(flag, out var res))
RewriteBuilderExtensions.cs (1)
48if (app.Properties.TryGetValue(RerouteHelper.GlobalRouteBuilderKey, out var routeBuilder) && routeBuilder is not null)
src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
Microsoft.AspNetCore.Routing (8)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (2)
46if (builder.Properties.TryGetValue(GlobalEndpointRouteBuilderKey, out var obj)) 131if (!app.Properties.TryGetValue(EndpointRouteBuilder, out var obj))
Matching\HttpMethodMatcherPolicy.cs (2)
120headers.TryGetValue(HeaderNames.AccessControlRequestMethod, out var accessControlRequestMethod) && 426headers.TryGetValue(HeaderNames.AccessControlRequestMethod, out accessControlRequestMethod) &&
ParameterPolicyActivator.cs (1)
92return inlineParameterPolicyMap.TryGetValue(policyKey, out policyType);
src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
Tree\TreeRouter.cs (2)
107if (_namedEntries.TryGetValue(entry.RouteName, out var namedMatch) && 268if (_namedEntries.TryGetValue(context.RouteName, out var match))
Microsoft.AspNetCore.Routing.Tests (2)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (2)
339Assert.True(app.Properties.TryGetValue("__EndpointRouteBuilder", out var local)); 340Assert.True(app.Properties.TryGetValue("__GlobalEndpointRouteBuilder", out var global));
Microsoft.AspNetCore.Server.HttpSys (6)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (3)
190Store.TryGetValue(key, out values); 223if (Store.TryGetValue(key, out values)) 244return Store.TryGetValue(key, out value);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
135return PropertiesTryGetValue(key, out value) || Extra.TryGetValue(key, out value); 161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
UrlPrefixCollection.cs (1)
78return _prefixes.TryGetValue(id, out var prefix) ? prefix : null;
Microsoft.AspNetCore.Server.IIS (5)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (3)
190Store.TryGetValue(key, out values); 223if (Store.TryGetValue(key, out values)) 244return Store.TryGetValue(key, out value);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
135return PropertiesTryGetValue(key, out value) || Extra.TryGetValue(key, out value); 161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
IISDeployer.cs (2)
165if (IISDeploymentParameters.HandlerSettings.TryGetValue("debugFile", out var debugFile)) 170if (DeploymentParameters.EnvironmentVariables.TryGetValue("ASPNETCORE_MODULE_DEBUG_FILE", out debugFile))
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Internal\Http\HttpProtocol.cs (1)
949((IHeaderDictionary)HttpRequestHeaders).TryGetValue(HeaderNames.Expect, out var expect) &&
Internal\Http3\Http3Connection.cs (1)
605if (!persistentStateFeature.State.TryGetValue(StreamPersistentStateKey, out var s))
Internal\Http3\Http3Stream.cs (1)
889if (((AspNetCore.Http.IHeaderDictionary)HttpRequestHeaders).TryGetValue(WebTransportSession.CurrentSupportedVersion, out var version) && string.Equals(version, WebTransportSession.VersionEnabledIndicator, StringComparison.Ordinal))
KestrelConfigurationLoader.cs (1)
411if (EndpointConfigurations.TryGetValue(endpoint.Name, out var configureEndpoint))
TlsConfigurationLoader.cs (2)
129if (configurationReader.Certificates.TryGetValue("Default", out var defaultCertConfig)) 153if (configurationReader.Certificates.TryGetValue("Development", out var certificateConfig) &&
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (45)
Http1\Http1ConnectionTests.cs (1)
1213public bool TryGetValue(string key, out StringValues value) => _innerHeaders.TryGetValue(key, out value);
HttpHeadersTests.cs (6)
256Assert.False(headers.TryGetValue("Content-Length", out var value)); 261Assert.True(headers.TryGetValue("Content-Length", out value)); 267Assert.True(headers.TryGetValue("Content-Length", out value)); 273Assert.False(headers.TryGetValue("Content-Length", out value)); 291Assert.False(headers.TryGetValue("Content-Length", out value)); 298Assert.False(headers.TryGetValue("Content-Length", out value));
HttpRequestHeadersTests.cs (38)
72Assert.False(headers.TryGetValue("host", out value)); 73Assert.False(headers.TryGetValue("custom", out value)); 74Assert.False(headers.TryGetValue("Content-Length", out value)); 77Assert.True(headers.TryGetValue("host", out value)); 78Assert.False(headers.TryGetValue("custom", out value)); 79Assert.False(headers.TryGetValue("Content-Length", out value)); 82Assert.True(headers.TryGetValue("host", out value)); 83Assert.True(headers.TryGetValue("custom", out value)); 84Assert.False(headers.TryGetValue("Content-Length", out value)); 87Assert.True(headers.TryGetValue("host", out value)); 88Assert.True(headers.TryGetValue("custom", out value)); 89Assert.True(headers.TryGetValue("Content-Length", out value)); 288Assert.False(headers.TryGetValue("host", out value)); 289Assert.False(headers.TryGetValue("custom", out value)); 290Assert.False(headers.TryGetValue("Content-Length", out value)); 295Assert.True(headers.TryGetValue("host", out value)); 296Assert.True(headers.TryGetValue("custom", out value)); 297Assert.True(headers.TryGetValue("Content-Length", out value)); 302Assert.True(headers.TryGetValue("host", out value)); 303Assert.True(headers.TryGetValue("custom", out value)); 304Assert.True(headers.TryGetValue("Content-Length", out value)); 317Assert.True(headers.TryGetValue("host", out value)); 318Assert.True(headers.TryGetValue("custom", out value)); 319Assert.True(headers.TryGetValue("Content-Length", out value)); 324Assert.False(headers.TryGetValue("host", out value)); 325Assert.False(headers.TryGetValue("custom", out value)); 326Assert.False(headers.TryGetValue("Content-Length", out value)); 339Assert.True(headers.TryGetValue("host", out value)); 340Assert.True(headers.TryGetValue("custom", out value)); 341Assert.True(headers.TryGetValue("Content-Length", out value)); 347Assert.False(headers.TryGetValue("host", out value)); 348Assert.True(headers.TryGetValue("custom", out value)); 354Assert.False(headers.TryGetValue("host", out value)); 355Assert.False(headers.TryGetValue("custom", out value)); 356Assert.True(headers.TryGetValue("Content-Length", out value)); 362Assert.False(headers.TryGetValue("host", out value)); 363Assert.False(headers.TryGetValue("custom", out value)); 364Assert.False(headers.TryGetValue("Content-Length", out value));
Microsoft.AspNetCore.Shared.Tests (7)
CopyOnWriteDictionaryTest.cs (1)
41sourceDictionary.Setup(d => d.TryGetValue("different-key", out value))
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
116return ReadDictionary.TryGetValue(key, out value);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (3)
190Store.TryGetValue(key, out values); 223if (Store.TryGetValue(key, out values)) 244return Store.TryGetValue(key, out value);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
135return PropertiesTryGetValue(key, out value) || Extra.TryGetValue(key, out value); 161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubDispatcher.cs (1)
870headers.TryGetValue(fieldName, out fieldValue);
Microsoft.AspNetCore.StaticFiles (1)
FileExtensionContentTypeProvider.cs (1)
441return Mappings.TryGetValue(extension, out contentType);
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
1968Assert.False(newBuilder.Properties.TryGetValue(WebApplication.GlobalEndpointRouteBuilderKey, out _));
Microsoft.AspNetCore.WebSockets.Tests (3)
Http2WebSocketTests.cs (3)
52Assert.False(headers.TryGetValue(HeaderNames.Connection, out var _)); 53Assert.False(headers.TryGetValue(HeaderNames.Upgrade, out var _)); 54Assert.False(headers.TryGetValue(HeaderNames.SecWebSocketAccept, out var _));
Microsoft.Build.Framework (3)
BuildCheck\EnumerableExtensions.cs (2)
91if (!dict.TryGetValue(pair.Key, out TValue? value)) 120if (!dict.TryGetValue(key, out TValue? value))
TaskItemData.cs (1)
74Metadata.TryGetValue(metadataName, out var result);
Microsoft.CodeAnalysis (2)
Collections\CachingDictionary.cs (1)
167if (localMap.TryGetValue(key, out elements))
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
305if (!builder.TryGetValue(info.Id, out currentInfo))
Microsoft.CodeAnalysis.Analyzers (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
Microsoft.CodeAnalysis.AnalyzerUtilities (15)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
611if (pointsToValues.TryGetValue(analysisEntity, out var pointsToValue))
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
2094dict1.Keys.All(key => dict2.TryGetValue(key, out TValue value2) && EqualityComparer<TValue>.Default.Equals(dict1[key], value2));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.BannedApiAnalyzers (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
Microsoft.CodeAnalysis.CodeStyle (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpDiagnosticFilter.cs (1)
189if (specificDiagnosticOptions.TryGetValue(id, out report))
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
323return AliasMap.TryGetValue(symbol, out result) ? result : null;
Symbols\Source\SourceAssemblySymbol.cs (1)
2858if (_lazyForwardedTypesFromSource.TryGetValue(emittedName.FullName, out result))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
ExtractMethod\ExtractMethodBase.cs (1)
181if (status.Succeeded && namedSpans.TryGetValue("r", out var revisedSpans))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
941if (location.IsInSource && reverseMappedLocations.TryGetValue(location, out var conflictingLocation))
Microsoft.CodeAnalysis.EditorFeatures (1)
Options\EditorAnalyzerConfigOptions.cs (1)
28if (_configOptions.TryGetValue(key.ToLowerInvariant(), out var objectValue))
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
AbstractCommandHandlerTestState.cs (1)
85if (cursorDocument.AnnotatedSpans.TryGetValue("Selection", out var selectionSpanList))
RefactoringHelpers\RefactoringHelpersTestBase.cs (3)
76!spans.TryGetValue(string.Empty, out var selections) || selections.Length != 1) 90!spans.TryGetValue(string.Empty, out var selections) || selections.Length != 1 || 91!spans.TryGetValue("result", out var results) || results.Length != 1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (1)
107=> _dictionary.TryGetValue(key, out value);
InheritanceMargin\InheritanceMarginTests.cs (2)
108if (testHostDocument.AnnotatedSpans.TryGetValue(SearchAreaTag, out var spans) && spans.IsSingle()) 344if (annotatedSpans.TryGetValue(tag, out var spans))
Microsoft.CodeAnalysis.Extensions.Package (1)
Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.Features (11)
CodeLens\CodeLensHelpers.cs (1)
28return descriptorProperties.TryGetValue(key, out var guidStringUntyped) &&
Completion\CommonCompletionUtilities.cs (3)
94if (!sections.TryGetValue(SymbolDescriptionGroups.MainDescription, out var mainDescriptionTexts)) 126if (sections.TryGetValue(SymbolDescriptionGroups.AwaitableUsageText, out var parts)) 131if (sections.TryGetValue(SymbolDescriptionGroups.StructuralTypes, out parts))
InlineHints\InlineHintHelpers.cs (1)
47if (groups.TryGetValue(SymbolDescriptionGroups.StructuralTypes, out var anonymousTypes))
LanguageServices\AnonymousTypeDisplayService\StructuralTypeDisplayInfo.cs (1)
53if (structuralTypeToName.TryGetValue(type, out var name) &&
QuickInfo\QuickInfoUtilities.cs (5)
77if (groups.TryGetValue(SymbolDescriptionGroups.Documentation, out var docParts) && !docParts.IsDefaultOrEmpty) 87groups.TryGetValue(SymbolDescriptionGroups.RemarksDocumentation, out var remarksDocumentation) && 98if (groups.TryGetValue(SymbolDescriptionGroups.ReturnsDocumentation, out var returnsDocumentation) && 107if (groups.TryGetValue(SymbolDescriptionGroups.ValueDocumentation, out var valueDocumentation) && 169=> groups.TryGetValue(group, out taggedParts) && !taggedParts.IsDefaultOrEmpty;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
182if (!map.TryGetValue(groupKey, out var suggestedActions))
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
Microsoft.CodeAnalysis.PublicApiAnalyzers (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.ResxSourceGenerator (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.Test.Utilities (1)
MarkedSource\MarkupTestFile.cs (1)
182if (!dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.UnitTests (3)
Collections\ImmutableDictionaryBuilderTestBase.cs (3)
149Assert.True(builder.TryGetValue("five", out int value) && value == 5); 150Assert.True(builder.TryGetValue("six", out value) && value == 6); 151Assert.False(builder.TryGetValue("four", out value));
Microsoft.CodeAnalysis.Workspaces (16)
Rename\ConflictEngine\ConflictResolver.cs (1)
333if (reverseMappedLocations.TryGetValue(newLocation, out var oldLocation))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
MSBuild\ProjectFile\ProjectFile.cs (1)
67if (!_loadedProject.GlobalProperties.TryGetValue(PropertyNames.TargetFramework, out var initialGlobalTargetFrameworkValue))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestHostDocument.cs (1)
117if (spans.TryGetValue(string.Empty, out var textSpans))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
CodeCleanup\CodeCleanupTests.cs (1)
380var expectedResult = namedSpans.TryGetValue("r", out var spans) ? spans : SpecializedCollections.EmptyEnumerable<TextSpan>();
Microsoft.DotNet.ArcadeLogging (2)
PipelinesLogger.cs (2)
204if (!e.Properties.TryGetValue("Category", out string telemetryCategory)) 304if (e.GlobalProperties.TryGetValue("TargetFramework", out string targetFramework))
Microsoft.DotNet.Build.Manifest (1)
EnumerableExtensions.cs (1)
15attributes.TryGetValue(key, out value);
Microsoft.DotNet.Build.Tasks.Feed (2)
src\PublishArtifactsInManifestBase.cs (2)
1113if (!packageAsset.Attributes.TryGetValue("Category", out categories)) 1143if (!blobAsset.Attributes.TryGetValue("Category", out categories) || string.Equals(categories, "NONE", StringComparison.OrdinalIgnoreCase))
Microsoft.DotNet.Build.Tasks.Packaging (3)
GenerateRuntimeDependencies.cs (1)
154if (!String.IsNullOrEmpty(targetPackageAlias) && !packageAliases.TryGetValue(targetPackageAlias, out targetPackageId))
GetPackageFromModule.cs (1)
65if (modulesToPackages.TryGetValue(moduleName, out packageId))
HarvestPackage.cs (1)
563if (pathsIncluded.TryGetValue(probePath, out result))
Microsoft.DotNet.Build.Tasks.Templating (1)
GenerateFileFromTemplate.cs (1)
123if (values.TryGetValue(varName, out string value))
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
308if (extensions.TryGetValue("x-ms-enum", out IOpenApiExtension ext) && ext is EnumOpenApiExtension enumExtension)
Microsoft.DotNet.XliffTasks (1)
Tasks\TransformTemplates.cs (1)
100if (resourceMap.TryGetValue(templateItemFullPath, out ITaskItem unstructuredResource))
Microsoft.Extensions.AI.Abstractions.Tests (3)
AssertExtensions.cs (1)
31if (!actual.TryGetValue(expectedEntry.Key, out object? actualValue))
Functions\AIFunctionArgumentsTests.cs (2)
128Assert.True(args.TryGetValue("key1", out var value)); 130Assert.False(args.TryGetValue("key3", out value));
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
31if (!actual.TryGetValue(expectedEntry.Key, out object? actualValue))
Microsoft.Extensions.AI.Evaluation (2)
EvaluationResult.cs (2)
113if (Metrics.TryGetValue(metricName, out EvaluationMetric? m) && m is T metric) 145if (Metrics.TryGetValue(metricName, out EvaluationMetric? m) && m is T metric)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (8)
QualityEvaluatorTests.cs (4)
262groundedness.Context.TryGetValue(GroundednessEvaluatorContext.GroundingContextName, out EvaluationContext? context1) && 267equivalence.Context.TryGetValue(EquivalenceEvaluatorContext.GroundTruthContextName, out EvaluationContext? context2) && 272completeness.Context.TryGetValue(CompletenessEvaluatorContext.GroundTruthContextName, out EvaluationContext? context3) && 277retrieval.Context.TryGetValue(RetrievalEvaluatorContext.RetrievedContextChunksContextName, out EvaluationContext? context4) &&
SafetyEvaluatorTests.cs (4)
176groundednessPro.Context.TryGetValue(GroundednessProEvaluatorContext.GroundingContextName, out EvaluationContext? context1) && 181ungroundedAttributes.Context.TryGetValue(UngroundedAttributesEvaluatorContext.GroundingContextName, out EvaluationContext? context2) && 251groundednessPro.Context.TryGetValue(GroundednessProEvaluatorContext.GroundingContextName, out EvaluationContext? context1) && 256ungroundedAttributes.Context.TryGetValue(UngroundedAttributesEvaluatorContext.GroundingContextName, out EvaluationContext? context2) &&
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyEvaluator.cs (1)
164if (metricNames.TryGetValue(contentSafetyServiceMetricName, out string? metricName))
Microsoft.Extensions.AI.Ollama.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
31if (!actual.TryGetValue(expectedEntry.Key, out object? actualValue))
Microsoft.Extensions.AI.OpenAI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
31if (!actual.TryGetValue(expectedEntry.Key, out object? actualValue))
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (1)
592a.Context?.TryGetValue(typeof(MyService), out object? service) is true ? service :
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
31if (!actual.TryGetValue(expectedEntry.Key, out object? actualValue))
Microsoft.Extensions.Configuration (1)
ConfigurationProvider.cs (1)
39=> Data.TryGetValue(key, out value);
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationExtensions.cs (2)
41if (builder.Properties.TryGetValue(FileProviderKey, out object? provider)) 86if (builder.Properties.TryGetValue(FileLoadExceptionHandlerKey, out object? handler))
Microsoft.Extensions.Configuration.Xml (1)
XmlStreamConfigurationProvider.cs (1)
77if (!parent.ChildrenBySiblingName.TryGetValue(element.SiblingName, out var siblings))
Microsoft.Extensions.Features (1)
FeatureCollection.cs (1)
70return _features != null && _features.TryGetValue(key, out var result) ? result : _defaults?[key];
Microsoft.Extensions.Http.Polly (2)
HttpRequestMessageExtensions.cs (1)
36request.Properties.TryGetValue(PolicyExecutionContextKey, out var context);
PolicyHttpMessageHandler.cs (1)
161if (request.Properties.TryGetValue(PriorResponseKey, out var priorResult) && priorResult is IDisposable disposable)
Microsoft.Extensions.Http.Resilience (1)
Resilience\HttpResilienceHttpRequestMessageExtensions.cs (1)
35if (requestMessage.Properties.TryGetValue(ResilienceContextKey, out var contextRaw) && contextRaw is ResilienceContext context)
Microsoft.Extensions.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
39if (!propertiesValuesByName2.TryGetValue(propertyName, out var propertyValue2) ||
Microsoft.Extensions.Logging.Console (1)
ConsoleLoggerSettings.cs (1)
43return Switches.TryGetValue(name, out level);
Microsoft.Extensions.Logging.EventSource (1)
LoggingEventSource.cs (1)
360if (!command.Arguments!.TryGetValue("FilterSpecs", out string? filterSpec))
Microsoft.Maui.Controls (1)
Application\Application.cs (1)
433 if (activationState?.State?.TryGetValue(MauiWindowIdKey, out var requestedWindowId) ?? false)
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
497 if (typeCache.TryGetValue(xmlType, out string returnType))
Microsoft.Maui.Essentials (1)
FilePicker\FilePicker.shared.cs (1)
166 if (fileTypes.TryGetValue(platform, out var type))
Microsoft.Maui.Resizetizer (1)
TizenResourceXmlGenerator.cs (1)
71 if (resolutionMap.TryGetValue(resolution, out string dpiRange))
Microsoft.ML.AutoML (1)
TrainerExtensions\TrainerExtensionUtil.cs (1)
214props.TryGetValue(WeightColumn, out var weightColumn);
Microsoft.ML.SearchSpace (2)
Option\NestOption.cs (1)
148return ((IDictionary<string, OptionBase>)_options).TryGetValue(key, out value);
SearchSpace.cs (1)
331return ((IDictionary<string, OptionBase>)_options).TryGetValue(key, out value);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
112if (ruleSetSpecificDiagnosticOptions.TryGetValue(diagnosticID, out var ruleSetOption))
PresentationCore (4)
MS\Internal\Shaping\TypefaceMap.cs (2)
313if (!_intMaps.TryGetValue(culture, out map)) 372if (!_intMaps.TryGetValue(culture, out map))
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
53return _innerDictionary.TryGetValue(key, out value);
System\Windows\Media\GlyphsSerializer.cs (1)
161!_glyphTypeface.CharacterToGlyphMap.TryGetValue(sourceCharacter, out glyphIndexFromCmap) ||
PresentationFramework (5)
System\Windows\Documents\FixedDocument.cs (1)
422if (_asyncOps.TryGetValue(userState,out asyncRequest))
System\Windows\Documents\FixedSOMTextRun.cs (2)
113gtf.FamilyNames.TryGetValue(run._cultureInfo, out run._fontFamily); 117gtf.FamilyNames.TryGetValue(System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS, out run._fontFamily);
System\Windows\Documents\Glyphs.cs (1)
450glyphTypeface.CharacterToGlyphMap.TryGetValue(character, out glyphIndex);
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
393return dict.TryGetValue(key, out value);
ReachFramework (9)
MS\Internal\Printing\MostFrequentlyUsedCache.cs (2)
22if(!this._dictionary.TryGetValue(key, out entry)) 46if(this._dictionary.TryGetValue(key, out entry))
PrintConfig\PrintSchemaShim.cs (6)
21return dmPaperSizeToPageMediaSize.TryGetValue(paperSizeCode, out pageMediaSizeName); 26return dmResToQResolution.TryGetValue(paperQualityCode, out resolution); 38if (paperSourceOptions.TryGetValue(paperSourceCode, out option)) 68if (mediaTypeOptions.TryGetValue(mediaTypeCode, out option)) 95if (outputQualityOptions.TryGetValue(dmResX, out option)) 1148if (dictionary.TryGetValue(key, out value))
Serialization\XpsFontSubsetter.cs (1)
399if (!_fontEmbeddingManagerCache.TryGetValue(fontUri, out manager))
Roslyn.Diagnostics.Analyzers (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
Shared.Tests (1)
EmptyCollections\EmptyReadonlyDictionaryTests.cs (1)
44Assert.False(dict.TryGetValue(1, out string? value));
System.ComponentModel.Composition (7)
System\ComponentModel\Composition\AttributedModel\AttributedExportDefinition.cs (1)
49if (partMetadata != null && partMetadata.TryGetValue(CompositionConstants.PartCreationPolicyMetadataName, out object? value))
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (1)
572if (!definition.Metadata.TryGetValue(CompositionConstants.ImportSourceMetadataName, out object? source))
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
337if (!dictionary.TryGetValue(name, out object? metadataValue))
System\ComponentModel\Composition\Hosting\ScopingExtensions.cs (1)
114if (part.Metadata.TryGetValue(key, out object? untypedValue))
System\ComponentModel\Composition\MetadataServices.cs (1)
33if (metadata.TryGetValue(key, out object? untypedValue) && untypedValue is T t)
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (1)
324if (!definition.Metadata.TryGetValue(metadataKey, out object? metadataValue))
System\ComponentModel\Composition\ReflectionModel\PartCreatorExportDefinition.cs (1)
47if (exportDefinition.Metadata.TryGetValue(CompositionConstants.ProductDefinitionMetadataName, out object? productValue))
System.Composition.Hosting (3)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
55return ActualMetadata.TryGetValue(key, out value);
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
140if (_partDefinitions.TryGetValue(contract, out definitions))
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (1)
79if (metadata.TryGetValue(name, out result))
System.Composition.Runtime (2)
System\Composition\Hosting\Core\CompositionContract.cs (2)
151if (!_metadataConstraints.TryGetValue(constraintName, out object value)) 185if (!second.TryGetValue(firstItem.Key, out object secondValue))
System.Composition.TypedParts (2)
System\Composition\TypedParts\ActivationFeatures\LifetimeFeature.cs (1)
28if (!partMetadata.TryGetValue(SharingBoundaryPartMetadataName, out sharingBoundaryMetadata))
System\Composition\TypedParts\Discovery\TypeInspector.cs (1)
125if (!metadata.TryGetValue(name, out existingValue))
System.Diagnostics.DiagnosticSource (8)
System\Diagnostics\DiagnosticSourceEventSource.cs (1)
385command.Arguments!.TryGetValue("FilterAndPayloadSpecs", out filterAndPayloadSpecs);
System\Diagnostics\Metrics\MetricsEventSource.cs (7)
432if (command.Arguments!.TryGetValue(ClientIdKey, out string? clientId)) 536if (arguments.TryGetValue("Metrics", out metricsSpecs)) 548if (arguments.TryGetValue("Base2ExponentialHistogram", out base2ExponentialHistogramSpec)) 572if (command.Arguments!.TryGetValue(ClientIdKey, out string? clientIdArg) && !string.IsNullOrEmpty(clientIdArg)) 611if (arguments.TryGetValue(argumentsKey, out string? maxString)) 658if (arguments!.TryGetValue(RefreshIntervalKey, out string? refreshInterval)) 680if (command.Arguments!.TryGetValue("SessionId", out string? id))
System.Drawing.Common (4)
System\Drawing\Brushes.cs (1)
313if (Gdip.ThreadData.TryGetValue(key, out object? objectBrush) && objectBrush is Brush brush)
System\Drawing\Pens.cs (1)
313if (Gdip.ThreadData.TryGetValue(key, out object? objectPen) && objectPen is Pen Pen)
System\Drawing\SystemBrushes.cs (1)
60if (!Gdip.ThreadData.TryGetValue(s_systemBrushesKey, out object? tempSystemBrushes) || tempSystemBrushes is not Brush[] systemBrushes)
System\Drawing\SystemPens.cs (1)
61if (!Gdip.ThreadData.TryGetValue(s_systemPensKey, out object? tempSystemPens) || tempSystemPens is not Pen[] systemPens)
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (1)
47if (dictionary.TryGetValue(key, out value))
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (2)
48return m_dictionary.TryGetValue(key, out value!); 163if (m_dictionary.TryGetValue((TKey)key, out TValue? value))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (1)
56if (!e.Arguments.TryGetValue("EventCounterIntervalSec", out string? valueStr)
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (1)
70if (!Deserializer.DeserializedObjects.TryGetValue(id, out object? value))
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (1)
69if (!Deserializer.DeserializedObjects.TryGetValue(id, out object? value))
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Security\SecurityUtilsEx.cs (1)
138if (authContext.Properties.TryGetValue(SecurityUtils.Identities, out obj))
System.Windows.Forms (1)
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
507if (!properties.TryGetValue(name, out PropertyInfo? info))
System.Xaml (4)
System\Xaml\MS\Impl\XmlNsInfo.cs (3)
531_subsumeCount.TryGetValue(ns1, out ns1count); 532_subsumeCount.TryGetValue(ns2, out ns2count); 581_subsumeCount.TryGetValue(ns, out currentCount);
System\Xaml\XamlSchemaContext.cs (1)
464if (oldToNewNs.TryGetValue(oldNs, out newNs))
Test.Utilities (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Text.Analyzers (15)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value)) 31if (!dictionary.TryGetValue(key, out var value)) 43if (dictionary.TryGetValue(key, out var value)) 67if (!dictionary.TryGetValue(key, out var collection)) 79if (!dictionary.TryGetValue(key, out var builder)) 91if (!dictionary.TryGetValue(key, out var builder)) 103if (dictionary.TryGetValue(key, out var set)) 123if (!dictionary.TryGetValue(key, out var existingArray)) 135if (!dictionary.TryGetValue(key, out var existingArray)) 147if (dictionary.TryGetValue(key, out var collection)) 186if (dictionary.TryGetValue(key, out var collection)) 215if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
WebPubSubWeb (1)
Program.cs (1)
62if (context.Request.Method != "POST" || !context.Request.Headers.TryGetValue("ce-type", out var eventType))
xunit.assert (1)
DictionaryAsserts.cs (1)
60 if (!collection.TryGetValue(expected, out value))
xunit.console (3)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (1)
467if (!_stringPool.TryGetValue(s, out result))
common\DictionaryExtensions.cs (1)
25if (!dictionary.TryGetValue(key, out result))
common\Json.cs (1)
738if (!_data.TryGetValue(key, out result))