4 overrides of TryGetValue
System.Text.Json (4)
System\Text\Json\Nodes\JsonValueOfJsonPrimitive.cs (3)
66public override bool TryGetValue<T>([NotNullWhen(true)] out T? value) 150public override bool TryGetValue<T>([NotNullWhen(true)] out T? value) 197public override bool TryGetValue<T>([NotNullWhen(true)] out T? value)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
38public override bool TryGetValue<T>([NotNullWhen(true)] out T value)
105 references to TryGetValue
AnalyzeCiFailure (5)
AnalysisPublicationQueries.cs (1)
44response["locked"] is JsonValue locked && locked.TryGetValue<bool>(out _)))
AnalysisRerunner.cs (1)
106run["run_attempt"] is not JsonValue attempt || !attempt.TryGetValue<int>(out var currentAttempt) || currentAttempt <= 0)
CiFailureJson.cs (2)
139return node is JsonValue value && value.TryGetValue<string>(out var text) ? text : null; 160public static bool IsFalse(JsonNode? node) => node is JsonValue value && value.TryGetValue<bool>(out var boolean) && !boolean;
TestResultArtifacts.cs (1)
68artifact["expired"] is JsonValue expired && expired.TryGetValue<bool>(out var isExpired) ? isExpired : null,
aspire (24)
Agents\AspireSkills\AspireSkillsRemoteConfiguration.cs (1)
299=> node is JsonValue value && value.TryGetValue<string>(out var text) ? text : null;
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (3)
267&& commandValue.TryGetValue<string>(out var command) 274var values = args.Select(arg => arg is JsonValue value && value.TryGetValue<string>(out var text) ? text : null).ToArray(); 275var executable = hook["command"] is JsonValue executableValue && executableValue.TryGetValue<string>(out var executableText)
Agents\McpConfigFileHelper.cs (1)
150return argument is JsonValue value && value.TryGetValue<string>(out var text) && text == expected;
Agents\OpenCode\OpenCodeAgentClient.cs (2)
94type.TryGetValue<string>(out var connectionType) && 140server["enabled"] is JsonValue enabled && enabled.TryGetValue<bool>(out _));
Backchannel\ResourceSnapshotMapper.cs (1)
217if (node is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var stringValue))
Commands\AgentInitCommand.cs (1)
1207enabled.TryGetValue<bool>(out var isEnabled) && isEnabled;
Commands\TerminalResourceResolver.cs (1)
94value.TryGetValue<string>(out var indexText) &&
Mcp\Tools\ListResourcesTool.cs (2)
505explicitSourceValue.TryGetValue<string>(out var explicitSource) && 541jsonValue.TryGetValue<string>(out var stringValue) &&
Mcp\Tools\McpToolHelpers.cs (2)
376if (jsonValue.TryGetValue<bool>(out var boolValue)) 381if (jsonValue.TryGetValue<string>(out var stringValue) && bool.TryParse(stringValue, out var parsedBool))
Projects\NativeProviderDescriptor.cs (2)
21descriptor["protocolVersion"] is not JsonValue version || !version.TryGetValue<int>(out var number) || number != 2 || 40if (value is not JsonValue text || !text.TryGetValue<string>(out var result) || string.IsNullOrWhiteSpace(result))
Projects\TypeScriptAppHostToolchainResolver.cs (1)
365!packageManagerValue.TryGetValue<string>(out var packageManager) ||
Scaffolding\PackageJsonMerger.cs (4)
155if (value is not JsonValue scriptValue || !scriptValue.TryGetValue<string>(out var command)) 232if (versionNode is not JsonValue desiredValue || !desiredValue.TryGetValue<string>(out var desiredVersion)) 253&& existingValue.TryGetValue<string>(out var existingVersion) 276&& existingValue.TryGetValue<string>(out var existingVersion)
Scaffolding\ScaffoldingService.cs (1)
433existingScriptValue.TryGetValue<string>(out var existingScript) &&
src\Shared\Telemetry\InternalMicrosoftDetector.cs (2)
1880jsonValue.TryGetValue(out value); 1906jsonValue.TryGetValue<string>(out var text)
Aspire.Dashboard (2)
src\Shared\Telemetry\InternalMicrosoftDetector.cs (2)
1880jsonValue.TryGetValue(out value); 1906jsonValue.TryGetValue<string>(out var text)
Aspire.Hosting (8)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (3)
1458JsonValue jsonValue when jsonValue.TryGetValue<string>(out var stringValue) => stringValue, 1459JsonValue jsonValue when jsonValue.TryGetValue<bool>(out var boolValue) => boolValue.ToString(CultureInfo.InvariantCulture), 1460JsonValue jsonValue when jsonValue.TryGetValue<IFormattable>(out var formattableValue) => formattableValue.ToString(null, CultureInfo.InvariantCulture),
Dcp\JsonPatch.cs (2)
34!operationValue.TryGetValue<string>(out var operationName) || 35!pathValue.TryGetValue<string>(out var path))
Dcp\PersistentPortAllocationStore.cs (2)
63!versionValue.TryGetValue<int>(out var version)) 109value.TryGetValue(out port) &&
Publishing\ContainerImageArchiveRewriter.cs (1)
547value.TryGetValue<string>(out var result) &&
Aspire.Hosting.CodeGeneration.Go (1)
AtsGoCodeGenerator.cs (1)
1285value is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var text)
Aspire.Hosting.CodeGeneration.Go.Tests (2)
GoApiExportTests.cs (2)
314Assert.True(member["optional"] is JsonValue value && value.TryGetValue<bool>(out _)); 390JsonValue value when value.TryGetValue<string>(out var text) => [text],
Aspire.Hosting.CodeGeneration.Python (1)
AtsPythonCodeGenerator.cs (1)
1057JsonValue jsonValue when jsonValue.TryGetValue<bool>(out var boolValue) => boolValue ? "True" : "False",
Aspire.Hosting.CodeGeneration.TypeScript (1)
TypeScriptLanguageSupport.cs (1)
221return node is JsonValue value && value.TryGetValue<string>(out var stringValue) ? stringValue : null;
Aspire.Hosting.Native.Server (9)
Rpc\NativeProviderLifecycle.cs (1)
148if (result is not JsonValue success || !success.TryGetValue<bool>(out var released) || !released)
Rpc\NativeProviderMetadata.cs (3)
36!version.TryGetValue<int>(out var number) || number != 2 || 71if (type["category"] is not JsonValue category || !category.TryGetValue<string>(out var categoryName) || categoryName != "Callback" || 108if (metadata[name] is JsonValue value && value.TryGetValue<bool>(out var flag))
Rpc\RpcArguments.cs (5)
23if (value is JsonValue scalar && scalar.TryGetValue<string>(out var text)) 31public static bool Boolean(JsonNode? value) => value is JsonValue scalar && scalar.TryGetValue<bool>(out var result) 40if (value is JsonValue scalar && scalar.TryGetValue<string>(out var text)) 52public static int Int32(JsonNode? value) => value is JsonValue scalar && scalar.TryGetValue<int>(out var result) 55public static long Int64(JsonNode? value) => value is JsonValue scalar && scalar.TryGetValue<long>(out var result)
Aspire.Hosting.Radius (1)
Publishing\RadiusDeploymentPipelineStep.cs (1)
76!versionValue.TryGetValue<string>(out var rawVersion))
Aspire.Hosting.RemoteHost (36)
Ats\AtsMarshaller.cs (27)
569if (node is JsonValue callbackValue && callbackValue.TryGetValue<string>(out var callbackId)) 585if (node is JsonValue tokenValue && tokenValue.TryGetValue<string>(out var tokenId) && !string.IsNullOrEmpty(tokenId)) 724JsonValue v when v.TryGetValue<string>(out _) => "string", 725JsonValue v when v.TryGetValue<bool>(out _) => "bool", 726JsonValue v when v.TryGetValue<long>(out _) => "number", 727JsonValue v when v.TryGetValue<double>(out _) => "number", 755if (value.TryGetValue<int>(out var intValue)) 761if (value.TryGetValue<decimal>(out var decimalValue)) 766if (value.TryGetValue<long>(out var longValue)) 771if (value.TryGetValue<ulong>(out var ulongValue)) 776if (value.TryGetValue<double>(out var doubleValue) && double.IsFinite(doubleValue)) 793if (value.TryGetValue<int>(out var intValue)) 798if (value.TryGetValue<long>(out var longValue)) 803if (value.TryGetValue<ulong>(out var ulongValue)) 808if (value.TryGetValue<decimal>(out var decimalValue)) 813if (value.TryGetValue<double>(out var doubleValue) && double.IsFinite(doubleValue)) 846if (value.TryGetValue<string>(out var s)) 850if (value.TryGetValue<bool>(out var b)) 854if (value.TryGetValue<long>(out var l)) 858if (value.TryGetValue<double>(out var d)) 868if (value.TryGetValue<string>(out var enumName)) 873if (value.TryGetValue<int>(out var enumValue)) 936return value.TryGetValue<float>(out var floatValue) ? floatValue : (float)value.GetValue<double>(); 947if (value.TryGetValue<double>(out var ms)) 951if (value.TryGetValue<string>(out var str)) 961if (value.TryGetValue<string>(out var str)) 970if (value.TryGetValue<string>(out var str))
Ats\CapabilityDispatcher.cs (5)
971value.TryGetValue<string>(out _); 979JsonValue v when v.TryGetValue<string>(out _) => "string", 980JsonValue v when v.TryGetValue<bool>(out _) => "bool", 981JsonValue v when v.TryGetValue<long>(out _) => "number", 982JsonValue v when v.TryGetValue<double>(out _) => "number",
Ats\ExternalCapabilityRegistry.cs (1)
651if (args[parameter.Name] is JsonValue value && value.TryGetValue<string>(out var callbackId) && !string.IsNullOrEmpty(callbackId))
Ats\ReferenceExpressionRef.cs (3)
90matchValueJsonValue.TryGetValue<string>(out var mv)) 107!formatValue.TryGetValue<string>(out var format)) 230else if (providerNode is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var stringValue))
Microsoft.AspNetCore.OpenApi (3)
Extensions\JsonNodeSchemaExtensions.cs (2)
623return jsonNode is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var identifier) 632if (node is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var identifier))
Services\Schemas\OpenApiSchemaService.cs (1)
593refValue.TryGetValue<string>(out var refString) &&
Microsoft.TemplateEngine.Cli (3)
JExtensions.cs (1)
253if (token is JsonValue jv && jv.TryGetValue(out int intVal))
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (2)
229existingPrimitive.TryGetValue<string>(out string? existingString) && 230newPrimitive.TryGetValue<string>(out string? newString) &&
Microsoft.TemplateEngine.Edge (1)
parent\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
parent\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateEngine.Utils (1)
parent\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateSearch.Common (1)
parent\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
NativeIntegrations.DockerCompose (2)
ComposeModels.cs (1)
353JsonValue value when value.TryGetValue<string>(out var text) => JsonValue.Create(Literal(text)),
DockerComposeGenerator.cs (1)
440if (configuration[property] is not JsonValue value || !value.TryGetValue<bool>(out _))
System.Text.Json (3)
System\Text\Json\Nodes\JsonNode.cs (1)
191/// <seealso cref="System.Text.Json.Nodes.JsonValue.TryGetValue"></seealso>
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
32if (otherNode is JsonValue otherValue && otherValue.TryGetValue(out TValue? v))
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
504jsonValue.TryGetValue(out string? value) &&