138 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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\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\aspnetcore\src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
603public bool TryGetValue(string key, out object? value)
Microsoft.AspNetCore.Components.Endpoints (1)
TempData\TempData.cs (1)
127bool IDictionary<string, object?>.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.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\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\aspnetcore\src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
480public 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\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] 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\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
114public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.AspNetCore.Server.HttpSys (2)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
242public bool TryGetValue(string key, out StringValues value)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
133public bool TryGetValue(string key, out StringValues value)
Microsoft.AspNetCore.Server.IIS (2)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
242public bool TryGetValue(string key, out StringValues value)
src\aspnetcore\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.Build (12)
Collections\ArrayDictionary.cs (1)
182public bool TryGetValue(TKey key, out TValue value)
Collections\CopyOnWritePropertyDictionary.cs (1)
269bool IDictionary<string, T>.TryGetValue(string key, out T value) => _backing.TryGetValue(key, out value);
Collections\PropertyDictionary.cs (1)
398bool IDictionary<string, T>.TryGetValue(string key, out T value)
Collections\ReadOnlyConvertingDictionary.cs (1)
104public bool TryGetValue(K key, out N value)
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (1)
310public bool TryGetValue(string key, out T item)
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (1)
94public bool TryGetValue(string key, out T value) => _values.TryGetValue(key, out value);
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (1)
141public bool TryGetValue(string key, out ProjectPropertyInstance value)
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\8b3a4ac2431f87ea\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.Build.Framework (2)
Collections\CopyOnWriteDictionary.cs (1)
247public bool TryGetValue(string key, out V value)
Collections\ReadOnlyEmptyDictionary.cs (1)
196public bool TryGetValue(K key, out V value)
Microsoft.CodeAnalysis (5)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
140public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.CodeAnalysis.CodeStyle (5)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.Extensions.Package (5)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
57public bool TryGetValue(TKey key, [MaybeNullWhen(returnValue: false)] out TValue value)
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
139public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\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)
196bool IDictionary<string, TValue>.TryGetValue(string key, out TValue value) => _dictionary.TryGetValue(key, out value!);
Functions\AIFunctionArguments.cs (1)
154public 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.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.BuildMetadata.Unit.Tests (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)
Microsoft.TemplateEngine.Core (1)
VariableCollection.cs (1)
185public bool TryGetValue(string key, out object 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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
263public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
118public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
225public readonly bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
853public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\roslyn\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)
916public 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.Immutable (5)
System\Collections\Frozen\FrozenDictionary.cs (1)
613public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
577public 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)
452public 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.Diagnostics.Process (1)
System\Collections\Specialized\DictionaryWrapper.cs (1)
79public bool TryGetValue(string key, out string? value) => _contents.TryGetValue(key, out value);
System.Linq.Expressions (1)
System\Dynamic\ExpandoObject.cs (1)
660bool IDictionary<string, object?>.TryGetValue(string key, out object? value)
System.Net.Http (1)
System\Net\Http\HttpRequestOptions.cs (1)
49bool IDictionary<string, object?>.TryGetValue(string key, out object? value) => Options.TryGetValue(key, out value);
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (1)
517public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
1550public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (1)
46public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
src\runtime\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)
System\ServiceModel\Channels\MessageProperties.cs (1)
619public bool TryGetValue(string name, out object value)
System.Speech (1)
Result\SemanticValue.cs (1)
164bool IDictionary<string, SemanticValue>.TryGetValue(string key, [NotNullWhen(true)] out SemanticValue? value)
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)
694 references to TryGetValue
aspire (2)
DotNet\DotNetCliRunner.cs (1)
112env?.TryGetValue(KnownConfigNames.UnixSocketPath, out socketPath);
Program.cs (1)
829if (!environmentVariables.TryGetValue("ASPIRE_PLAYGROUND", out var value))
Aspire.Dashboard (6)
Api\ApiAuthenticationHandler.cs (1)
58if (Context.Request.Headers.TryGetValue(ApiKeyHeaderName, out var apiKeyHeader))
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
26if (Context.Request.Headers.TryGetValue(ApiKeyHeaderName, out var apiKey))
Components\Pages\Resources.razor.cs (1)
165static bool IsKeyValueTrue(string key, IDictionary<string, bool> dictionary) => dictionary.TryGetValue(key, out var value) && value;
Mcp\McpApiKeyAuthenticationHandler.cs (2)
39if (Context.Request.Headers.TryGetValue(ApiAuthenticationHandler.ApiKeyHeaderName, out apiKey)) 43else if (Context.Request.Headers.TryGetValue(McpApiKeyHeaderName, out apiKey))
Model\ResourceViewModel.cs (1)
184if (resourceByName.TryGetValue(resourceName, out resource))
Aspire.Hosting (16)
Ats\CollectionExports.cs (1)
35=> dict.TryGetValue(key, out var value) ? value : null;
Dashboard\DashboardServiceAuth.cs (1)
41if (!Request.Headers.TryGetValue(ApiKeyHeaderName, out var headerValues))
Dcp\DcpExecutor.cs (9)
556else if (resource.Metadata.Annotations?.TryGetValue(CustomResource.ServiceProducerAnnotation, out var servicesProducedAnnotationJson) == true) 933sr.Metadata.Annotations?.TryGetValue(CustomResource.ContainerTunnelInstanceName, out var _) is true && 934sr.Metadata.Annotations?.TryGetValue(CustomResource.ContainerNetworkAnnotation, out var containerNetwork) is true && 951PrimaryServiceName: r.DcpResource.Metadata.Annotations?.TryGetValue(CustomResource.PrimaryServiceNameAnnotation, out var psn) == true ? psn : null) 1095ResourceName: r.DcpResource.Metadata.Annotations?.TryGetValue(CustomResource.ResourceNameAnnotation, out var resourceName) == true ? resourceName : null, 1096EndpointName: r.DcpResource.Metadata.Annotations?.TryGetValue(CustomResource.EndpointNameAnnotation, out var endpointName) == true ? endpointName : null, 1097TunnelInstanceName: r.DcpResource.Metadata.Annotations?.TryGetValue(CustomResource.ContainerTunnelInstanceName, out var tunnelInstanceName) == true ? tunnelInstanceName : null, 1098ContainerNetworkName: r.DcpResource.Metadata.Annotations?.TryGetValue(CustomResource.ContainerNetworkAnnotation, out var containerNetworkName) == true ? containerNetworkName : null 2505if (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)
41public string? AppModelResourceName => Metadata.Annotations?.TryGetValue(ResourceNameAnnotation, out var value) is true ? value : null; 43public string? AppModelInitialState => Metadata.Annotations?.TryGetValue(ResourceStateAnnotation, out var value) is true ? value : null; 93bool found = annotations.TryGetValue(annotationName, out annotationValue); 114if (annotations.TryGetValue(annotationName, out var annotationVal) && !string.IsNullOrWhiteSpace(annotationVal))
Dcp\Model\Service.cs (1)
93public 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)
1436Assert.True(resource.Item2.Metadata.Annotations.TryGetValue(Container.ResourceNameAnnotation, out var value)); 1450Assert.True(resource.Item2.Metadata.Annotations.TryGetValue(Executable.ResourceNameAnnotation, 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;
datacollector (2)
DataCollectorMain.cs (2)
82if (argsDictionary.TryGetValue(LogFileArgument, out var logFile)) 130int port = argsDictionary.TryGetValue(PortArgument, out var portValue)
datacollector.arm64 (2)
src\vstest\src\datacollector\DataCollectorMain.cs (2)
82if (argsDictionary.TryGetValue(LogFileArgument, out var logFile)) 130int port = argsDictionary.TryGetValue(PortArgument, out var portValue)
dotnet (4)
Commands\MSBuild\MSBuildLogger.cs (1)
244if (eventProperties.TryGetValue(propertyToBeHashed, out var value))
Commands\New\BuiltInTemplatePackageProvider.cs (1)
102if (!bestVersionsByBucket.TryGetValue(coreAppVersion, out (string path, SemanticVersion version) currentHighest)
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (1)
250project.GlobalProperties.TryGetValue("TargetFramework", out string? targetFramework)
Commands\Run\RunCommandSelector.cs (1)
376if (!targetOutputs.TryGetValue(Constants.ComputeAvailableDevices, out var targetResult))
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)
53if (!jwtStore.Jwts.TryGetValue(id, out var jwt))
Commands\RemoveCommand.cs (1)
58if (!jwtStore.Jwts.TryGetValue(id, out var jwt))
GenerateDocumentationAndConfigFiles (15)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
268dictionary.TryGetValue(key, out value); 274if (dictionary != null && dictionary.TryGetValue(key, out var symbol))
GetDocument.Insider (1)
src\d0e903376af13807\HostFactoryResolver.cs (1)
355else if (_arbitraryActions?.TryGetValue(value.Key, out var arbitraryAction) == true)
ILCompiler.Compiler (1)
Compiler\ObjectWriter\UnixObjectWriter.Aot.cs (1)
311if (definedSymbols.TryGetValue(ExternCName(symbolName), out SymbolDefinition symbolDef) &&
illink (3)
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)
420if (app.Properties.TryGetValue(EndpointRouteBuilderKey, out var priorRouteBuilder)) 444if (!_builtApplication.Properties.TryGetValue(EndpointRouteBuilderKey, out var localRouteBuilder)) 601if (_builtApplication.Properties.TryGetValue(MiddlewareDescriptionsKey, out var sourceValue) && 602app.Properties.TryGetValue(MiddlewareDescriptionsKey, out var destinationValue) &&
Microsoft.AspNetCore.Antiforgery (3)
Internal\DefaultAntiforgery.cs (2)
362if (responseHeaders.TryGetValue(HeaderNames.CacheControl, out var cacheControlHeader) && 377if (responseHeaders.TryGetValue(HeaderNames.Pragma, out var pragmaHeader) && pragmaHeader.Count > 0)
src\aspnetcore\src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
Microsoft.AspNetCore.Authentication (2)
RemoteAuthenticationHandler.cs (2)
205&& ticket.Properties.Items.TryGetValue(AuthSchemeKey, out var authenticatedScheme) 253if (!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.Certificate (1)
CertificateValidationCache.cs (1)
80if (context.Items.TryGetValue(CertificateAuthenticationHandler.CertificateSchemeCacheKeyItem, out var schemeObj)
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)
964properties.Items.TryGetValue(OpenIdConnectDefaults.UserstatePropertiesKey, out var userstate); 1276if (properties.Items.TryGetValue(OAuthConstants.CodeVerifierKey, out var codeVerifier))
UniqueJsonKeyClaimAction.cs (1)
49return c.Properties.TryGetValue(JwtSecurityTokenHandler.ShortClaimTypeProperty, out var shortType)
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.Components (2)
PersistentComponentState.cs (1)
232if (_existingState.TryGetValue(key, out value))
src\aspnetcore\src\Http\Routing\src\ParameterPolicyActivator.cs (1)
92return inlineParameterPolicyMap.TryGetValue(policyKey, out policyType);
Microsoft.AspNetCore.Components.Endpoints (6)
BrowserConfiguration\BrowserOptionsHttpContextExtensions.cs (1)
25if (!context.Items.TryGetValue(Key, out var result))
DependencyInjection\TempDataService.cs (1)
45if (!httpContext.Items.TryGetValue(TempDataProviderServiceCollectionExtensions.HttpContextItemKey, out var tempDataObj)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
277if (!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)
TempData\TempDataProviderServiceCollectionExtensions.cs (1)
52if (httpContext.Items.TryGetValue(HttpContextItemKey, out var tempDataObj) && tempDataObj is ITempData tempData)
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.WebView (2)
FileExtensionContentTypeProvider.cs (1)
447return Mappings.TryGetValue(extension, out contentType);
src\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
390if (!existing.TryGetValue(key, out var existingNode))
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\aspnetcore\src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
src\aspnetcore\src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
StatusCodePage\StatusCodePagesExtensions.cs (2)
158if (app.Properties.TryGetValue(RerouteHelper.GlobalRouteBuilderKey, out var routeBuilder) && routeBuilder is not null) 190if (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.HeaderParsing (3)
HeaderParsingFeature.cs (1)
135if (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.Hosting (8)
GenericHost\GenericWebHostBuilder.cs (4)
178if (_builder.Properties.TryGetValue(_startupConfigName, out var startupObject) && 206if (_builder.Properties.TryGetValue(_startupConfigName, out var startupObject) && 327if (_builder.Properties.TryGetValue(_startupConfigName, out var startupObject) && 352if (_builder.Properties.TryGetValue(_startupConfigName, out var startupObject) &&
GenericHost\WebHostBuilderBase.cs (1)
78if (!context.Properties.TryGetValue(typeof(WebHostBuilderContext), out var contextVal))
Internal\HostingApplicationDiagnostics.cs (1)
486if (request.Headers.TryGetValue(HeaderNames.UserAgent, out var values))
src\aspnetcore\src\Shared\HttpExtensions.cs (1)
42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint)
src\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
390if (!existing.TryGetValue(key, out var existingNode))
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\aspnetcore\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\aspnetcore\src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
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)
723if (!properties.Items.TryGetValue(PasskeyOperationKey, out var operation) || 724!properties.Items.TryGetValue(PasskeyStateKey, out var state)) 1094if (auth?.Principal == null || items == null || !items.TryGetValue(LoginProviderKey, out var provider)) 1101if (!items.TryGetValue(XsrfKey, out var userId) ||
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.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)
44action.Properties.TryGetValue(typeof(ApiConventionResult), out var result)) 55if (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)
547if (!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\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
116return ReadDictionary.TryGetValue(key, out value);
Microsoft.AspNetCore.Mvc.Cors (1)
CorsHttpMethodActionConstraint.cs (1)
34request.Headers.TryGetValue(AccessControlRequestMethod, out var accessControlRequestMethod) &&
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.TagHelpers (1)
OptionTagHelper.cs (1)
74context.Items.TryGetValue(typeof(SelectTagHelper), out var formDataEntry);
Microsoft.AspNetCore.Mvc.Testing (2)
src\d0e903376af13807\HostFactoryResolver.cs (1)
355else if (_arbitraryActions?.TryGetValue(value.Key, out var arbitraryAction) == true)
WebApplicationFactory.cs (1)
442if (!data.TryGetValue(key, out var contentRoot))
Microsoft.AspNetCore.Mvc.ViewFeatures (15)
DefaultEditorTemplates.cs (1)
200if (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 (11)
Extensions\OpenApiDocumentExtensions.cs (4)
33actualSchema.Metadata.TryGetValue(OpenApiConstants.RefDescriptionAnnotation, out description); 34actualSchema.Metadata.TryGetValue(OpenApiConstants.RefExampleAnnotation, out example); 35actualSchema.Metadata.TryGetValue(OpenApiConstants.RefDefaultAnnotation, out defaultAnnotation); 36actualSchema.Metadata.TryGetValue(OpenApiConstants.RefDeprecatedAnnotation, out deprecatedAnnotation);
Extensions\OpenApiSchemaExtensions.cs (2)
30&& schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var schemaIdAsObject) 43&& schema.Metadata.TryGetValue(OpenApiConstants.SchemaIsUnion, out var isUnion)
Services\OpenApiDocumentService.cs (2)
178annotations.TryGetValue(OpenApiConstants.DescriptionId, out var descriptionId) && 568&& document.Components?.Schemas?.TryGetValue(schemaId, out var targetSchema) is true
Services\Schemas\OpenApiSchemaService.cs (3)
299if (schema.Metadata?.TryGetValue(OpenApiConstants.RefDefaultAnnotation, out var refDefault) == true 383targetSchema.Metadata?.TryGetValue(OpenApiConstants.NullableProperty, out var isNullableProperty) == true && 558if (schema.Properties.TryGetValue(propertyInfo.Name, out var propertySchema))
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.Razor.Runtime (1)
src\aspnetcore\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\aspnetcore\src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
Microsoft.AspNetCore.Routing (9)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (2)
45if (builder.Properties.TryGetValue(GlobalEndpointRouteBuilderKey, out var obj)) 128if (!app.Properties.TryGetValue(EndpointRouteBuilder, out var obj))
EndpointRoutingMiddleware.cs (1)
55applicationBuilder.Properties.TryGetValue(MiddlewareInvokedKeys.PostRoutingPipeline, out var value))
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\aspnetcore\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.Server.HttpSys (6)
src\aspnetcore\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\aspnetcore\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 (6)
Core\IISHttpContext.cs (1)
407if (RequestHeaders.TryGetValue(HeaderNames.ContentLength, out var contentLength))
src\aspnetcore\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\aspnetcore\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.Kestrel.Core (6)
Internal\Http\HttpProtocol.cs (1)
966((IHeaderDictionary)HttpRequestHeaders).TryGetValue(HeaderNames.Expect, out var expect) &&
Internal\Http3\Http3Connection.cs (1)
619if (!persistentStateFeature.State.TryGetValue(StreamPersistentStateKey, out var s) ||
Internal\Http3\Http3Stream.cs (1)
905if (((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.SignalR.Core (1)
Internal\DefaultHubDispatcher.cs (1)
976headers.TryGetValue(fieldName, out fieldValue);
Microsoft.AspNetCore.StaticFiles (1)
FileExtensionContentTypeProvider.cs (1)
441return Mappings.TryGetValue(extension, out contentType);
Microsoft.AspNetCore.TestHost (1)
src\d0e903376af13807\HostFactoryResolver.cs (1)
355else if (_arbitraryActions?.TryGetValue(value.Key, out var arbitraryAction) == true)
Microsoft.AspNetCore.Watch.BrowserRefresh (4)
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserRefreshMiddleware.cs (3)
72else if (context.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var contentEncodings)) 136if (request.Headers.TryGetValue("Sec-Fetch-Dest", out var values) && 176if (request.Headers.TryGetValue("Sec-Fetch-Dest", out var values) &&
src\sdk\src\Dotnet.Watch\Web.Middleware\ResponseStreamWrapper.cs (1)
130if (response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var contentEncodingValues))
Microsoft.Build (55)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
44if (_backingProperties.TryGetValue(key, out var property))
BackEnd\BuildManager\LegacyThreadingData.cs (4)
127_legacyThreadingEventsById.TryGetValue(submissionId, out legacyThreadingEvents); 145_legacyThreadingEventsById.TryGetValue(submissionId, out legacyThreadingEvents); 166_legacyThreadingEventsById.TryGetValue(submissionId, out legacyThreadingEvents); 188_legacyThreadingEventsById.TryGetValue(submissionId, out legacyThreadingEvents);
BackEnd\BuildManager\RequestedProjectState.cs (1)
97if (!another.ItemFilters.TryGetValue(kvp.Key, out List<string> metadata))
BackEnd\Components\Logging\LoggingService.cs (5)
735if (warningsByProject != null && warningsByProject.TryGetValue(key, out ISet<string> newWarnings)) 2074if (_warningsAsMessagesByProject.TryGetValue(GetWarningsConfigKey(warningEvent), out ISet<string> codesByProject)) 2087return WarningsNotAsErrors?.Contains(warningEvent.Code) != true && !(_warningsNotAsErrorsByProject?.TryGetValue(key, out ISet<string> notToError) == true && notToError.Contains(warningEvent.Code)); 2113if (_warningsAsErrorsByProject.TryGetValue(key, out ISet<string> codesByProject)) 2118_warningsNotAsErrorsByProject?.TryGetValue(key, out codesToIgnoreByProject);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
161Project.ItemDefinitions.TryGetValue(child.ItemType, out itemDefinition);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
669if (targetOutputsPerProject[i].TryGetValue(targetName, out ITaskItem[] outputItemsFromTarget))
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1339unfilteredResult.ResultsByTarget.TryGetValue(projectTargetInstance.Key, out TargetResult targetResult) &&
BackEnd\Components\RequestBuilder\TargetBuilder.cs (3)
153var targetExists = _projectInstance.Targets.TryGetValue(targetName.name, out ProjectTargetInstance targetInstance); 792if (_buildResult.ResultsByTarget.TryGetValue(targetName.name, out TargetResult targetBuildResult)) 809_buildResult.ResultsByTarget.TryGetValue(afterTarget.TargetName, out TargetResult result);
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
926_requestEntry.RequestConfiguration.Project.Targets.TryGetValue(_targetSpecification.TargetName, out _target);
BackEnd\Components\SdkResolution\SdkResult.cs (1)
157if (!result._environmentVariablesToAdd.TryGetValue(envVarToAdd.Key, out string otherEnvVarValue) || otherEnvVarValue != envVarToAdd.Value)
BackEnd\Shared\BuildResult.cs (1)
800if (existingResults.ResultsByTarget?.TryGetValue(target, out TargetResult? targetResult) ?? false)
Collections\CopyOnWritePropertyDictionary.cs (1)
237if (!otherDict.TryGetValue(thisProp.Key, out T thatProp) ||
Collections\PropertyDictionary.cs (3)
193_properties.TryGetValue(name, out projectProperty); 432if (_properties.TryGetValue(item.Key, out T value)) 464return ((IDictionary<string, T>)this).TryGetValue(item.Key, out T existingItem) &&
Collections\ReadOnlyConvertingDictionary.cs (1)
106if (_backing.TryGetValue(key, out V originalValue))
Construction\Solution\SolutionProjectGenerator.cs (3)
679globalProperties.TryGetValue("Configuration", out string activeSolutionConfiguration); 680globalProperties.TryGetValue("Platform", out string activeSolutionPlatform); 2176_globalProperties.TryGetValue("ProjectToolsVersion", out string childProjectToolsVersion);
Definition\ProjectCollection.cs (1)
2145if (!globalProperties.TryGetValue(leftProperty.Key, out var rightValue))
Definition\ProjectItem.cs (3)
332if (_project.ItemDefinitions.TryGetValue(ItemType, out itemDefinition)) 883if (_project.ItemDefinitions.TryGetValue(ItemType, out itemDefinition)) 1068if (_project.ItemDefinitions.TryGetValue(source.ItemType, out sourceItemDefinition))
Definition\Toolset.cs (3)
560if (SubToolsets.TryGetValue(subToolsetVersion, out subToolset)) 727if (overrideGlobalProperties != null && overrideGlobalProperties.TryGetValue(Constants.SubToolsetVersionPropertyName, out visualStudioVersion)) 830if (SubToolsets.TryGetValue(subToolsetVersion, out subToolset))
Evaluation\Evaluator.cs (1)
1291if (_data.Toolset.SubToolsets.TryGetValue(_data.SubToolsetVersion, out SubToolset subToolset))
Graph\GraphBuilder.cs (3)
390var solutionConfiguration = globalProperties != null && globalProperties.TryGetValue("Configuration", out string configuration) 394var solutionPlatform = globalProperties != null && globalProperties.TryGetValue("Platform", out string platform) 480if (nodeState.TryGetValue(referenceNode, out var projectReferenceNodeState))
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
208if (_projectElements.TryGetValue(key, out TCached element)) 223if (_constrainedProjectElements.TryGetValue((keyString, startIndex, length), out TCached element)) 234if (!_projectElements.TryGetValue(key, out TCached element))
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (1)
139public bool TryGetEscapedValue(string key, out string escapedValue) => _globalProperties.TryGetValue(key, out escapedValue);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (2)
46if (!_itemsByType.TryGetValue(itemType, out ICollection<TCached>? list)) 124if (_itemsByType.TryGetValue(itemType, out ICollection<TCached>? items))
Instance\ProjectInstance.cs (5)
1920_itemDefinitions.TryGetValue(itemType, out itemDefinitionInstance); 1959_targets.TryGetValue(targetName, out targetInstance); 2914if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).BeforeTargets.TryGetValue(target, out beforeTargetsForTarget)) 2931if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).AfterTargets.TryGetValue(target, out afterTargetsForTarget)) 3562linkedProject.ItemDefinitions.TryGetValue(item.ItemType, out ProjectItemDefinition itemTypeDefinition);
Instance\ProjectItemInstance.cs (2)
750if (projectToUse.ItemDefinitions.TryGetValue(itemTypeToUse, out itemDefinition)) 2341if (_project.ItemDefinitions.TryGetValue(source.ItemType, out sourceItemDefinition))
Instance\TaskFactories\TaskHostTask.cs (1)
261if (_setParameters.TryGetValue(property.Name, out object value))
Logging\ProfilerLogger.cs (2)
180if (aggregatedLocations.TryGetValue(pairToMerge.Key, out existingProfiledLocation)) 196if (pairToMerge.Key.ParentId.HasValue && mergeMap.TryGetValue(pairToMerge.Key.ParentId.Value, out mergedParent))
Microsoft.Build.Framework (4)
BackEnd\CommunicationsUtilities.cs (1)
360if (!right.TryGetValue(entry.Key, out string? otherValue)
BuildCheck\EnumerableExtensions.cs (2)
91if (!dict.TryGetValue(pair.Key, out TValue? value)) 120if (!dict.TryGetValue(key, out TValue? value))
TaskItemData.cs (1)
80Metadata.TryGetValue(metadataName, out var result);
Microsoft.Build.Tasks.Core (9)
AssignProjectConfiguration.cs (2)
287if (_defaultToVcxMap.TryGetValue(CurrentProjectPlatform, out transformedPlatform)) 294if (_vcxToDefaultMap.TryGetValue(CurrentProjectPlatform, out transformedPlatform))
GetSDKReferenceFiles.cs (2)
475if (sdkInfo.PathToReferenceMetadata != null && sdkInfo.PathToReferenceMetadata.TryGetValue(reference.AssemblyLocation, out SdkReferenceInfo referenceInfo)) 570if (info.DirectoryToFileList != null && info.DirectoryToFileList.TryGetValue(FileUtilities.EnsureNoTrailingSlash(path), out List<string> referenceFiles) && referenceFiles != null)
MSBuild.cs (1)
611if (targetOutputsPerProject[i].TryGetValue(targetName, out ITaskItem[] outputItemsFromTarget))
ResGenDependencies.cs (3)
127if (!resXFiles.TryGetValue(resxFile, out ResXFile retVal)) 161portableLibraries.TryGetValue(libraryPath, out PortableLibraryFile retVal); 177if (!portableLibraries.TryGetValue(library.FileName, out PortableLibraryFile cached) || !library.Equals(cached))
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
599if (DefaultReferences.TryGetValue(taskInfo.CodeLanguage, out IEnumerable<string> value))
Microsoft.CodeAnalysis (2)
Collections\CachingDictionary.cs (1)
167if (localMap.TryGetValue(key, out elements))
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
334if (!builder.TryGetValue(info.Id, out currentInfo))
Microsoft.CodeAnalysis.Analyzers (15)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
611if (pointsToValues.TryGetValue(analysisEntity, out var pointsToValue))
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.CodeStyle (13)
src\roslyn\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\roslyn\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\roslyn\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 (4)
Compilation\CSharpCompilation.cs (1)
1321return ReferenceDirectiveMap.TryGetValue((directive.SyntaxTree.FilePath, directive.File.ValueText), out reference) ? reference : null;
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)
2879if (_lazyForwardedTypesFromSource.TryGetValue(emittedName.FullName, out result))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
939if (location.IsInSource && reverseMappedLocations.TryGetValue(location, out var conflictingLocation))
Microsoft.CodeAnalysis.Extensions.Package (1)
Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.Features (12)
CodeLens\CodeLensHelpers.cs (2)
21if (descriptorProperties.TryGetValue("RoslynDocumentIsSourceGenerated", out var isSourceGeneratedObj)) 36return 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)
50if (groups.TryGetValue(SymbolDescriptionGroups.StructuralTypes, out var anonymousTypes))
LanguageServices\AnonymousTypeDisplayService\StructuralTypeDisplayInfo.cs (1)
49if (structuralTypeToName.TryGetValue(type, out var name) &&
QuickInfo\QuickInfoUtilities.cs (5)
73if (groups.TryGetValue(SymbolDescriptionGroups.Documentation, out var docParts) && !docParts.IsDefaultOrEmpty) 80groups.TryGetValue(SymbolDescriptionGroups.RemarksDocumentation, out var remarksDocumentation) && 91if (groups.TryGetValue(SymbolDescriptionGroups.ReturnsDocumentation, out var returnsDocumentation) && 100if (groups.TryGetValue(SymbolDescriptionGroups.ValueDocumentation, out var valueDocumentation) && 164=> groups.TryGetValue(group, out taggedParts) && !taggedParts.IsDefaultOrEmpty;
Microsoft.CodeAnalysis.NetAnalyzers (3)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DefineAccessorsForAttributeArguments.cs (1)
146if (!propertiesMap.TryGetValue(parameter.Name, out IPropertySymbol property) ||
src\9382845807600969\AnalysisEntityDataFlowOperationVisitor.cs (1)
610if (pointsToValues.TryGetValue(analysisEntity, out var pointsToValue))
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
2091dict1.Keys.All(key => dict2.TryGetValue(key, out TValue value2) && EqualityComparer<TValue>.Default.Equals(dict1[key], value2));
Microsoft.CodeAnalysis.ResxSourceGenerator (13)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
Microsoft.CodeAnalysis.Workspaces (16)
Rename\ConflictEngine\ConflictResolver.cs (1)
329if (reverseMappedLocations.TryGetValue(newLocation, out var oldLocation))
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\roslyn\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)
Build\ProjectBuildManager.cs (1)
246if (!project.GlobalProperties.TryGetValue(PropertyNames.TargetFramework, out var initialGlobalTargetFrameworkValue))
Microsoft.DotNet.Build.Manifest (1)
EnumerableExtensions.cs (1)
15attributes.TryGetValue(key, out value);
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)
184if (values.TryGetValue(varName, out string value))
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\HotReloadClient\Utilities\EnvironmentUtilities.cs (1)
15if (!environment.TryGetValue(key, out var existingValue) || existingValue is "")
Microsoft.DotNet.XliffTasks (1)
Tasks\TransformTemplates.cs (1)
100if (resourceMap.TryGetValue(templateItemFullPath, out ITaskItem unstructuredResource))
Microsoft.Extensions.AI.Abstractions.Tests (3)
AssertExtensions.cs (1)
69if (!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.Evaluation (3)
EvaluationResult.cs (2)
107if (Metrics.TryGetValue(metricName, out EvaluationMetric? m) && m is T metric) 139if (Metrics.TryGetValue(metricName, out EvaluationMetric? m) && m is T metric)
Utilities\BuiltInMetricUtilities.cs (1)
19metric.Metadata?.TryGetValue(BuiltInEvalMetadataName, out string? stringValue) is true &&
Microsoft.Extensions.AI.Evaluation.Console (2)
Commands\ReportCommand.cs (1)
274if ((metric.Metadata?.TryGetValue(metadataName, out string? value)) is not true ||
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\BuiltInMetricUtilities.cs (1)
19metric.Metadata?.TryGetValue(BuiltInEvalMetadataName, out string? stringValue) is true &&
Microsoft.Extensions.AI.Evaluation.Integration.Tests (8)
QualityEvaluatorTests.cs (4)
261groundedness.Context.TryGetValue(GroundednessEvaluatorContext.GroundingContextName, out EvaluationContext? context1) && 266equivalence.Context.TryGetValue(EquivalenceEvaluatorContext.GroundTruthContextName, out EvaluationContext? context2) && 271completeness.Context.TryGetValue(CompletenessEvaluatorContext.GroundTruthContextName, out EvaluationContext? context3) && 276retrieval.Context.TryGetValue(RetrievalEvaluatorContext.RetrievedContextChunksContextName, out EvaluationContext? context4) &&
SafetyEvaluatorTests.cs (4)
226groundednessPro.Context.TryGetValue(GroundednessProEvaluatorContext.GroundingContextName, out EvaluationContext? context1) && 231ungroundedAttributes.Context.TryGetValue(UngroundedAttributesEvaluatorContext.GroundingContextName, out EvaluationContext? context2) && 317groundednessPro.Context.TryGetValue(GroundednessProEvaluatorContext.GroundingContextName, out EvaluationContext? context1) && 322ungroundedAttributes.Context.TryGetValue(UngroundedAttributesEvaluatorContext.GroundingContextName, out EvaluationContext? context2) &&
Microsoft.Extensions.AI.Evaluation.NLP (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\BuiltInMetricUtilities.cs (1)
19metric.Metadata?.TryGetValue(BuiltInEvalMetadataName, out string? stringValue) is true &&
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\BuiltInMetricUtilities.cs (1)
19metric.Metadata?.TryGetValue(BuiltInEvalMetadataName, out string? stringValue) is true &&
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyEvaluator.cs (1)
155if (metricNames.TryGetValue(contentSafetyServiceMetricName, out string? metricName))
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\BuiltInMetricUtilities.cs (1)
19metric.Metadata?.TryGetValue(BuiltInEvalMetadataName, out string? stringValue) is true &&
Microsoft.Extensions.AI.OpenAI (1)
OpenAIImageGenerator.cs (1)
121if (additionalRawData?.TryGetValue("output_format", out var outputFormat) ?? false)
Microsoft.Extensions.AI.OpenAI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
69if (!actual.TryGetValue(expectedEntry.Key, out object? actualValue))
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (1)
673a.Context?.TryGetValue(typeof(MyService), out object? service) is true ? service :
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
69if (!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)
373if (!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.NET.Build.Tasks (6)
AssetsFileResolver.cs (1)
77if (!resourceAssembly.Properties.TryGetValue("locale", out locale))
GenerateRuntimeConfigurationFiles.cs (1)
322if (!runtimeOptions.RawOptions.TryGetValue("configProperties", out JsonNode configProperties)
ProjectContext.cs (3)
248if (libraryLookup.TryGetValue(libraryName, out library)) 267if (libraryLookup.TryGetValue(libraryName, out library)) 293if (packagesToBeFiltered.TryGetValue(entry.Key, out librarySet))
ResolvePackageAssets.cs (1)
1144if (asset.Properties.TryGetValue(LockFileItem.AliasesProperty, out var aliases))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (5)
ApplyCompressionNegotiation.cs (4)
119if (endpointsByAsset.TryGetValue(endpoint.AssetFile, out var endpointsToSkip)) 330if (!assetsById.TryGetValue(compressedAsset.RelatedAsset, out var relatedAsset)) 336if (!endpointsByAsset.TryGetValue(compressedAsset.Identity, out var compressedEndpoints)) 342if (!endpointsByAsset.TryGetValue(relatedAsset.Identity, out var relatedAssetEndpoints))
Compression\DiscoverPrecompressedAssets.cs (1)
84return candidates.TryGetValue(identityWithoutExtension, out var relatedAsset) ? relatedAsset : null;
Microsoft.TemplateEngine.Cli (2)
TemplateSearch\CliSearchFiltersFactory.cs (2)
30if (templateSearchData.AdditionalData.TryGetValue(CliHostSearchCacheData.DataName, out object? hostDataRaw) 103if (templateData.AdditionalData.TryGetValue(CliHostSearchCacheData.DataName, out object? hostDataRaw)
Microsoft.TemplateEngine.Core (14)
Operations\BalancedNesting.cs (1)
85if (processor.Config.Flags.TryGetValue(_resetFlag!, out bool resetFlagValue) && resetFlagValue)
Operations\Conditional.cs (1)
150if (processor.Config.Flags.TryGetValue(OperationName, out bool flag) && !flag)
Operations\ExpandVariables.cs (1)
45if (processor.Config.Flags.TryGetValue("expandVariables", out bool flag) && !flag)
Operations\Include.cs (1)
64if (processor.Config.Flags.TryGetValue(OperationName, out bool flag) && !flag)
Operations\InlineMarkupConditional.cs (1)
98if (processor.Config.Flags.TryGetValue(Conditional.OperationName, out bool flag) && !flag)
Operations\Region.cs (1)
70if (processor.Config.Flags.TryGetValue(Region.OperationName, out bool flag) && !flag)
Operations\Replacement.cs (1)
60if (processor.Config.Flags.TryGetValue(OperationName, out bool flag) && !flag)
Operations\SetFlag.cs (1)
79if (!processor.Config.Flags.TryGetValue(OperationName, out bool flagsOn))
Util\ProcessorState.cs (2)
216if (operation.Id == null || (Config.Flags.TryGetValue(operation.Id, out bool opEnabledFlag) && opEnabledFlag)) 313if (operation.Id == null || (Config.Flags.TryGetValue(operation.Id, out bool opEnabledFlag) && opEnabledFlag))
VariableCollection.cs (4)
72if (_values.TryGetValue(key, out object result)) 79if (_parent?.TryGetValue(key, out result) ?? false) 187if (_values.TryGetValue(key, out value)) 193return _parent?.TryGetValue(key, out value) ?? false;
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (11)
FileRenameGenerator.cs (1)
132if (variables.TryGetValue(fileRenameToken.VariableName, out object? newValueObject))
Macros\CaseChangeMacro.cs (1)
19if (!variableCollection.TryGetValue(config.Source, out object? working))
Macros\CoalesceMacro.cs (2)
19if (variableCollection.TryGetValue(config.SourceVariableName, out object currentSourceValue) && currentSourceValue != null) 50if (variableCollection.TryGetValue(config.FallbackVariableName, out object currentFallbackValue) && currentFallbackValue != null)
Macros\JoinMacro.cs (1)
26if (!vars.TryGetValue(symbol.Value, out working) || working == null)
Macros\ProcessValueFormMacro.cs (1)
19if (!vars.TryGetValue(config.SourceVariable, out object working))
Macros\RegexMacro.cs (1)
19if (!variableCollection.TryGetValue(config.Source, out object working))
Macros\RegexMatchMacro.cs (1)
19if (!variableCollection.TryGetValue(config.Source, out object working))
OperationConfig\ReplacementConfig.cs (1)
66if (variables.TryGetValue(tokens.VariableName, out object newValueObject))
RunnableProjectConfig.cs (1)
210rootVariableCollection.TryGetValue(ConfigurationModel.NameSymbol.Name, out object? resolvedNameParamValue);
RunnableProjectGenerator.cs (1)
391variables.TryGetValue(choiceKey, out object? existingValueObj) &&
Microsoft.TemplateEngine.Utils (1)
RuntimeValueUtils.cs (1)
15&& parameters.ResolvedValues.TryGetValue(param, out object? newValueObject)
Microsoft.TestPlatform.CoreUtilities (2)
Helpers\CommandLineArgumentsHelper.cs (2)
69var found = argsDictionary.TryGetValue(fullname, out var optionValue); 89return argsDictionary.TryGetValue(fullname, out var optionValue) ? optionValue : string.Empty;
Microsoft.TestPlatform.CrossPlatEngine (2)
DataCollection\InProcDataCollectionSink.cs (2)
42if (!_testCaseDataCollectionDataMap.TryGetValue(testCaseId, out TestCaseDataCollectionData? testCaseDataCollection)) 56if (!_testCaseDataCollectionDataMap.TryGetValue(testCaseId, out var testCaseCollectionData))
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Hosting\DefaultTestHostManager.cs (1)
572&& testHostEnvironmentVariables.TryGetValue("VSTEST_BACKGROUND_DISCOVERY", out var isBackgroundDiscoveryEnabled)
Microsoft.VisualStudio.TestPlatform.ObjectModel (6)
Client\TestRunStatistics.cs (1)
68return Stats?.TryGetValue(testOutcome, out var count) == true ? count : 0;
DataCollector\Events\SessionEvents.cs (2)
78return _properties.TryGetValue(property, out var propertyValue) ? (T?)propertyValue : default; 91_properties.TryGetValue(property, out var propertyValue);
DataCollector\InProcDataCollector\TestSessionStartArgs.cs (2)
72return _properties.TryGetValue(property, out var propertyValue) ? (T?)propertyValue : default; 85_properties.TryGetValue(property, out var propertyValue);
Nuget.Frameworks\FrameworkNameProvider.cs (1)
120if (mappings.TryGetValue(key, out value))
Mono.Cecil (1)
Mono.Cecil\DefaultAssemblyResolver.cs (1)
30 if (cache.TryGetValue (name.FullName, out assembly))
MSBuild (5)
OutOfProcTaskHostNode.cs (4)
1670environment.TryGetValue(variable.Key, out environmentValue); 1737environment.TryGetValue(variable.Key, out environmentValue); 1786if (!environment.TryGetValue(variable.Key, out newValue)) 1803if (!_savedEnvironment.TryGetValue(variable.Key, out oldValue))
XMake.cs (1)
1920nodeResultKvp.Key.ProjectInstance.GlobalProperties.All(propertyKvp => entryPoint.GlobalProperties.TryGetValue(propertyKvp.Key, out string entryValue) &&
NuGet.Build.Tasks.Console (3)
MSBuildProjectInstance.cs (1)
58if (_projectInstance.GlobalProperties.TryGetValue(property, out string value))
MSBuildStaticGraphRestore.cs (1)
1342if (!projectInstance.Targets.ContainsKey("_IsProjectRestoreSupported") || projectInstance.GlobalProperties == null || projectInstance.GlobalProperties.TryGetValue("TargetFramework", out string targetFramework) && string.IsNullOrWhiteSpace(targetFramework))
RestoreProjectAdapter.cs (1)
60if (_globalProperties.TryGetValue(propertyName, out string value))
NuGet.Build.Tasks.Pack (4)
PackTaskLogic.cs (4)
534var succeeded = targetAliasToNuGetFramework.TryGetValue(targetFrameworkProperty, out translated); 580var succeeded = targetAliasToNuGetFramework.TryGetValue(targetFramework, out translated); 939if (!dependenciesByFramework.TryGetValue(framework.FrameworkName, out dependencies)) 967if (projectRefToVersionMap.TryGetValue(projectReference.ProjectPath, out var projectRefVersion))
NuGet.Commands (25)
PackCommand\Logging\PackageSpecificWarningProperties.cs (4)
62if (!Properties.TryGetValue(code, out IDictionary<string, ISet<NuGetFramework>> frameworksByLibraryId)) 68if (!frameworksByLibraryId.TryGetValue(libraryId, out ISet<NuGetFramework> frameworks)) 87Properties.TryGetValue(code, out var libraryIdsAndFrameworks) && 88libraryIdsAndFrameworks.TryGetValue(libraryId, out var frameworkSet) &&
RestoreCommand\CompatibilityChecker.cs (4)
268group.Properties.TryGetValue(ManagedCodeConventions.PropertyNames.RuntimeIdentifier, out var ridObj); 269group.Properties.TryGetValue(ManagedCodeConventions.PropertyNames.TargetFrameworkMoniker, out var tfmObj); 290if (localLibrary.Items.TryGetValue( 303if (library.Items.TryGetValue(
RestoreCommand\LockFileBuilder.cs (1)
92if (localMatch.LocalLibrary.Items.TryGetValue(KnownLibraryProperties.MSBuildProjectPath, out msbuildPath))
RestoreCommand\Logging\PackageSpecificWarningProperties.cs (4)
83if (!Properties.TryGetValue(code, out IDictionary<string, ISet<string>> frameworksByLibraryId)) 89if (!frameworksByLibraryId.TryGetValue(libraryId, out ISet<string> frameworks)) 136Properties.TryGetValue(code, out var libraryIdsAndFrameworks) && 137libraryIdsAndFrameworks.TryGetValue(libraryId, out var frameworkSet) &&
RestoreCommand\ProjectRestoreCommand.cs (1)
69frameworkToAlias?.TryGetValue(pair.Key, out targetAlias);
RestoreCommand\RequestFactory\MSBuildItem.cs (1)
59if (_metadata.TryGetValue(property, out val) && val != null)
RestoreCommand\Utility\LockFileUtils.cs (8)
531if (localMatch.LocalLibrary.Items.TryGetValue( 565if (localMatch.LocalLibrary.Items.TryGetValue(KnownLibraryProperties.MSBuildProjectPath, out object msbuildPath)) 581if (localMatch.LocalLibrary.Items.TryGetValue(KnownLibraryProperties.ProjectRestoreMetadataFiles, out object filesObject)) 649if (localMatch.LocalLibrary.Items.TryGetValue( 658if (localMatch.LocalLibrary.Items.TryGetValue( 718if (group.Properties.TryGetValue( 1035if (group.Properties.TryGetValue(primaryKey, out keyObj)) 1060if (group.Properties.TryGetValue(
RestoreCommand\Utility\MSBuildRestoreUtility.cs (2)
438&& paths.TryGetValue(refUniqueName, out var refUniqueNameCasing) 448&& paths.TryGetValue(projectRefPath, out var projectRefPathCasing)
NuGet.Common (1)
Telemetry\TelemetryEvent.cs (1)
46_properties.TryGetValue(key, out var value);
NuGet.DependencyResolver.Core (1)
ResolverUtility.cs (1)
232if (lockFileLibraries.TryGetValue(key, out var libraries))
NuGet.Frameworks (1)
FrameworkNameProvider.cs (1)
121if (mappings.TryGetValue(key, out value))
NuGet.LibraryModel (2)
LibraryExtensions.cs (2)
22if (library.Items.TryGetValue(key, out value)) 32if (library.Items.TryGetValue(key, out value))
NuGet.PackageManagement (7)
Resolution\PrunePackageTree.cs (2)
89if (packagesDict.TryGetValue(dependency.Id, out packages)) 116installed.TryGetValue(package.Id, out NuGetVersion version))
Resolution\UninstallResolver.cs (4)
41if (!dependenciesDict.TryGetValue(packageIdentity, out dependencies)) 72if (dependentsDict.TryGetValue(packageIdentity, out dependents) 87&& dependenciesDict.TryGetValue(packageIdentity, out dependencies) 117&& dependenciesDict.TryGetValue(headPackage, out dependencies)
Utility\XElementExtensions.cs (1)
163&& nodeActions.TryGetValue(targetChild.Name, out nodeAction))
NuGet.Packaging (6)
ContentModel\ContentItemCollection.cs (1)
178if (!itemGroup.Properties.TryGetValue(criteriaProperty.Key, out itemProperty))
Core\Fingerprints.cs (1)
25_keyValuePairs.TryGetValue(key, out var value);
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (2)
81if (nuspecReferences.TryGetValue(files.Key, out var currentReferences) || 82nuspecReferences.TryGetValue("any", out anyReferences))
Signing\Signatures\Signature.cs (1)
369if (_signingCertificateFingerprintLookup.TryGetValue(algorithm, out var fingerprint))
Signing\Verification\AllowListVerificationProvider.cs (1)
162if (!CertificateFingerprintLookUp.TryGetValue(fingerprintAlgorithm, out var fingerprintString))
NuGet.ProjectModel (1)
LockFile\LockFileItem.cs (1)
95Properties.TryGetValue(name, out value);
NuGet.Protocol (1)
Resources\ServiceIndexResourceV3.cs (1)
107if (_index.TryGetValue(type, out entries))
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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
37if (symbol is TType1 && _map.TryGetValue((TType1)symbol, out var converted))
src\roslyn\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)
389command.Arguments!.TryGetValue("FilterAndPayloadSpecs", out filterAndPayloadSpecs);
System\Diagnostics\Metrics\MetricsEventSource.cs (7)
430if (command.Arguments!.TryGetValue(ClientIdKey, out string? clientId)) 534if (arguments.TryGetValue("Metrics", out metricsSpecs)) 546if (arguments.TryGetValue("Base2ExponentialHistogram", out base2ExponentialHistogramSpec)) 570if (command.Arguments!.TryGetValue(ClientIdKey, out string? clientIdArg) && !string.IsNullOrEmpty(clientIdArg)) 609if (arguments.TryGetValue(argumentsKey, out string? maxString)) 656if (arguments!.TryGetValue(RefreshIntervalKey, out string? refreshInterval)) 678if (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\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (1)
47if (dictionary.TryGetValue(key, out value))
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (1)
57if (!e.Arguments.TryGetValue("EventCounterIntervalSec", out string? valueStr)
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.ServiceModel.Primitives (3)
System\IdentityModel\Policy\UnconditionalPolicy.cs (1)
215if (!evaluationContext.Properties.TryGetValue(SecurityUtils.Identities, out obj))
System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
159if (!Properties.TryGetValue(propertyName, out dictionaryValue))
System\ServiceModel\ServiceSecurityContext.cs (1)
111if (authContext != null && authContext.Properties.TryGetValue(SecurityUtils.Identities, out identities))
System.Text.Json (1)
System\ReflectionExtensions.cs (1)
285if (substitution.TryGetValue(pattern, out Type? existing))
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
268if (substitution.TryGetValue(patternParam, out ITypeSymbol? existing))
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))
testhost (3)
src\vstest\src\testhost.x86\DefaultEngineInvoker.cs (3)
95if (argsDictionary.TryGetValue(RemotePath, out var remotePath) && remotePath != null) 100if (argsDictionary.TryGetValue(LocalPath, out var localPath) && localPath != null) 286if (argsDictionary.TryGetValue(LogFileArgument, out var logFile))
testhost.arm64 (3)
src\vstest\src\testhost.x86\DefaultEngineInvoker.cs (3)
95if (argsDictionary.TryGetValue(RemotePath, out var remotePath) && remotePath != null) 100if (argsDictionary.TryGetValue(LocalPath, out var localPath) && localPath != null) 286if (argsDictionary.TryGetValue(LogFileArgument, out var logFile))
testhost.x86 (3)
DefaultEngineInvoker.cs (3)
95if (argsDictionary.TryGetValue(RemotePath, out var remotePath) && remotePath != null) 100if (argsDictionary.TryGetValue(LocalPath, out var localPath) && localPath != null) 286if (argsDictionary.TryGetValue(LogFileArgument, out var logFile))
WebPubSubWeb (1)
Program.cs (1)
62if (context.Request.Method != "POST" || !context.Request.Headers.TryGetValue("ce-type", out var eventType))