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)
92 references to TryGetValue
aspire (23)
Agents\AspireSkills\GitHubArtifactAttestationVerifier.cs (1)
177if (bundleNode is JsonValue bundleValue && bundleValue.TryGetValue<string>(out var bundleString))
Agents\Hooks\TelemetryHookConfigurator.cs (4)
317&& commandValue.TryGetValue<string>(out var command) 325var values = args.Select(arg => arg is JsonValue value && value.TryGetValue<string>(out var text) ? text : null).ToArray(); 326var executable = hook["command"] is JsonValue executableValue && executableValue.TryGetValue<string>(out var executableText) 341&& argValue.TryGetValue<string>(out var argString)
Agents\McpConfigFileHelper.cs (2)
36type.TryGetValue<string>(out var connectionType) && 170return argument is JsonValue value && value.TryGetValue<string>(out var text) && text == expected;
Backchannel\ResourceSnapshotMapper.cs (1)
216if (node is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var stringValue))
Commands\TerminalResourceResolver.cs (1)
94value.TryGetValue<string>(out var indexText) &&
Mcp\Tools\ListResourcesTool.cs (2)
503explicitSourceValue.TryGetValue<string>(out var explicitSource) && 539jsonValue.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)
416existingScriptValue.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 (6)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (3)
1456JsonValue jsonValue when jsonValue.TryGetValue<string>(out var stringValue) => stringValue, 1457JsonValue jsonValue when jsonValue.TryGetValue<bool>(out var boolValue) => boolValue.ToString(CultureInfo.InvariantCulture), 1458JsonValue 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))
Publishing\ContainerImageArchiveRewriter.cs (1)
547value.TryGetValue<string>(out var result) &&
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)
970value.TryGetValue<string>(out _); 978JsonValue v when v.TryGetValue<string>(out _) => "string", 979JsonValue v when v.TryGetValue<bool>(out _) => "bool", 980JsonValue v when v.TryGetValue<long>(out _) => "number", 981JsonValue 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 (1)
JExtensions.cs (1)
253if (token is JsonValue jv && jv.TryGetValue(out int intVal))
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) &&