4 overrides of GetValue
System.Text.Json (4)
System\Text\Json\Nodes\JsonValueOfJsonPrimitive.cs (3)
56public override T GetValue<T>() 140public override T GetValue<T>() 187public override T GetValue<T>()
System\Text\Json\Nodes\JsonValueOfT.cs (1)
23public override T GetValue<T>()
379 references to GetValue
aspire (11)
Agents\DeprecatedMcpCommandScanner.cs (5)
137args[0]?.GetValue<string>() == "mcp" && 138args[1]?.GetValue<string>() == "start") 169command[0]?.GetValue<string>() == "aspire" && 170command[1]?.GetValue<string>() == "mcp" && 171command[2]?.GetValue<string>() == "start")
Npm\SigstoreNpmProvenanceChecker.cs (1)
157predicateType = predicateTypeValue.GetValue<string>();
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (5)
122args[0]?.GetValue<string>() == "mcp" && 123args[1]?.GetValue<string>() == "start") 154command[0]?.GetValue<string>() == "aspire" && 155command[1]?.GetValue<string>() == "mcp" && 156command[2]?.GetValue<string>() == "start")
Aspire.Cli.Tests (40)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (6)
71Assert.Equal("local", aspireServer["type"]?.GetValue<string>()); 72Assert.Equal("aspire", aspireServer["command"]?.GetValue<string>()); 77Assert.Equal("agent", args[0]?.GetValue<string>()); 78Assert.Equal("mcp", args[1]?.GetValue<string>()); 84Assert.Equal("${DOTNET_ROOT}", env["DOTNET_ROOT"]?.GetValue<string>()); 90Assert.Equal("*", tools[0]?.GetValue<string>());
Agents\VsCodeAgentEnvironmentScannerTests.cs (6)
157Assert.Equal("stdio", aspireServer["type"]?.GetValue<string>()); 158Assert.Equal("aspire", aspireServer["command"]?.GetValue<string>()); 163Assert.Equal("agent", args[0]?.GetValue<string>()); 164Assert.Equal("mcp", args[1]?.GetValue<string>()); 250Assert.Equal("stdio", aspireServer["type"]?.GetValue<string>()); 251Assert.Equal("aspire", aspireServer["command"]?.GetValue<string>());
Mcp\ListStructuredLogsToolTests.cs (12)
199Assert.Equal("api-service-instance-1", firstLog["resource_name"]?.GetValue<string>()); 200Assert.Equal(42, firstLog["log_id"]?.GetValue<long>()); 209Assert.Equal("http://localhost:18888/structuredlogs?logEntryId=42", firstDashboardLink["url"]?.GetValue<string>()); 210Assert.Equal("log_id: 42", firstDashboardLink["text"]?.GetValue<string>()); 215Assert.Equal("api-service-instance-2", secondLog["resource_name"]?.GetValue<string>()); 216Assert.Equal(43, secondLog["log_id"]?.GetValue<long>()); 223Assert.Equal("http://localhost:18888/structuredlogs?logEntryId=43", secondDashboardLink["url"]?.GetValue<string>()); 224Assert.Equal("log_id: 43", secondDashboardLink["text"]?.GetValue<string>()); 229Assert.Equal("worker-service", thirdLog["resource_name"]?.GetValue<string>()); 230Assert.Equal(44, thirdLog["log_id"]?.GetValue<long>()); 234Assert.Equal("http://localhost:18888/structuredlogs?logEntryId=44", thirdDashboardLink["url"]?.GetValue<string>()); 235Assert.Equal("log_id: 44", thirdDashboardLink["text"]?.GetValue<string>());
Mcp\ListTracesToolTests.cs (13)
172Assert.Equal("abc123d", firstTrace["trace_id"]?.GetValue<string>()); 182Assert.Equal("http://localhost:18888/traces/detail/abc123d", firstDashboardLink["url"]?.GetValue<string>()); 183Assert.Equal("abc123d", firstDashboardLink["text"]?.GetValue<string>()); 186var serverSpan = spans.FirstOrDefault(s => s?["kind"]?.GetValue<string>() == "Server")?.AsObject(); 188Assert.Equal("api-service-instance-1", serverSpan["source"]?.GetValue<string>()); 192var clientSpan = spans.FirstOrDefault(s => s?["kind"]?.GetValue<string>() == "Client")?.AsObject(); 194Assert.Equal("api-service-instance-2", clientSpan["source"]?.GetValue<string>()); 195Assert.Equal("catalog-service", clientSpan["destination"]?.GetValue<string>()); 200Assert.Equal("xyz789a", secondTrace["trace_id"]?.GetValue<string>()); 204Assert.Equal("http://localhost:18888/traces/detail/xyz789a", secondDashboardLink["url"]?.GetValue<string>()); 205Assert.Equal("xyz789a", secondDashboardLink["text"]?.GetValue<string>()); 215Assert.Equal("Internal", internalSpan["kind"]?.GetValue<string>()); 216Assert.Equal("worker-service", internalSpan["source"]?.GetValue<string>());
Utils\DevCertsCheckTests.cs (3)
219Assert.Equal("AAAA1111BBBB2222", certNode["thumbprint"]!.GetValue<string>()); 220Assert.Equal(MinVersion, certNode["version"]!.GetValue<int>()); 221Assert.Equal("full", certNode["trustLevel"]!.GetValue<string>());
Aspire.Dashboard (10)
Model\GenAI\GenAIItemPartViewModel.cs (2)
90? toolCallResponsePart.Response.GetValue<string>() 126? serverToolCallResponsePart.ServerToolCallResponse.GetValue<string>()
Model\GenAI\GenAIMessageParsingHelper.cs (1)
147if (node?.GetValueKind() == JsonValueKind.String && node.GetValue<string>() is { } json)
Model\GenAI\GenAISchemaHelpers.cs (4)
24Description = schemaObj["description"]?.GetValue<string>() 58schema.Required.Add(item.GetValue<string>()); 101var typeValue = item.GetValue<string>(); 117var typeString = typeNode.GetValue<string>();
Model\GenAI\GenAIVisualizerDialogViewModel.cs (3)
102Type = obj["type"]?.GetValue<string>() ?? "function", 103Name = obj["name"]?.GetValue<string>(), 104Description = obj["description"]?.GetValue<string>()
Aspire.Dashboard.Tests (23)
Integration\McpConfigurationTests.cs (15)
59Assert.Equal("x_mcp_api_key", input!["id"]?.GetValue<string>()); 60Assert.Equal("promptString", input["type"]?.GetValue<string>()); 61Assert.Equal("Enter x-mcp-api-key", input["description"]?.GetValue<string>()); 62Assert.True(input["password"]?.GetValue<bool>()); 70Assert.Equal("http", dashboard!["type"]?.GetValue<string>()); 71Assert.Equal("http://localhost:23052/mcp", dashboard["url"]?.GetValue<string>()); 76var headerValue = headers!["x-mcp-api-key"]?.GetValue<string>(); 115Assert.Equal("aspire-dashboard", parsed!["name"]?.GetValue<string>()); 124Assert.Equal("x_mcp_api_key", input!["id"]?.GetValue<string>()); 125Assert.Equal("promptString", input["type"]?.GetValue<string>()); 126Assert.Equal("Enter x-mcp-api-key", input["description"]?.GetValue<string>()); 127Assert.True(input["password"]?.GetValue<bool>()); 132var headerValue = headers!["x-mcp-api-key"]?.GetValue<string>(); 170Assert.Equal("http", dashboard!["type"]?.GetValue<string>()); 171Assert.Equal("http://localhost:23052/mcp", dashboard["url"]?.GetValue<string>());
Model\GenAIMessageParsingHelperTests.cs (6)
138Assert.Equal("Seattle", toolCallPart.Arguments["location"]!.GetValue<string>()); 153Assert.Equal("Seattle", toolCallPart.Arguments["location"]!.GetValue<string>()); 168Assert.Equal(72, objectResponse.Response!["temperature"]!.GetValue<int>()); 172Assert.Equal("plain text result", stringResponse.Response!.GetValue<string>()); 246Assert.Equal("latest news", serverToolCallPart.ServerToolCall["query"]!.GetValue<string>()); 261Assert.Equal("web_search", serverToolCallResponsePart.ServerToolCallResponse["type"]!.GetValue<string>());
Model\GenAIVisualizerDialogViewModelTests.cs (2)
1178Assert.Equal("celsius", unitProp.Enum[0]!.GetValue<string>()); 1179Assert.Equal("fahrenheit", unitProp.Enum[1]!.GetValue<string>());
Aspire.Hosting (4)
Dashboard\DashboardEventHandlers.cs (3)
164frameworkObj["name"]?.GetValue<string>() is { } name && 165frameworkObj["version"]?.GetValue<string>() is { } version) 257frameworkObj["name"]?.GetValue<string>() is { } name)
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
157value = jsonValue.GetValue<string>();
Aspire.Hosting.Azure.Tests (3)
BicepUtilitiesTests.cs (2)
63Assert.Equal(20, parameters["age"]?["value"]?.GetValue<int>()); 364Assert.Null(scope["resourceGroup"]?.AsValue().GetValue<object>());
JsonExtensionsTests.cs (1)
23Assert.Equal("TestValue", retrievedNode["TestProperty"]!.GetValue<string>());
Aspire.Hosting.Redis.Tests (30)
AddRedisTests.cs (26)
154Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 155var connectionString = manifest["connectionString"]!.GetValue<string>(); 160Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 161Assert.Equal("/bin/sh", manifest["entrypoint"]!.GetValue<string>()); 162Assert.Equal("{redis-password.value}", manifest["env"]!["REDIS_PASSWORD"]!.GetValue<string>()); 163Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 164Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 179Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 180var connectionString = manifest["connectionString"]!.GetValue<string>(); 185Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 186Assert.Equal("/bin/sh", manifest["entrypoint"]!.GetValue<string>()); 187Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 188Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 208Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 209var connectionString = manifest["connectionString"]!.GetValue<string>(); 214Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 215Assert.Equal("{pass.value}", manifest["env"]!["REDIS_PASSWORD"]!.GetValue<string>()); 216Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 217Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 234Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 235var connectionString = manifest["connectionString"]!.GetValue<string>(); 240Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 241Assert.Equal("{pass.value}", manifest["env"]!["REDIS_PASSWORD"]!.GetValue<string>()); 242Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 243Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 930Assert.Equal("value.v0", creEntry["type"]!.GetValue<string>());
RedisFunctionalTests.cs (4)
577Assert.False(agreements["analytics"]!.GetValue<bool>()); 578Assert.False(agreements["notifications"]!.GetValue<bool>()); 579Assert.False(agreements["encryption"]!.GetValue<bool>()); 580Assert.True(agreements["eula"]!.GetValue<bool>());
Aspire.Hosting.RemoteHost (11)
Ats\AtsMarshaller.cs (7)
499return value.GetValue<string>(); 504return value.GetValue<bool>(); 509return value.GetValue<int>(); 514return value.GetValue<long>(); 519return value.GetValue<double>(); 524return (float)value.GetValue<double>(); 529return value.GetValue<decimal>();
Ats\CapabilityDispatcher.cs (3)
609return value.GetValue<string>() ?? 620return value.GetValue<string>(); 632return value.GetValue<int>();
Ats\HandleRegistry.cs (1)
200var handleId = handleNode?.GetValue<string>();
Aspire.Hosting.RemoteHost.Tests (97)
AtsMarshallerTests.cs (27)
104Assert.Equal("hello", result.GetValue<string>()); 115Assert.Equal(42, result.GetValue<int>()); 126Assert.True(result.GetValue<bool>()); 137Assert.Equal("ValueB", result.GetValue<string>()); 148Assert.Equal(1500.0, result.GetValue<double>()); 163Assert.Equal(1, jsonArray[0]!.GetValue<int>()); 164Assert.Equal(2, jsonArray[1]!.GetValue<int>()); 165Assert.Equal(3, jsonArray[2]!.GetValue<int>()); 178var tokenId = tokenValue.GetValue<string>(); 199var tokenId = tokenValue.GetValue<string>(); 369Assert.Equal("2024-06-15", result.GetValue<string>()); 392Assert.Contains("14:30:45", result.GetValue<string>()); 413Assert.Equal(9223372036854775807L, result.GetValue<long>()); 424Assert.Equal(3.14159, result.GetValue<double>()); 453var typeId = jsonObj["$type"]!.GetValue<string>(); 472var typeId = jsonObj["$type"]!.GetValue<string>(); 619Assert.Equal("test", jsonObj["name"]?.GetValue<string>()); 620Assert.Equal(10, jsonObj["count"]?.GetValue<int>()); 700Assert.Equal("root", obj["name"]!.GetValue<string>()); 716Assert.Equal("parent", obj["label"]!.GetValue<string>()); 718Assert.Equal("child", childObj["label"]!.GetValue<string>()); 736Assert.Equal("typed", obj["name"]!.GetValue<string>()); 752Assert.Equal("parent", obj["label"]!.GetValue<string>()); 754Assert.Equal("child", childObj["label"]!.GetValue<string>()); 1006var handleId = json["$handle"]!.GetValue<string>(); 1024var handleId = json!["$handle"]!.GetValue<string>(); 1043var handleId = json!["$handle"]!.GetValue<string>();
CallbackProxyTests.cs (8)
128Assert.Equal("hello-world", args["p0"]?.GetValue<string>()); 145Assert.Equal("test-name", args["p0"]?.GetValue<string>()); 146Assert.Equal(42, args["p1"]?.GetValue<int>()); 176Assert.Equal("test", args["p0"]?.GetValue<string>()); 177var tokenId = args["p1"]?.GetValue<string>(); 180Assert.Equal(tokenId, args["$cancellationToken"]?.GetValue<string>()); 197var tokenId = args["p0"]?.GetValue<string>(); 199Assert.Equal(tokenId, args["$cancellationToken"]?.GetValue<string>());
CapabilityDispatcherTests.cs (60)
69receivedName = args?["name"]?.GetValue<string>(); 87Assert.Equal(42, result.GetValue<int>()); 173Assert.Equal("HELLO", result.GetValue<string>()); 185Assert.Equal("test:default", result.GetValue<string>()); 197Assert.Equal("test:custom", result.GetValue<string>()); 239Assert.Equal("test-name", nameResult.GetValue<string>()); 241Assert.Equal(100, countResult.GetValue<int>()); 300Assert.True(result.GetValue<bool>()); 360var nestedHandleId = handleRef["$handle"]!.GetValue<string>(); 361var nestedTypeId = handleRef["$type"]!.GetValue<string>(); 371Assert.Equal("Publish", operationResult.GetValue<string>()); 546Assert.Equal(12, result.GetValue<int>()); 566Assert.Equal("TEST", result.GetValue<string>()); 586Assert.Equal("VALUE-TASK", result.GetValue<string>()); 598Assert.Equal("VALUE-TASK", result.GetValue<string>()); 645Assert.Equal("PROCESSED: test-input", result.GetValue<string>()); 689Assert.Equal("hello from C#", callbackArgs["p0"]?.GetValue<string>()); 709Assert.Equal(42, result.GetValue<int>()); 721Assert.Equal(callerThreadId, result.GetValue<int>()); 733Assert.NotEqual(callerThreadId, result.GetValue<int>()); 745Assert.Equal(callerThreadId, result.GetValue<int>()); 813Assert.Equal("HELLO", result.GetValue<string>()); 842Assert.Equal(15, result.GetValue<int>()); 857Assert.Equal("item0", resultArray[0]?.GetValue<string>()); 858Assert.Equal("item1", resultArray[1]?.GetValue<string>()); 859Assert.Equal("item2", resultArray[2]?.GetValue<string>()); 874Assert.Equal(60, result.GetValue<int>()); 887Assert.Equal("hello", result.GetValue<string>()); 899Assert.Equal("42", result.GetValue<string>()); 926var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 939Assert.Equal("second", result.GetValue<string>()); 950var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 962Assert.True(removeResult.GetValue<bool>()); 972Assert.Equal(2, lengthResult.GetValue<int>()); 983var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 994Assert.Equal(3, result.GetValue<int>()); 1005var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 1023Assert.Equal(0, lengthResult.GetValue<int>()); 1050var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1063Assert.Equal("value1", result.GetValue<string>()); 1074var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1086Assert.True(removeResult.GetValue<bool>()); 1096Assert.Equal(1, countResult.GetValue<int>()); 1107var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1119Assert.True(hasResult.GetValue<bool>()); 1130Assert.False(hasResult2.GetValue<bool>()); 1141var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1155Assert.Contains("key1", keysArray.Select(k => k?.GetValue<string>())); 1156Assert.Contains("key2", keysArray.Select(k => k?.GetValue<string>())); 1167var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1178Assert.Equal(2, result.GetValue<int>()); 1195Assert.Equal("Received: ValueB", result.GetValue<string>()); 1212Assert.Equal("Received: ValueC", result.GetValue<string>()); 1229Assert.Equal("ValueA", result.GetValue<string>()); 1246Assert.Equal("Received: ValueB", result.GetValue<string>()); 1258Assert.Equal("No value", result.GetValue<string>()); 1329Assert.Equal("blue", result.GetValue<string>()); 1370Assert.Equal("hello, test-resource!", result.GetValue<string>()); 1387Assert.Equal("yellow", result.GetValue<string>()); 1404Assert.Equal("my-resource", result.GetValue<string>());
HandleRegistryTests.cs (2)
176Assert.Equal("aspire/TestObject", json["$type"]!.GetValue<string>()); 178var handleId = json["$handle"]!.GetValue<string>();
Aspire.Hosting.Tests (18)
Orchestrator\ParameterProcessorTests.cs (3)
1268Assert.Equal("Server=localhost;Database=mydb", valueNode?.GetValue<string>()); 1309Assert.Equal("myvalue", valueNode?.GetValue<string>()); 1353Assert.Equal("customvalue", valueNode?.GetValue<string>());
Publishing\DeploymentStateManagerTests.cs (15)
49Assert.Equal("value1", section2.Data["key1"]?.GetValue<string>()); 102Assert.Equal("value1", parametersCheck.Data["param1"]?.GetValue<string>()); 103Assert.Equal("azure-value1", azureCheck.Data["resource1"]?.GetValue<string>()); 131Assert.Equal($"value{i}", section.Data[$"key{i}"]?.GetValue<string>()); 150Assert.Equal("value1", section2.Data["key1"]?.GetValue<string>()); 171Assert.Equal("value1", section2.Data["key1"]?.GetValue<string>()); 184Assert.Equal("value1", section3.Data["key1"]?.GetValue<string>()); 185Assert.Equal("value2", section3.Data["key2"]?.GetValue<string>()); 235Assert.Equal("value1", retrievedSection.Data["key1"]?.GetValue<string>()); 252Assert.Equal("nestedValue", verifySection.Data["nestedKey"]?.GetValue<string>()); 272Assert.Equal("value1", verify1.Data["key1"]?.GetValue<string>()); 273Assert.Equal("value2", verify2.Data["key2"]?.GetValue<string>()); 289Assert.Equal("value1", verify.Data[""]?.GetValue<string>()); 349Assert.Equal("topValue", verifyTop.Data["topKey"]?.GetValue<string>()); 350Assert.Equal("nestedValue", verifyNested.Data["nestedKey"]?.GetValue<string>());
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
450if (propertyNodeType?.GetValueKind() == JsonValueKind.String && propertyNodeType.GetValue<string>() == "boolean")
dotnet (1)
Commands\New\MSBuildEvaluation\ProjectCapabilityConstraint.cs (1)
88string? configuredCapability = token.GetValue<string>();
dotnet-user-jwts (1)
Helpers\SigningKeysHandler.cs (1)
85var toRemove = signingKeys.SingleOrDefault(key => key["Issuer"].GetValue<string>() == issuer);
Microsoft.Extensions.AI.Abstractions (8)
Utilities\AIJsonUtilities.Schema.Create.cs (7)
286string refUri = paramName!.GetValue<string>(); 337string typeValue = typeKeyWord.GetValue<string>()!; 358string typeValue = typeKeyWord.GetValue<string>()!; 573if (entry?.GetValue<string>() == propertyName) 715schemaType = typeNode.GetValue<string>(); 727string entryValue = entry.GetValue<string>(); 780entry.GetValue<string>() is string type)
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
180string? description = schemaObj.TryGetPropertyValue(DescriptionPropertyName, out JsonNode? descriptionSchema) ? descriptionSchema?.GetValue<string>() : null;
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\FunctionCallContentTests.cs (1)
111Assert.Equal(informationalOnly, informationalOnlyValue!.GetValue<bool>());
Microsoft.Extensions.AI.OpenAI (1)
OpenAIClientExtensions.cs (1)
90$"{descriptionNode.GetValue<string>()}{Environment.NewLine}{additionalDescription}" :
Microsoft.ML.AutoML (9)
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (2)
18var schema = jValue["schema"].GetValue<string>(); 19var estimators = jValue["estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (2)
19var estimatorType = jsonObject["estimatorType"].GetValue<EstimatorType>(); 20var parameter = jsonObject["parameter"].GetValue<Parameter>();
SweepableEstimator\Converter\SweepableEstimatorPipelineConverter.cs (2)
18var parameter = jNode["parameter"].GetValue<Parameter>(); 19var estimators = jNode["estimators"].GetValue<SweepableEstimator[]>();
SweepableEstimator\Converter\SweepablePipelineConverter.cs (3)
18var currentSchema = jValue["currentSchema"].GetValue<string>(); 19var schema = jValue["schema"].GetValue<string>(); 20var estimators = jValue["estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
Microsoft.ML.AutoML.SourceGenerator (20)
SearchSpaceGenerator.cs (20)
39var className = Utils.ToTitleCase(jNode["name"].GetValue<string>()); 43var optionName = Utils.ToTitleCase(t["name"].GetValue<string>()); 44string optionTypeName = t["type"].GetValue<string>() switch 69(_, "string") => $"\"{defaultToken.GetValue<string>()}\"", 70(_, "int") => $"{defaultToken.GetValue<int>().ToString(CultureInfo.InvariantCulture)}", 71(_, "double") => $"{defaultToken.GetValue<double>().ToString(CultureInfo.InvariantCulture)}", 72(_, "float") => $"{defaultToken.GetValue<float>().ToString(CultureInfo.InvariantCulture)}F", 73(_, "bool") => defaultToken.GetValue<bool>() ? "true" : "false", 74(_, "Anchor") => defaultToken.GetValue<string>(), 75(_, "ResizingKind") => defaultToken.GetValue<string>(), 76(_, "ColorBits") => defaultToken.GetValue<string>(), 77(_, "ColorsOrder") => defaultToken.GetValue<string>(), 78(_, "BertArchitecture") => defaultToken.GetValue<string>(), 79(_, "Microsoft.ML.Vision.ImageClassificationTrainer.Architecture") => defaultToken.GetValue<string>(), 80(_, "Microsoft.ML.Data.DataKind") => defaultToken.GetValue<string>(), 81(_, "Microsoft.ML.IDataView") => defaultToken.GetValue<string>(), 82(_, "Microsoft.ML.Transforms.Text.TextNormalizingEstimator.CaseMode") => defaultToken.GetValue<string>(), 97var minValue = searchSpaceNode["min"].GetValue<double>(); 98var maxValue = searchSpaceNode["max"].GetValue<double>(); 99var logBase = searchSpaceObject.ContainsKey("log_base") is false ? "false" : searchSpaceNode["log_base"].GetValue<bool>() ? "true" : "false";
Microsoft.NET.Build.Containers (5)
ImageConfig.cs (5)
67internal string[]? GetEntrypoint() => _config["config"]?["Entrypoint"]?.AsArray()?.Select(node => node!.GetValue<string>())?.ToArray(); 68private string[]? GetCmd() => _config["config"]?["Entrypoint"]?.AsArray()?.Select(node => node!.GetValue<string>())?.ToArray(); 277string[] val = entry.GetValue<string>().Split('=', 2); 325if (rootfs["type"]?.GetValue<string>() == "layers" && rootfs["diff_ids"] is JsonArray layers) 327return layers.Select(l => l!.GetValue<string>()).ToList();
Microsoft.TemplateEngine.Cli (13)
Alias\AliasRegistry.cs (2)
203result[property.Key] = new List<string>() { property.Value.GetValue<string>() }; 212values.Add(item.GetValue<string>());
HostSpecificTemplateData.cs (3)
33.Select(v => v!.GetValue<string>())); 59JsonValueKind.String => symbolProperty.Value.GetValue<string>(), 80else if (kind == JsonValueKind.String && bool.TryParse(isHiddenNode.GetValue<string>(), out bool hidden))
JExtensions.cs (5)
30return val.GetValue<string>(); 47return element.GetValue<string>(); 91return bool.TryParse(token.GetValue<string>(), out result); 210values.Add(item.GetValue<string>()); 262return int.TryParse(token.GetValue<string>(), out result);
PostActionProcessors\ChmodPostActionProcessor.cs (1)
30values[i] = valueArray[i]?.GetValue<string>() ?? "";
PostActionProcessors\PostActionProcessorBase.cs (2)
134paths = config.GetValue<string>().Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 145.Select(token => token!.GetValue<string>()).ToList();
Microsoft.TemplateEngine.Edge (19)
BuiltInManagedProvider\GlobalSettings.cs (1)
91package![nameof(TemplatePackageData.LastChangeTime)]?.GetValue<DateTime>() ?? default,
Constraints\ConstraintsExtensions.cs (2)
24return new[] { token.GetValue<string>() ?? throw new ConfigurationException(string.Format(LocalizableStrings.Constraint_Error_ArgumentHasEmptyString, args)) }; 36string? strValue = value.GetValue<string>();
Settings\SettingsStore.cs (3)
29ComponentGuidToAssemblyQualifiedName[entry.Key] = entry.Value.GetValue<string>(); 43ProbingPaths.Add(path.GetValue<string>()); 64if (Guid.TryParse(value.GetValue<string>(), out Guid id))
Settings\TemplateCache.cs (2)
90? localeToken!.GetValue<string>() 101mountPointInfo.Add(entry.Key, entry.Value.GetValue<DateTime>());
Settings\TemplateInfoReader.cs (3)
38classifications.Add(item.GetValue<string>()); 99tags.Add(item.Key, item.Value?.GetValue<string>() ?? string.Empty); 111if (item != null && Guid.TryParse(item.GetValue<string>(), out Guid id))
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
Microsoft.TemplateEngine.Utils (8)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
Microsoft.TemplateSearch.Common (8)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
sdk-tasks (1)
UpdateRuntimeConfig.cs (1)
58var name = framework["name"]!.GetValue<string>();
System.Text.Json (36)
System\Text\Json\Nodes\JsonArray.cs (2)
137/// Returns an enumerable that wraps calls to <see cref="JsonNode.GetValue{T}"/>. 145yield return item is null ? (T)(object?)null! : item.GetValue<T>();
System\Text\Json\Nodes\JsonNode.Operators.cs (33)
255public static explicit operator bool(JsonNode value) => value.GetValue<bool>(); 262public static explicit operator bool?(JsonNode? value) => value?.GetValue<bool>(); 269public static explicit operator byte(JsonNode value) => value.GetValue<byte>(); 276public static explicit operator byte?(JsonNode? value) => value?.GetValue<byte>(); 283public static explicit operator char(JsonNode value) => value.GetValue<char>(); 290public static explicit operator char?(JsonNode? value) => value?.GetValue<char>(); 297public static explicit operator DateTime(JsonNode value) => value.GetValue<DateTime>(); 304public static explicit operator DateTime?(JsonNode? value) => value?.GetValue<DateTime>(); 311public static explicit operator DateTimeOffset(JsonNode value) => value.GetValue<DateTimeOffset>(); 318public static explicit operator DateTimeOffset?(JsonNode? value) => value?.GetValue<DateTimeOffset>(); 325public static explicit operator decimal(JsonNode value) => value.GetValue<decimal>(); 332public static explicit operator decimal?(JsonNode? value) => value?.GetValue<decimal>(); 339public static explicit operator double(JsonNode value) => value.GetValue<double>(); 346public static explicit operator double?(JsonNode? value) => value?.GetValue<double>(); 353public static explicit operator Guid(JsonNode value) => value.GetValue<Guid>(); 360public static explicit operator Guid?(JsonNode? value) => value?.GetValue<Guid>(); 367public static explicit operator short(JsonNode value) => value.GetValue<short>(); 374public static explicit operator short?(JsonNode? value) => value?.GetValue<short>(); 381public static explicit operator int(JsonNode value) => value.GetValue<int>(); 388public static explicit operator int?(JsonNode? value) => value?.GetValue<int>(); 395public static explicit operator long(JsonNode value) => value.GetValue<long>(); 402public static explicit operator long?(JsonNode? value) => value?.GetValue<long>(); 410public static explicit operator sbyte(JsonNode value) => value.GetValue<sbyte>(); 418public static explicit operator sbyte?(JsonNode? value) => value?.GetValue<sbyte>(); 425public static explicit operator float(JsonNode value) => value.GetValue<float>(); 432public static explicit operator float?(JsonNode? value) => value?.GetValue<float>(); 439public static explicit operator string?(JsonNode? value) => value?.GetValue<string>(); 447public static explicit operator ushort(JsonNode value) => value.GetValue<ushort>(); 455public static explicit operator ushort?(JsonNode? value) => value?.GetValue<ushort>(); 463public static explicit operator uint(JsonNode value) => value.GetValue<uint>(); 471public static explicit operator uint?(JsonNode? value) => value?.GetValue<uint>(); 479public static explicit operator ulong(JsonNode value) => value.GetValue<ulong>(); 487public static explicit operator ulong?(JsonNode? value) => value?.GetValue<ulong>();
System\Text\Json\Nodes\JsonValue.cs (1)
32/// <seealso cref="JsonNode.GetValue{T}"></seealso>