131 implementations of TryGetValue
dotnet-svcutil-lib (1)
InMemory.FunctionalTests (2)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Http (4)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Microsoft.AspNetCore.Owin (3)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Microsoft.AspNetCore.Shared.Tests (5)
Microsoft.Build (9)
Microsoft.Build.Framework (3)
Microsoft.Build.Tasks.Core (2)
Microsoft.Build.Utilities.Core (2)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.CodeStyle (5)
Microsoft.CodeAnalysis.Collections.Package (4)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.Maui.Controls (3)
Microsoft.ML.Core (1)
Microsoft.ML.SearchSpace (3)
Microsoft.ML.TorchSharp (1)
MSBuild (2)
MSBuildTaskHost (3)
PresentationCore (4)
PresentationFramework (2)
Shared (1)
System.Collections (3)
System.Collections.Immutable (4)
System.Composition.Hosting (1)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (1)
System.Linq.Expressions (1)
System.Net.Http (1)
System.Private.CoreLib (2)
System.Security.Cryptography.Cose (1)
System.ServiceModel.Primitives (1)
System.Speech (1)
System.Text.Json (1)
System.Xaml (2)
System.Xaml.Tests (2)
693 references to TryGetValue
AnalyzerRunner (1)
Aspire.Dashboard (2)
Aspire.Hosting (7)
Aspire.Hosting.Azure (1)
BasicWebSite (2)
CSharpSyntaxGenerator (3)
dotnet-openapi (1)
dotnet-svcutil-lib (7)
dotnet-user-jwts (2)
GenericHostWebSite (2)
illink (3)
InMemory.FunctionalTests (7)
InProcessWebSite (3)
Interop.FunctionalTests (1)
Kestrel.SampleApp (1)
Microsoft.Analyzers.Local (2)
Microsoft.AspNetCore (3)
Microsoft.AspNetCore.Antiforgery (3)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.Authentication (2)
Microsoft.AspNetCore.Authentication.Abstractions (6)
Microsoft.AspNetCore.Authentication.Core (3)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.Test (3)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.BrowserTesting (3)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Endpoints (3)
Microsoft.AspNetCore.Components.Server (2)
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (18)
ContentEncodingNegotiatorTests.cs (18)
29Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
31Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
51Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
52Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
72Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
74Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
95Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
97Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
118Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
120Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
141Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
143Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
164Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
166Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
186Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
187Assert.False(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
207Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.ContentEncoding, out var selectedEncoding));
209Assert.True(httpContext.Response.Headers.TryGetValue(HeaderNames.Vary, out var varyHeader));
Microsoft.AspNetCore.Components.WebView (2)
Microsoft.AspNetCore.Components.WebView.Photino (1)
Microsoft.AspNetCore.Components.WebView.Test (1)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
Microsoft.AspNetCore.Connections.Abstractions (3)
Microsoft.AspNetCore.Cors (2)
Microsoft.AspNetCore.Diagnostics (4)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
Microsoft.AspNetCore.Grpc.Swagger.Tests (18)
Microsoft.AspNetCore.HeaderParsing (3)
Microsoft.AspNetCore.HeaderPropagation (2)
Microsoft.AspNetCore.HostFiltering.Tests (2)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Hosting.Tests (2)
Microsoft.AspNetCore.Http (5)
Microsoft.AspNetCore.Http.Abstractions (4)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.HttpLogging (5)
Microsoft.AspNetCore.Identity (2)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Test (1)
Microsoft.AspNetCore.JsonPatch (3)
Microsoft.AspNetCore.JsonPatch.Tests (8)
Microsoft.AspNetCore.MiddlewareAnalysis (1)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
Microsoft.AspNetCore.Mvc.Core (17)
Microsoft.AspNetCore.Mvc.Core.Test (4)
Microsoft.AspNetCore.Mvc.Cors (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (9)
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.RazorPages (2)
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (14)
Microsoft.AspNetCore.OpenApi (6)
Microsoft.AspNetCore.OpenApi.Tests (40)
Services\OpenApiSchemaService\OpenApiSchemaService.PolymorphicSchemas.cs (25)
25Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
39Assert.True(document.Components.Schemas.TryGetValue("ShapeTriangle", out var triangleSchema));
42Assert.True(document.Components.Schemas.TryGetValue("ShapeSquare", out var squareSchema));
62Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
78Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithCity", out var citySchema));
82Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithTimeSeries", out var timeSeriesSchema));
86Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithLocalNews", out var newsSchema));
107Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
121Assert.True(document.Components.Schemas.TryGetValue("PersonStudent", out var citySchema));
125Assert.True(document.Components.Schemas.TryGetValue("PersonTeacher", out var timeSeriesSchema));
146Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
157Assert.True(document.Components.Schemas.TryGetValue("ColorPaintColor", out var paintSchema));
161Assert.True(document.Components.Schemas.TryGetValue("ColorFabricColor", out var fabricSchema));
165Assert.True(document.Components.Schemas.TryGetValue("ColorBase", out var colorSchema));
185Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
209Assert.True(document.Components.Schemas.TryGetValue("PetDog", out var dogSchema));
213Assert.True(document.Components.Schemas.TryGetValue("PetCat", out var catSchema));
217Assert.True(document.Components.Schemas.TryGetValue("PetPet", out var petSchema));
238Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
249Assert.True(document.Components.Schemas.TryGetValue("OrganismAnimal", out var animalSchema));
251Assert.True(document.Components.Schemas.TryGetValue("OrganismPlant", out var plantSchema));
253Assert.True(document.Components.Schemas.TryGetValue("OrganismBase", out var baseSchema));
273Assert.True(requestBody.TryGetValue("application/json", out var mediaType));
291Assert.True(document.Components.Schemas.TryGetValue("EmployeeManager", out var managerSchema));
293Assert.True(document.Components.Schemas.TryGetValue("EmployeeEmployee", out var employeeSchema));
Microsoft.AspNetCore.Owin (23)
Microsoft.AspNetCore.Owin.Tests (5)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.RequestDecompression (1)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Rewrite (5)
Microsoft.AspNetCore.Routing (8)
Microsoft.AspNetCore.Routing.Tests (2)
Microsoft.AspNetCore.Server.HttpSys (6)
Microsoft.AspNetCore.Server.IIS (5)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (45)
HttpRequestHeadersTests.cs (38)
72Assert.False(headers.TryGetValue("host", out value));
73Assert.False(headers.TryGetValue("custom", out value));
74Assert.False(headers.TryGetValue("Content-Length", out value));
77Assert.True(headers.TryGetValue("host", out value));
78Assert.False(headers.TryGetValue("custom", out value));
79Assert.False(headers.TryGetValue("Content-Length", out value));
82Assert.True(headers.TryGetValue("host", out value));
83Assert.True(headers.TryGetValue("custom", out value));
84Assert.False(headers.TryGetValue("Content-Length", out value));
87Assert.True(headers.TryGetValue("host", out value));
88Assert.True(headers.TryGetValue("custom", out value));
89Assert.True(headers.TryGetValue("Content-Length", out value));
288Assert.False(headers.TryGetValue("host", out value));
289Assert.False(headers.TryGetValue("custom", out value));
290Assert.False(headers.TryGetValue("Content-Length", out value));
295Assert.True(headers.TryGetValue("host", out value));
296Assert.True(headers.TryGetValue("custom", out value));
297Assert.True(headers.TryGetValue("Content-Length", out value));
302Assert.True(headers.TryGetValue("host", out value));
303Assert.True(headers.TryGetValue("custom", out value));
304Assert.True(headers.TryGetValue("Content-Length", out value));
317Assert.True(headers.TryGetValue("host", out value));
318Assert.True(headers.TryGetValue("custom", out value));
319Assert.True(headers.TryGetValue("Content-Length", out value));
324Assert.False(headers.TryGetValue("host", out value));
325Assert.False(headers.TryGetValue("custom", out value));
326Assert.False(headers.TryGetValue("Content-Length", out value));
339Assert.True(headers.TryGetValue("host", out value));
340Assert.True(headers.TryGetValue("custom", out value));
341Assert.True(headers.TryGetValue("Content-Length", out value));
347Assert.False(headers.TryGetValue("host", out value));
348Assert.True(headers.TryGetValue("custom", out value));
354Assert.False(headers.TryGetValue("host", out value));
355Assert.False(headers.TryGetValue("custom", out value));
356Assert.True(headers.TryGetValue("Content-Length", out value));
362Assert.False(headers.TryGetValue("host", out value));
363Assert.False(headers.TryGetValue("custom", out value));
364Assert.False(headers.TryGetValue("Content-Length", out value));
Microsoft.AspNetCore.Shared.Tests (7)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.Tests (1)
Microsoft.Build (88)
Instance\ProjectInstance.cs (5)
1783_itemDefinitions.TryGetValue(itemType, out itemDefinitionInstance);
1822_targets.TryGetValue(targetName, out targetInstance);
2743if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).BeforeTargets.TryGetValue(target, out beforeTargetsForTarget))
2760if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).AfterTargets.TryGetValue(target, out afterTargetsForTarget))
3383linkedProject.ItemDefinitions.TryGetValue(item.ItemType, out ProjectItemDefinition itemTypeDefinition);
Instance\TaskFactories\AssemblyTaskFactory.cs (14)
477if (identityParameters.TryGetValue(XMakeAttributes.runtime, out runtime))
495if (identityParameters.TryGetValue(XMakeAttributes.architecture, out architecture))
528taskIdentityParameters.TryGetValue(XMakeAttributes.runtime, out taskRuntime);
530factoryIdentityParameters.TryGetValue(XMakeAttributes.runtime, out usingTaskRuntime);
534taskIdentityParameters.TryGetValue(XMakeAttributes.architecture, out taskArchitecture);
536factoryIdentityParameters.TryGetValue(XMakeAttributes.architecture, out usingTaskArchitecture);
569mergedParameters.TryGetValue(XMakeAttributes.runtime, out mergedRuntime);
570mergedParameters.TryGetValue(XMakeAttributes.architecture, out mergedArchitecture);
579taskIdentityParameters.TryGetValue(XMakeAttributes.runtime, out string taskRuntime);
580factoryIdentityParameters.TryGetValue(XMakeAttributes.runtime, out string usingTaskRuntime);
591taskIdentityParameters.TryGetValue(XMakeAttributes.architecture, out string taskArchitecture);
592factoryIdentityParameters.TryGetValue(XMakeAttributes.architecture, out string usingTaskArchitecture);
620if (mergedParameters.TryGetValue(XMakeAttributes.runtime, out runtime))
632if (mergedParameters.TryGetValue(XMakeAttributes.architecture, out architecture))
Microsoft.Build.Engine.OM.UnitTests (5)
Microsoft.Build.Engine.UnitTests (5)
Microsoft.Build.Framework (3)
Microsoft.Build.Tasks.Core (8)
Microsoft.Build.UnitTests.Shared (1)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.CodeStyle (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (12)
19if (!dictionary.TryGetValue(key, out var value))
31if (!dictionary.TryGetValue(key, out var value))
43if (dictionary.TryGetValue(key, out var value))
67if (!dictionary.TryGetValue(key, out var collection))
79if (!dictionary.TryGetValue(key, out var builder))
91if (!dictionary.TryGetValue(key, out var builder))
103if (dictionary.TryGetValue(key, out var set))
123if (!dictionary.TryGetValue(key, out var existingArray))
135if (!dictionary.TryGetValue(key, out var existingArray))
147if (dictionary.TryGetValue(key, out var collection))
186if (dictionary.TryGetValue(key, out var collection))
215if (dictionary.TryGetValue(key, out var collection))
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.Features (10)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces (16)
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))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.DotNet.ArcadeLogging (2)
Microsoft.DotNet.Build.Tasks.Packaging (3)
Microsoft.DotNet.Build.Tasks.Templating (1)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Microsoft.DotNet.VersionTools (3)
Microsoft.DotNet.XliffTasks (1)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
Microsoft.Extensions.AI.Ollama.Tests (1)
Microsoft.Extensions.AI.OpenAI.Tests (1)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.FileExtensions (2)
Microsoft.Extensions.Configuration.Xml (1)
Microsoft.Extensions.Http.Polly (2)
Microsoft.Extensions.Http.Resilience.Tests (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Maui.Controls (1)
Microsoft.Maui.Controls.Compatibility (3)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.Maui.Essentials (1)
Microsoft.Maui.Resizetizer (1)
Microsoft.ML.AutoML (1)
Microsoft.ML.SearchSpace (2)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
MSBuild (8)
MSBuildTaskHost (6)
PresentationCore (4)
PresentationFramework (4)
ReachFramework (9)
Shared.Tests (1)
System.ComponentModel.Composition (7)
System.Composition.Hosting (3)
System.Composition.Runtime (2)
System.Composition.TypedParts (2)
System.Diagnostics.DiagnosticSource (7)
System.Private.CoreLib (4)
System.Private.Windows.Core (1)
System.Resources.Extensions (1)
System.ServiceModel.NetFramingBase (1)
System.Windows.Forms (1)
System.Xaml (4)
WebPubSubWeb (1)
xunit.assert (1)
xunit.console (3)