156 implementations of TryGetValue
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)
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.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
294public bool TryGetValue(string key, [MaybeNullWhen(false)] out StringValues value)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
39public bool TryGetValue(TKey key, out TValue value)
Microsoft.AspNetCore.Http (1)
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 (2)
ModelBinding\ModelStateDictionary.cs (1)
731public bool TryGetValue(string key, [NotNullWhen(true)] out ModelStateEntry? value)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
129public bool TryGetValue(object key, [MaybeNullWhen(false)] out ValidationStateEntry value)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
AttributeDictionary.cs (1)
292public bool TryGetValue(string key, out string? value)
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
481public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.Build (3)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
42public bool TryGetValue(string key, out string? value)
Collections\ArrayDictionary.cs (1)
182public bool TryGetValue(TKey key, out TValue value)
ReadOnlyEmptyDictionary.cs (1)
208public bool TryGetValue(K key, out V 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.Build.Tasks.Core (1)
ReadOnlyEmptyDictionary.cs (1)
208public bool TryGetValue(K key, out V value)
Microsoft.Build.Utilities.Core (1)
ReadOnlyEmptyDictionary.cs (1)
208public bool TryGetValue(K key, out V 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 (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.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)
202bool IReadOnlyDictionary<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.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
1118public bool TryGetValue(string key, out int value) => key == nameof(BaseValue) ? (value = BaseValue) == BaseValue : (value = 0) == 0; 1168public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => _dictionary.TryGetValue(key, out 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.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.Maui.Controls (1)
DragAndDrop\DataPackagePropertySetView.cs (1)
38 public bool TryGetValue(string key, out object value) => _dataPackagePropertySet.TryGetValue(key, out value);
MSBuild (1)
ReadOnlyEmptyDictionary.cs (1)
208public bool TryGetValue(K key, out V 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)
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
1118public bool TryGetValue(string key, out int value) => key == nameof(BaseValue) ? (value = BaseValue) == BaseValue : (value = 0) == 0; 1168public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => _dictionary.TryGetValue(key, out 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.Formats.Nrbf (1)
System\Formats\Nrbf\RecordMap.cs (1)
26public bool TryGetValue(SerializationRecordId key, [MaybeNullWhen(false)] out SerializationRecord value) => _map.TryGetValue(key, out value);
System.Net.Http (2)
System\Net\Http\Headers\HttpHeadersNonValidated.cs (1)
81bool IReadOnlyDictionary<string, HeaderStringValues>.TryGetValue(string key, out HeaderStringValues value) => TryGetValues(key, out value);
System\Net\Http\HttpRequestOptions.cs (1)
18bool IReadOnlyDictionary<string, object?>.TryGetValue(string key, out object? value) => Options.TryGetValue(key, out value);
System.Net.WebSockets.Client (1)
System\Net\WebSockets\HttpResponseHeadersReadOnlyCollection.cs (1)
53public bool TryGetValue(string key, [MaybeNullWhen(false)] out IEnumerable<string> value)
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\Runtime\InteropServices\TypeMapLazyDictionary.cs (1)
252public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out Type value) => TryGetOrLoadType(key, out 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.Text.RegularExpressions (1)
System\Text\RegularExpressions\GroupCollection.cs (1)
197public bool TryGetValue(string key, [NotNullWhen(true)] out Group? value)
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)
317 references to TryGetValue
BasicTestApp (1)
RouterTest\NavLinkNotIgnoreQueryOrFragmentString.cs (1)
21if (AdditionalAttributes != null && AdditionalAttributes.TryGetValue("href", out var obj))
CustomCheck (1)
Check1.cs (1)
33customData.TryGetValue("setmessage", out string? setMessage))
GenerateDocumentationAndConfigFiles (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
InMemory.FunctionalTests (2)
ConnectionLimitTests.cs (1)
158m.Tags.TryGetValue(KestrelMetrics.ErrorTypeAttributeName, out var value);
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
24if (tags.TryGetValue(KestrelMetrics.ErrorTypeAttributeName, out var error))
Metrics (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Metrics.Legacy (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.AspNetCore.Components (1)
src\Http\Routing\src\Template\RoutePrecedence.cs (1)
266if (routePattern.RequiredValues.TryGetValue(parameterPart.Name, out var requiredValue) &&
Microsoft.AspNetCore.Components.Endpoints (4)
FormMapping\FormDataReader.cs (3)
115if (_formDictionaryKeysByPrefix.TryGetValue(new FormKey(_currentPrefixBuffer), out var foundKeys)) 246var foundSingleValue = _readOnlyMemoryKeys.TryGetValue(new FormKey(_currentPrefixBuffer), out var result) || result.Count == 1; 260_readOnlyMemoryKeys.TryGetValue(new FormKey(_currentPrefixBuffer), out values);
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
96if (WellKnownConverters.Converters.TryGetValue(type, out var converter))
Microsoft.AspNetCore.Components.QuickGrid (1)
src\Components\Shared\src\AttributeUtilities.cs (1)
12if (additionalAttributes is null || !additionalAttributes.TryGetValue("class", out var @class))
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\CircuitPersistenceManagerTest.cs (1)
390Assert.True(actualParameters.TryGetValue(paramKey, out var actualValue), $"Expected parameter '{paramKey}' not found.");
Microsoft.AspNetCore.Components.Tests (9)
Routing\RouteTableFactoryTests.cs (9)
495Assert.True(context.Parameters.TryGetValue("values", out var values)); 515Assert.True(context.Parameters.TryGetValue("catchall", out var values)); 535Assert.True(context.Parameters.TryGetValue("parameter", out var values)); 562Assert.True(context.Parameters.TryGetValue($"param{i}", out var value)); 568Assert.True(context.Parameters.TryGetValue($"param{i}", out var value)); 596Assert.True(context.Parameters.TryGetValue($"param{i}", out var value)); 602Assert.True(context.Parameters.TryGetValue($"param{i}", out var value)); 631Assert.True(context.Parameters.TryGetValue("parameter", out var parameter)); 632Assert.True(context.Parameters.TryGetValue("catchAll", out var catchAll));
Microsoft.AspNetCore.Components.Web (4)
Forms\InputBase.cs (1)
203if (AdditionalAttributes?.TryGetValue("name", out var nameAttributeValue) ?? false)
Routing\NavLink.cs (2)
69if (AdditionalAttributes != null && AdditionalAttributes.TryGetValue("href", out var obj)) 78if (AdditionalAttributes != null && AdditionalAttributes.TryGetValue("class", out obj))
src\Components\Shared\src\AttributeUtilities.cs (1)
12if (additionalAttributes is null || !additionalAttributes.TryGetValue("class", out var @class))
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (1)
98if (!CompressionProviders.TryGetValue(ResponseCompressionAlgorithm, out var _))
Microsoft.AspNetCore.Http.Extensions (4)
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (3)
115if (_formDictionaryKeysByPrefix.TryGetValue(new FormKey(_currentPrefixBuffer), out var foundKeys)) 246var foundSingleValue = _readOnlyMemoryKeys.TryGetValue(new FormKey(_currentPrefixBuffer), out var result) || result.Count == 1; 260_readOnlyMemoryKeys.TryGetValue(new FormKey(_currentPrefixBuffer), out values);
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
96if (WellKnownConverters.Converters.TryGetValue(type, out var converter))
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointMetadataApiDescriptionProvider.cs (1)
228if (pattern.ParameterPolicies.TryGetValue(parameter.Name, out var parameterPolicyReferences))
Microsoft.AspNetCore.Mvc.Core (4)
Infrastructure\ConfigureCompatibilityOptions.cs (1)
79if (!defaultValues.TryGetValue(@switch.Name, out var value))
ModelBinding\Validation\ClientValidatorCache.cs (1)
29metadata.ContainerMetadata.BoundConstructorPropertyMapping.TryGetValue(metadata, out var parameter))
ModelBinding\Validation\DefaultComplexObjectValidationStrategy.cs (1)
96if (!_modelMetadata.BoundConstructorParameterMapping.TryGetValue(parameter, out var property))
Routing\ActionEndpointFactory.cs (1)
197else if (route.Pattern.Defaults.TryGetValue(key, out var value))
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\ActionEndpointFactoryTest.cs (1)
487var isPresent = fullSet.TryGetValue(subsetPair.Key, out var fullSetPairValue);
Microsoft.AspNetCore.Mvc.Razor (1)
ViewLocationCacheKey.cs (1)
110if (!y.ViewLocationExpanderValues.TryGetValue(item.Key, out var yValue) ||
Microsoft.AspNetCore.Owin (1)
OwinEnvironment.cs (1)
526if (_entries.TryGetValue(key, out entry))
Microsoft.AspNetCore.Routing (12)
Matching\DfaMatcherBuilder.cs (4)
325if (endpoint.RoutePattern.ParameterPolicies.TryGetValue(parameterPart.Name, out var parameterPolicyReferences)) 400if (endpoint.RoutePattern.ParameterPolicies.TryGetValue(partParameter.Name, out var parameterPolicyReferences)) 475if (endpoint.RoutePattern.ParameterPolicies.TryGetValue(parameterPart.Name, out var parameterPolicyReferences)) 982if (!routePattern.RequiredValues.TryGetValue(parameterPart.Name, out value))
Patterns\DefaultRoutePatternTransformer.cs (5)
65else if (original.Defaults.TryGetValue(kvp.Key, out var defaultValue) && 84original.Defaults.TryGetValue(kvp.Key, out var defaultValue) && 115else if (original.Defaults.TryGetValue(kvp.Key, out var defaultValue) && 168original.Defaults.TryGetValue(kvp.Key, out var defaultValue) && 199if (pattern.ParameterPolicies.TryGetValue(key, out var policies))
Template\RoutePrecedence.cs (1)
266if (routePattern.RequiredValues.TryGetValue(parameterPart.Name, out var requiredValue) &&
Template\TemplateBinder.cs (2)
222if (!_pattern.RequiredValues.TryGetValue(key, out var requiredValue)) 311if (!copyAmbientValues && !hasExplicitValue && _pattern.RequiredValues.TryGetValue(key, out var requiredValue))
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
103if (!RequestInfo.TryGetValue((int)HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeRequestTiming, out var timingInfo))
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
103if (!RequestInfo.TryGetValue((int)HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeRequestTiming, out var timingInfo))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
24if (tags.TryGetValue(KestrelMetrics.ErrorTypeAttributeName, out var error))
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
103if (!RequestInfo.TryGetValue((int)HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeRequestTiming, out var timingInfo))
Microsoft.Build (46)
BuildCheck\Checks\CopyAlwaysCheck.cs (1)
53context.Data.EvaluatedProperties.TryGetValue("SkipUnchangedFilesOnCopyAlways", out string? skipUnchanged);
BuildCheck\Checks\DoubleWritesCheck.cs (4)
73if (taskParameters.TryGetValue(parameterName, out TaskParameter? taskParameter)) 86if (taskParameters.TryGetValue("SourceFiles", out TaskParameter? sourceFiles) && 87taskParameters.TryGetValue("DestinationFolder", out TaskParameter? destinationFolder)) 95else if (taskParameters.TryGetValue("DestinationFiles", out TaskParameter? destinationFiles))
BuildCheck\Checks\ExecCliBuildCheck.cs (1)
65&& context.Data.Parameters.TryGetValue(CommandParameterName, out TaskInvocationCheckData.TaskParameter? commandArgument))
BuildCheck\Checks\NoEnvironmentVariablePropertyCheck.cs (1)
77&& (customConfigurationData.ConfigurationData?.TryGetValue(VerboseEnvVariableOutputKey, out string? configVal) ?? false)
BuildCheck\Checks\PreferProjectReferenceCheck.cs (1)
57context.Data.EvaluatedProperties.TryGetValue(ItemMetadataNames.targetPath, out targetPath);
BuildCheck\Checks\PropertiesUsageCheck.cs (1)
96(customConfigurationData.ConfigurationData?.TryGetValue(_allowUninitPropsInConditionsKey, out string? configVal) ?? false))
BuildCheck\Checks\SharedOutputPathCheck.cs (2)
50context.Data.EvaluatedProperties.TryGetValue("OutputPath", out binPath); 51context.Data.EvaluatedProperties.TryGetValue("IntermediateOutputPath", out objPath);
BuildCheck\Checks\TargetFrameworkConfusionCheck.cs (2)
48if (context.Data.EvaluatedProperties.TryGetValue(PropertyNames.TargetFrameworks, out frameworks) && 50context.Data.EvaluatedProperties.TryGetValue(PropertyNames.TargetFramework, out framework) &&
BuildCheck\Checks\TargetFrameworkUnexpectedCheck.cs (4)
54if ((context.Data.EvaluatedProperties.TryGetValue(PropertyNames.TargetFrameworks, out frameworks) || 55context.Data.EvaluatedProperties.TryGetValue(PropertyNames.TargetFramework, out framework)) && 66=> evaluatedProperties.TryGetValue(PropertyNames.UsingMicrosoftNETSdk, out string? usingSdkStr) && 70=> evaluatedProperties.TryGetValue("CLRSupport", out string? clrSupportStr) &&
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
65eventArgs.GlobalProperties.TryGetValue(MSBuildConstants.MSBuildIsRestoring, out string? restoreProperty);
BuildCheck\Infrastructure\CustomConfigurationData.cs (1)
76if (!ConfigurationData.TryGetValue(keyVal.Key, out var value) || value != keyVal.Value)
CollectionHelpers.cs (1)
67if (!b.TryGetValue(aKvp.Key, out var bValue))
Construction\Solution\ProjectInSolution.cs (4)
423if (!ParentSolution.ProjectsByGuid.TryGetValue(ParentProjectGuid, out proj) && 424!ParentSolution.SolutionFoldersByGuid.TryGetValue(ParentProjectGuid, out solutionFolder)) 465if (!ParentSolution.ProjectsByGuid.TryGetValue(ParentProjectGuid, out proj) && 466!ParentSolution.SolutionFoldersByGuid.TryGetValue(ParentProjectGuid, out solutionFolder))
Construction\Solution\SolutionProjectGenerator.cs (11)
273if (project.ProjectConfigurations.TryGetValue(solutionConfiguration.FullName, out ProjectConfigurationInSolution projectConfiguration)) 284if (!solutionFile.ProjectsByGuid.TryGetValue(dependencyProjectGuid, out ProjectInSolution dependencyProject)) 295if (dependencyProject.ProjectConfigurations.TryGetValue(solutionConfiguration.FullName, out ProjectConfigurationInSolution dependencyProjectConfiguration) && 795project.ProjectConfigurations.TryGetValue(selectedSolutionConfiguration, out ProjectConfigurationInSolution projectConfiguration); 1167if (!_solutionFile.ProjectsByGuid.TryGetValue(dependencyProjectGuid, out ProjectInSolution dependencyProject)) 1323if (!_solutionFile.ProjectsByGuid.TryGetValue(dependencyProjectGuid, out ProjectInSolution dependencyProject)) 1334if (dependencyProject.ProjectConfigurations.TryGetValue(_selectedSolutionConfiguration, out ProjectConfigurationInSolution dependencyProjectConfiguration) && 1633(referencedProject.ProjectConfigurations.TryGetValue(solutionConfiguration.FullName, out ProjectConfigurationInSolution referencedProjectConfiguration)) && 1781if (project.ProjectConfigurations.TryGetValue(solutionConfiguration.FullName, out ProjectConfigurationInSolution projectConfiguration)) 1871if (project.ProjectConfigurations.TryGetValue(solutionConfiguration.FullName, out ProjectConfigurationInSolution projectConfiguration)) 1945if (project.ProjectConfigurations.TryGetValue(solutionConfiguration.FullName, out ProjectConfigurationInSolution projectConfiguration))
Definition\Project.cs (1)
2650if (removeElementCache.TryGetValue(itemElement.ItemType, out CumulativeRemoveElementData removeItemElement))
Evaluation\ItemSpec.cs (1)
350if (itemsByNormalizedValue.TryGetValue(key, out var multiValue))
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
39return _itemsByType.TryGetValue(itemType, out LazyItemList items)
Evaluation\Profiler\EvaluationProfiler.cs (1)
144if (!_evaluationProfiler.ProfiledResult.Value.ProfiledLocations.TryGetValue(Location, out var previousTimeSpent))
FrameworkLocationHelper.cs (4)
1155ErrorUtilities.VerifyThrowArgument(VisualStudioSpecDict.Value.TryGetValue(version, out VisualStudioSpec spec), "FrameworkLocationHelper.UnsupportedVisualStudioVersion", version); 1161ErrorUtilities.VerifyThrowArgument(DotNetFrameworkSpecDict.Value.TryGetValue(version, out DotNetFrameworkSpec spec), "FrameworkLocationHelper.UnsupportedFrameworkVersion", version); 1617if (VisualStudioSpecDict.Value.TryGetValue(visualStudioVersion, out VisualStudioSpec visualStudioSpec) 1618&& DotNetFrameworkSpecDict.Value.TryGetValue(dotNetFrameworkVersion, out DotNetFrameworkSpec dotNetFrameworkSpec)
Graph\GraphBuilder.cs (2)
346if (!Solution.ProjectsByGuid.TryGetValue(dependencyProjectGuid, out ProjectInSolution dependencyProject)) 397if (projectConfigs.TryGetValue(solutionConfigFullName, out ProjectConfigurationInSolution projectConfiguration))
Instance\TaskFactoryWrapper.cs (1)
190if (!_propertyData.Value.PropertyInfoCache.TryGetValue(propertyName, out propertyInfo))
Microsoft.Build.BuildCheck.UnitTests (1)
TestAssets\CustomCheck\Check1.cs (1)
33customData.TryGetValue("setmessage", out string? setMessage))
Microsoft.Build.Engine.OM.UnitTests (1)
ObjectModelRemoting\Helpers\TestCollectionGroup.cs (1)
246this.ImmutableProjects?.TryGetValue(linker, out toKeep);
Microsoft.Build.Tasks.Core (1)
WriteCodeFragment.cs (1)
206if (!parameterTypes.TryGetValue(name, out ParameterType type))
Microsoft.Build.Utilities.Core (4)
FrameworkLocationHelper.cs (4)
1155ErrorUtilities.VerifyThrowArgument(VisualStudioSpecDict.Value.TryGetValue(version, out VisualStudioSpec spec), "FrameworkLocationHelper.UnsupportedVisualStudioVersion", version); 1161ErrorUtilities.VerifyThrowArgument(DotNetFrameworkSpecDict.Value.TryGetValue(version, out DotNetFrameworkSpec spec), "FrameworkLocationHelper.UnsupportedFrameworkVersion", version); 1617if (VisualStudioSpecDict.Value.TryGetValue(visualStudioVersion, out VisualStudioSpec visualStudioSpec) 1618&& DotNetFrameworkSpecDict.Value.TryGetValue(dotNetFrameworkVersion, out DotNetFrameworkSpec dotNetFrameworkSpec)
Microsoft.CodeAnalysis (38)
Compilation\Compilation.cs (1)
3525return _features.TryGetValue(p, out v) ? v : null;
Emit\CommonPEModuleBuilder.cs (1)
630if (previousTypeDef != null && PreviousGeneration.GenerationOrdinals.TryGetValue(previousTypeDef, out int lastEmittedOrdinal))
Emit\EditAndContinue\DefinitionMap.cs (8)
38=> ClosureTree.TryGetValue(closureId, out var node) ? node : default; 149if (mappedDef != null && Baseline.MethodsAdded.TryGetValue(mappedDef, out int methodIndex)) 173if (Baseline.MethodsAdded.TryGetValue(oldMethodDef, out var methodRowId)) 213if (!mappedMethods.TryGetValue(topLevelMethod, out var mappedMethod)) 245if (Baseline.AddedOrChangedMethods.TryGetValue(methodIndex, out var addedOrChangedMethod)) 599? (synthesizedMemberMap.TryGetValue(displayClass, out var m) ? m : []) 673if (Baseline.AddedOrChangedMethods.TryGetValue(methodRowId, out var addedOrChangedMethod)) 678Baseline.SynthesizedMembers.TryGetValue(oldMethod.ContainingType, out var synthesizedSiblingSymbols))
Emit\EditAndContinue\DeltaMetadataWriter.cs (20)
536(changes.DeletedMembers.TryGetValue(typeSymbol, out var deletedMembers) | 537changes.UpdatedMethods.TryGetValue(typeSymbol, out var updatedMethods))) 669if (_deletedMethodDefs.TryGetValue(typeDef, out var newMethodDefs)) 803var ok = _previousGeneration.FirstParamRowMap.TryGetValue(handle, out var firstRowId); 992xOrdinal = _previousGeneration.CustomAttributesAdded.TryGetValue(x.parentHandle, out var rowIds) ? rowIds[0] : int.MaxValue; 993yOrdinal = _previousGeneration.CustomAttributesAdded.TryGetValue(y.parentHandle, out rowIds) ? rowIds[0] : int.MaxValue; 1026var previouslyAddedRowIds = _previousGeneration.CustomAttributesAdded.TryGetValue(parentHandle, out var rowIds) ? rowIds : ImmutableArray<int>.Empty; 1050var previouslyAddedRowIds = _previousGeneration.CustomAttributesAdded.TryGetValue(parentHandle, out var rowIds) ? rowIds : ImmutableArray<int>.Empty; 1616if (_previousGeneration.TypesAdded.TryGetValue(item, out index)) 1628if (_previousGeneration.EventsAdded.TryGetValue(item, out index)) 1640if (_previousGeneration.FieldsAdded.TryGetValue(item, out index)) 1659if (_previousGeneration.MethodsAdded.TryGetValue(item, out index)) 1671if (_previousGeneration.PropertiesAdded.TryGetValue(item, out index)) 1688if (_previousGeneration.EventMapAdded.TryGetValue(item, out index)) 1693if (_previousGeneration.TypeToEventMap.TryGetValue(item, out index)) 1704if (_previousGeneration.PropertyMapAdded.TryGetValue(item, out index)) 1709if (_previousGeneration.TypeToPropertyMap.TryGetValue(item, out index)) 1720if (_previousGeneration.MethodImplsAdded.TryGetValue(item, out index)) 1725if (_previousGeneration.MethodImpls.TryGetValue(item, out index)) 1916if (_deletedTypeMembers.TryGetValue(typeDefinition, out var deletedMembers))
Emit\EditAndContinue\EncVariableSlotAllocator.cs (6)
174if (!_previousLocalSlots.TryGetValue(localKey, out int slot)) 226return _hoistedLocalSlots.TryGetValue(localKey, out slotIndex); 244return _awaiterMap.TryGetValue(typeRef, out slotIndex); 311if (_closureMap.TryGetValue(syntaxOffset, out var closureMapValue) && 337if (_lambdaMap.TryGetValue(syntaxOffset, out var lambdaMapValue) && lambdaMapValue.IsCompatibleWith(closureOrdinal, structClosureIds)) 365_stateMachineStateMap.TryGetValue((syntaxOffset, awaitId), out state))
Emit\EditAndContinue\SymbolChanges.cs (1)
242if (_changes.TryGetValue(symbol, out var change))
Emit\EditAndContinue\SymbolMatcher.cs (1)
190if (!newMembers.TryGetValue(mappedContainer, out var newSynthesizedMembers))
Microsoft.CodeAnalysis.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.CSharp (11)
Binder\Binder.ValueChecks.cs (1)
1162primaryConstructor.GetCapturedParameters().TryGetValue(parameterSymbol, out FieldSymbol backingField))
CSharpParseOptions.cs (1)
190ImmutableArray<ImmutableArray<string>> previewNamespaces = Features.TryGetValue("InterceptorsNamespaces", out var namespaces) && namespaces.Length > 0
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
559if (otherMembersByName.TryGetValue(sourceMember.MetadataName, out var otherMembers)) 802if (_otherSynthesizedMembers != null && _otherSynthesizedMembers.TryGetValue(symbol, out var synthesizedMembers)) 807if (_otherDeletedMembers?.TryGetValue(symbol, out var deletedMembers) == true)
FlowAnalysis\NullableWalker.cs (1)
2224primaryConstructor.GetCapturedParameters().TryGetValue(parameter, out FieldSymbol? field))
Lowering\LocalRewriter\LocalRewriter.cs (1)
315primaryCtor.GetCapturedParameters().TryGetValue(node.ParameterSymbol, out var field))
Lowering\StateMachineRewriter\StateMachineRewriter.cs (4)
316if (proxies.TryGetValue(method.ThisParameter, out proxy)) 330if (proxies.TryGetValue(parameter, out proxy)) 470if (copyDest.TryGetValue(method.ThisParameter, out proxy)) 488if (copyDest.TryGetValue(parameter, out proxy))
Microsoft.CodeAnalysis.CSharp.Features (1)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1426fromOtherMap.TryGetValue(GetContainingDeclaration(otherNode), out declaration);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Workspace\LanguageServices\CSharpCompilationFactoryService.cs (1)
47if (!compilationOptionsMetadata.TryGetValue("output-kind", out var outputKindString) ||
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.cs (2)
37if (!metadata.TryGetValue("language-version", out var langVersionString) || 45preprocessorSymbols: metadata.TryGetValue("define", out var defines) ? defines.Split(',') : null);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeActions\CodeChangeProviderMetadataTests.cs (1)
141if (!export.Metadata.TryGetValue("Name", out var nameObj)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
EEMetadataReferenceResolver.cs (1)
32if (_referencesBySimpleName.TryGetValue(referenceIdentity.Name, out var references))
Microsoft.CodeAnalysis.Features (13)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (11)
1734if (forwardMap.TryGetValue(oldNode, out var newNode)) 1779if (forwardMap.TryGetValue(oldNode, out newAncestor)) 1817editMap.TryGetValue(node, out var parentEdit) && 1997else if (reverseMap.TryGetValue(newNode, out var oldPartner) && comparer((TSyntaxNode)oldPartner, (TSyntaxNode)newNode)) 5253return newNode => reverseMatch.TryGetValue(newNode, out var oldNode) || additionalReverse.TryGetValue(newNode, out oldNode) ? oldNode : null; 5685.Any(oldContainingLambdaBody => activeOrMatchedLambdas.TryGetValue(oldContainingLambdaBody, out var info) && info.HasActiveStatement)) 6239if (parameterKey.Syntax == null || parameterMap?.TryGetValue(parameterKey.Syntax, out mappedParameter) == true) 6245else if (bodyMap.TryGetValue(parameterKey.ContainingLambda, out var mappedContainingLambdaSyntax)) 6250if (bodyMap.TryGetValue(parameterKey.Syntax, out var mappedParameter)) 6354if (!bodyMap.Reverse.TryGetValue(newCaptureSyntax, out var mappedOldSyntax) || 6529return reverseMap.TryGetValue(newScope, out var mappedScope) && mappedScope == oldScope;
EditAndContinue\ActiveStatementsMap.cs (2)
219if (DocumentPathMap.TryGetValue(targetPath, out var activeStatementsInMappedFile)) 241if (DocumentPathMap.TryGetValue(oldTree.FilePath, out var activeStatements))
Microsoft.CodeAnalysis.Features.UnitTests (1)
FindUsages\DefinitionItemFactoryTests.cs (1)
42=> value != null && expressionMap.TryGetValue(value, out var syntax) ? syntax : Inspect(value);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\SemanticTokens\SemanticTokensHelpers.cs (2)
353if (!tokenTypeMap.TryGetValue(classificationType, out var tokenTypeStr)) 358Contract.ThrowIfFalse(tokenTypesToIndex.TryGetValue(tokenTypeStr, out var tokenTypeIndex), "No matching token type index found.");
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.PublicApiAnalyzers (14)
DeclarePublicApiAnalyzer.Impl.cs (9)
260var hasApiEntryWithNullability = apiMap.TryGetValue(publicApiName.NameWithNullability, out foundApiLine); 265apiMap.TryGetValue(WithObliviousMarker(publicApiName.NameWithNullability), out foundApiLine); 269var hasApiEntryWithoutNullability = apiMap.TryGetValue(publicApiName.Name, out foundApiLine); 273apiMap.TryGetValue(WithObliviousMarker(publicApiName.Name), out foundApiLine); 291var hasApiEntryWithoutNullability = apiMap.TryGetValue(publicApiName.Name, out foundApiLine); 455return apiMap.TryGetValue(overloadPublicApiName.NameWithNullability, out overloadPublicApiLine) || 456apiMap.TryGetValue(WithObliviousMarker(overloadPublicApiName.NameWithNullability), out overloadPublicApiLine) || 457apiMap.TryGetValue(overloadPublicApiName.Name, out overloadPublicApiLine); 461return apiMap.TryGetValue(overloadPublicApiName.Name, out overloadPublicApiLine);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.Scripting (1)
ScriptState.cs (1)
91return GetVariableMap().TryGetValue(name, out index) ? Variables[index] : null;
Microsoft.CodeAnalysis.Scripting.UnitTests (1)
RuntimeMetadataReferenceResolverTests.cs (1)
79if (_map.TryGetValue(reference, out paths))
Microsoft.CodeAnalysis.UnitTests (1)
Collections\ImmutableDictionaryTestBase.cs (1)
250Assert.False(empty.TryGetValue(someKey, out V? value));
Microsoft.CodeAnalysis.VisualBasic (3)
Binding\Binder_XmlLiterals.vb (1)
1450If _namespaces.TryGetValue(prefix, result) Then
Binding\ImportAliasesBinder.vb (1)
57If _importedAliases.TryGetValue(name, [alias]) Then
Compilation\SyntaxTreeSemanticModel.vb (1)
1327If aliasImports IsNot Nothing AndAlso aliasImports.TryGetValue(aliasName, symbol) Then
Microsoft.CodeAnalysis.Workspaces (6)
Differencing\MapBasedLongestCommonSubsequence.cs (1)
13=> map.TryGetValue(oldSequence[oldIndex], out var newNode) && newNode.Equals(newSequence[newIndex]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
FileSet.cs (1)
56if (_fileMap.TryGetValue(fileName, out var content))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Fakes\SimpleAssetSource.cs (1)
25Contract.ThrowIfFalse(map.TryGetValue(checksum, out var data));
TestAnalyzerReferenceByLanguage.cs (1)
43if (_analyzersMap.TryGetValue(language, out var analyzers))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Host\LanguageServices\TestCSharpCompilationFactoryServiceWithIncrementalGeneratorTracking.cs (1)
49if (!compilationOptionsMetadata.TryGetValue("output-kind", out var outputKindString) ||
Microsoft.DotNet.Build.Tasks.Packaging (1)
NuGetAssetResolver.cs (1)
212allCompileItems.TryGetValue(referencePackageId, out thisPackageCompileItems);
Microsoft.DotNet.GenFacades (1)
SourceGenerator.cs (1)
61if (!_seedTypes.TryGetValue(type, out seedTypes))
Microsoft.DotNet.XliffTasks (1)
Model\TranslatableDocument.cs (1)
57if (translations.TryGetValue(node.Id, out string translation))
Microsoft.Extensions.AI.Abstractions.Tests (3)
Functions\AIFunctionArgumentsTests.cs (2)
92Assert.True(args.TryGetValue("key1", out var value)); 94Assert.False(args.TryGetValue("key3", out value));
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
1168public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => _dictionary.TryGetValue(key, out value);
Microsoft.Extensions.AI.OpenAI (3)
OpenAIClientExtensions.cs (1)
188additionalProperties?.TryGetValue(StrictKey, out object? strictObj) is true &&
OpenAIResponseChatClient.cs (2)
402if (tool.AdditionalProperties.TryGetValue(nameof(WebSearchUserLocation), out object? objLocation)) 408if (tool.AdditionalProperties.TryGetValue(nameof(WebSearchContextSize), out object? objSize) &&
Microsoft.Extensions.Diagnostics.Testing (1)
Metrics\CollectedMeasurement.cs (1)
63if (!Tags.TryGetValue(kvp.Key, out var value))
Microsoft.Extensions.Telemetry (6)
Http\HttpRouteFormatter.cs (4)
135if ((!parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification) && 145if (parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification) && classification != DataClassification.None) 201if (parametersToRedact.TryGetValue(httpRouteSegment.ParamName, out var classification)) 243if (parametersToRedact.TryGetValue(httpRouteSegment.ParamName, out DataClassification classification)
Http\HttpRouteParser.cs (2)
272if (parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification)) 303if (parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification)
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (2)
357if (assemblyMethods.TryGetValue(methodIdentifier, out var result)) 390if (assemblyMethods.TryGetValue(methodIdentifier, out var result))
Microsoft.Maui (1)
Handlers\HybridWebView\FileExtensionContentTypeProvider.cs (1)
447 return Mappings.TryGetValue(extension, out contentType);
Microsoft.Maui.Graphics (2)
Text\TextAttributesExtensions.cs (1)
16 if (attributes.TryGetValue(type, out var value))
Text\XmlAttributedTextWriter.cs (1)
84 currentAttributes.TryGetValue(key, out var value);
Microsoft.ML.Tokenizers (10)
Model\CodeGenTokenizer.cs (2)
1467if (_vocabReverse.TryGetValue(id, out string? s)) 1534if (_vocabReverse.TryGetValue(id, out var value))
Model\EnglishRobertaTokenizer.cs (4)
289if (unicodeToByte.TryGetValue(v[j], out var c)) 371if (byteToUnicode.TryGetValue(text[i], out var value)) 683if (byteToUnicode.TryGetValue(text[i], out var value)) 728if (byteToUnicode.TryGetValue(text[i], out var value))
Model\WordPieceTokenizer.cs (2)
687if (ignoreSpecialTokens && SpecialTokensReverse!.TryGetValue(id, out _)) 746if (ignoreSpecialTokens && SpecialTokensReverse!.TryGetValue(id, out _))
Utils\BytePairEncoder.cs (1)
40if (ranks.TryGetValue(slice, out var rank))
Utils\Helpers.cs (1)
219if (unicodeToByte.TryGetValue(text[i], out char c))
Microsoft.ML.Tokenizers.Tests (7)
BpeTests.cs (3)
831Assert.True(_vocabReverse.TryGetValue(beginningOfSentenceId, out string? beginningOfSentenceToken)); 856Assert.True(tokenizer.SpecialTokens.TryGetValue(thinkStartSpecialToken, out int thinkStartId)); 857Assert.True(tokenizer.SpecialTokens.TryGetValue(thinkEndSpecialToken, out int thinkEndId));
CodeGenTests.cs (1)
519if (codeGenTokenizer.Vocabulary.TryGetValue(token, out int id))
LlamaTests.cs (1)
361Assert.True(bpe.Vocabulary.TryGetValue("▁", out _));
src\Microsoft.ML.Tokenizers\Utils\Helpers.cs (1)
219if (unicodeToByte.TryGetValue(text[i], out char c))
TiktokenTests.cs (1)
128Assert.True(externalEncoder.TryGetValue(kvp.Key, out int value));
Microsoft.VisualStudio.LanguageServices (4)
EditorConfigSettings\Common\EnumSettingViewModel.cs (1)
46if (_mapping.TryGetValue(propertyDescription, out var value))
NavigateTo\RoslynSearchItemsSource.cs (2)
75var includeTypeResults = searchQuery.FiltersStates.TryGetValue("Types", out var typesValue) && typesValue == "True"; 76var includeMembersResults = searchQuery.FiltersStates.TryGetValue("Members", out var membersValue) && membersValue == "True";
ProjectSystem\BrokeredService\WorkspaceProjectFactoryService.cs (1)
53return _buildSystemProperties.TryGetValue(name, out var value) ? value : "";
MSBuild (1)
CollectionHelpers.cs (1)
67if (!b.TryGetValue(aKvp.Key, out var bValue))
Roslyn.Diagnostics.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
1168public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => _dictionary.TryGetValue(key, out value);
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
24if (tags.TryGetValue(KestrelMetrics.ErrorTypeAttributeName, out var error))
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableDictionary.cs (1)
354if (dictionary.TryGetValue(key, out value!))
System.Formats.Tar (2)
System\Formats\Tar\TarHelpers.cs (2)
174if (dict.TryGetValue(fieldName, out string? strNumber) && !string.IsNullOrEmpty(strNumber)) 187if (dict.TryGetValue(fieldName, out string? strNumber) && !string.IsNullOrEmpty(strNumber))
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (1)
21return dictionary.TryGetValue(key, out TValue? value) ? value : defaultValue;
Test.Utilities (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
Text.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
112var value = entries.TryGetValue(key, out var str) ? parser(str) : defaultValue; 122=> lines.TryGetValue(Key, out var line) ? line.Span : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingStyle.cs (1)
88if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
85if (!entries.TryGetValue(key, out var name))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
15if (dictionary.TryGetValue(key, out var value))
xunit.assert (1)
DictionaryAsserts.cs (1)
94 if (!collection.TryGetValue(expected, out value))