127 writes to
Aspire.Dashboard (1)
Otlp\Model\OtlpHelpers.cs (1)
150
o
[
item.Key] = ConvertAnyValue(item.Value);
Aspire.Hosting (4)
Devcontainers\DevcontainerSettingsWriter.cs (3)
121
portAttributes
[
"label"] = label;
122
portAttributes
[
"protocol"] = protocol;
123
portAttributes
[
"onAutoForward"] = openBrowser ? "openBrowser" : "silent";
src\Shared\SecretsStore.cs (1)
56
contents
[
secret.Key] = secret.Value;
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\BicepProvisioner.cs (1)
554
scope
[
"resourceGroup"] = targetScope?.ResourceGroup switch
Aspire.Hosting.Azure.Tests (2)
AzureEventHubsExtensionsTests.cs (1)
423
document
[
"Custom"] = JsonValue.Create(42);
AzureServiceBusExtensionsTests.cs (1)
621
document
[
"Custom"] = JsonValue.Create(42);
ConfigurationSchemaGenerator (22)
ConfigSchemaEmitter.cs (22)
63
categoryNode
[
"$ref"] = "#/definitions/logLevelThreshold";
67
parent
[
"definitions"] = new JsonObject
120
currentNode
[
"type"] = "object";
126
currentNode
[
propertiesName] = propertiesNode;
241
currentNode
[
"type"] = "object";
247
currentNode
[
"properties"] = propertiesNode;
318
currentNode
[
"type"] = typeName;
320
currentNode
[
containerName] = containerNode;
445
propertyNode
[
"description"] = description;
459
propertyNode
[
"default"] = true;
463
propertyNode
[
"default"] = false;
591
propertyNode
[
"type"] = "string";
592
propertyNode
[
"pattern"] = TimeSpanRegex;
608
propertyNode
[
"enum"] = enumNode;
612
propertyNode
[
"type"] = "string";
613
propertyNode
[
"format"] = "uri";
620
propertyNode
[
"type"] = new JsonArray { "number", "string" };
624
propertyNode
[
"type"] = "string";
625
propertyNode
[
"format"] = "uuid";
630
propertyNode
[
"oneOf"] = new JsonArray
649
propertyNode
[
"type"] = GetParsableTypeName(parsable);
730
jsonObject
[
key] = value;
dotnet-user-jwts (2)
Helpers\JwtAuthenticationSchemeSettings.cs (2)
34
schemes
[
SchemeName] = settingsObject;
46
config
[
AuthenticationKey] = new JsonObject
Microsoft.AspNetCore.OpenApi (51)
Extensions\JsonNodeSchemaExtensions.cs (49)
89
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.String.ToString();
90
schema
[
OpenApiSchemaKeywords.FormatKeyword] = "byte";
105
schema
[
OpenApiSchemaKeywords.MinimumKeyword] = minDecimal;
109
schema
[
OpenApiSchemaKeywords.MaximumKeyword] = maxDecimal;
114
schema
[
OpenApiSchemaKeywords.PatternKeyword] = regularExpressionAttribute.Pattern;
120
schema
[
key] = maxLengthAttribute.Length;
126
schema
[
key] = minLengthAttribute.Length;
132
schema
[
$"min{targetKeySuffix}"] = lengthAttribute.MinimumLength;
133
schema
[
$"max{targetKeySuffix}"] = lengthAttribute.MaximumLength;
137
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.String.ToString();
138
schema
[
OpenApiSchemaKeywords.FormatKeyword] = "uri";
142
schema
[
OpenApiSchemaKeywords.MinLengthKeyword] = stringLengthAttribute.MinimumLength;
143
schema
[
OpenApiSchemaKeywords.MaxLengthKeyword] = stringLengthAttribute.MaximumLength;
163
schema
[
OpenApiSchemaKeywords.DefaultKeyword] = null;
167
schema
[
OpenApiSchemaKeywords.DefaultKeyword] = JsonSerializer.SerializeToNode(defaultValue, jsonTypeInfo);
200
schema
[
OpenApiSchemaKeywords.TypeKeyword] = (schemaTypes | JsonSchemaType.Null).ToString();
202
schema
[
OpenApiSchemaKeywords.FormatKeyword] = openApiSchema.Format;
203
schema
[
OpenApiConstants.SchemaId] = createSchemaReferenceId(context.TypeInfo);
220
schema
[
OpenApiSchemaKeywords.MinimumKeyword] = minRouteConstraint.Min;
224
schema
[
OpenApiSchemaKeywords.MaximumKeyword] = maxRouteConstraint.Max;
228
schema
[
OpenApiSchemaKeywords.MinLengthKeyword] = minLengthRouteConstraint.MinLength;
232
schema
[
OpenApiSchemaKeywords.MaxLengthKeyword] = maxLengthRouteConstraint.MaxLength;
236
schema
[
OpenApiSchemaKeywords.MinimumKeyword] = rangeRouteConstraint.Min;
237
schema
[
OpenApiSchemaKeywords.MaximumKeyword] = rangeRouteConstraint.Max;
241
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.String.ToString();
242
schema
[
OpenApiSchemaKeywords.FormatKeyword] = null;
243
schema
[
OpenApiSchemaKeywords.PatternKeyword] = regexRouteConstraint.Constraint.ToString();
247
schema
[
OpenApiSchemaKeywords.MinLengthKeyword] = lengthRouteConstraint.MinLength;
248
schema
[
OpenApiSchemaKeywords.MaxLengthKeyword] = lengthRouteConstraint.MaxLength;
252
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.Number.ToString();
253
schema
[
OpenApiSchemaKeywords.FormatKeyword] = constraint is FloatRouteConstraint ? "float" : "double";
257
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.Integer.ToString();
258
schema
[
OpenApiSchemaKeywords.FormatKeyword] = constraint is LongRouteConstraint ? "int64" : "int32";
262
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.String.ToString();
263
schema
[
OpenApiSchemaKeywords.FormatKeyword] = constraint is GuidRouteConstraint ? "uuid" : null;
267
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.Boolean.ToString();
268
schema
[
OpenApiSchemaKeywords.FormatKeyword] = null;
272
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.String.ToString();
273
schema
[
OpenApiSchemaKeywords.FormatKeyword] = null;
277
schema
[
OpenApiSchemaKeywords.TypeKeyword] = JsonSchemaType.String.ToString();
278
schema
[
OpenApiSchemaKeywords.FormatKeyword] = "date-time";
344
schema
[
OpenApiSchemaKeywords.TypeKeyword] = (schemaTypes & ~JsonSchemaType.Null).ToString();
389
mappings
[
$"{discriminator}"] = $"#/components/schemas/{createSchemaReferenceId(context.TypeInfo)}{createSchemaReferenceId(jsonDerivedType)}";
392
schema
[
OpenApiSchemaKeywords.DiscriminatorKeyword] = polymorphismOptions.TypeDiscriminatorPropertyName;
393
schema
[
OpenApiSchemaKeywords.DiscriminatorMappingKeyword] = mappings;
407
schema
[
OpenApiConstants.SchemaId] = schemaReferenceId;
413
schema
[
OpenApiConstants.SchemaId] = "Base";
447
schema
[
OpenApiSchemaKeywords.TypeKeyword] = (schemaTypes | JsonSchemaType.Null).ToString();
465
schema
[
OpenApiSchemaKeywords.TypeKeyword] = (schemaTypes | JsonSchemaType.Null).ToString();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
163
obj
[
key] = ReadJsonNode(ref reader);
Services\Schemas\OpenApiSchemaService.cs (1)
113
schema
[
OpenApiSchemaKeywords.DescriptionKeyword] = descriptionAttribute.Description;
Microsoft.Extensions.AI.Abstractions (10)
Utilities\AIJsonUtilities.Schema.cs (10)
109
schema
[
SchemaPropertyName] = SchemaKeywordUri;
114
schema
[
TitlePropertyName] = title;
119
schema
[
DescriptionPropertyName] = description;
122
schema
[
TypePropertyName] = "object"; // Method schemas always hardcode the type as "object".
123
schema
[
PropertiesPropertyName] = parameterSchemas;
127
schema
[
RequiredPropertyName] = requiredProperties;
247
objSchema
[
RefPropertyName] = (JsonNode)refUri;
273
objSchema
[
RequiredPropertyName] = requiredArray;
292
obj
[
TypePropertyName] = numericType;
403
jsonObject
[
entry.Key] = entry.Value;
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
781
jObj
[
"default"] = JsonSerializer.SerializeToNode(attr.Value);
786
jObj
[
"pattern"] = regexAttr.Pattern;
Microsoft.ML.AutoML (9)
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (2)
27
jsonObject
[
"schema"] = value.Schema.ToString();
28
jsonObject
[
"estimators"] = JsonValue.Create(value.Estimators);
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (2)
30
jObject
[
"estimatorType"] = JsonValue.Create(value.EstimatorType);
31
jObject
[
"parameter"] = JsonValue.Create(value.Parameter);
SweepableEstimator\Converter\SweepableEstimatorPipelineConverter.cs (2)
30
jNode
[
"parameter"] = JsonValue.Create(parameter);
31
jNode
[
"estimators"] = JsonValue.Create(estimators);
SweepableEstimator\Converter\SweepablePipelineConverter.cs (3)
28
jsonObject
[
"schema"] = value.Schema.ToString();
29
jsonObject
[
"currentSchema"] = value.CurrentParameter["_SCHEMA_"].AsType<string>();
30
jsonObject
[
"estimators"] = JsonValue.Create(value.Estimators);
MSBuild (18)
JsonOutputFormatter.cs (17)
40
propertiesNode
[
property] = getProperty(property);
43
_topLevelNode
[
"Properties"] = propertiesNode;
62
jsonItem
[
"Identity"] = item.GetMetadataValue("Identity");
70
jsonItem
[
metadatumName] = item.GetMetadataValue(metadatumName);
76
itemsNode
[
itemName] = itemArray;
79
_topLevelNode
[
"Items"] = itemsNode;
98
jsonItem
[
"Identity"] = item.GetMetadataValue("Identity");
101
jsonItem
[
metadatum.Name] = metadatum.EvaluatedValue;
111
jsonItem
[
metadatumName] = item.GetMetadataValue(metadatumName);
117
itemsNode
[
itemName] = itemArray;
120
_topLevelNode
[
"Items"] = itemsNode;
137
targetResults
[
"Result"] = targetResult.ResultCode.ToString();
142
jsonItem
[
"Identity"] = item.GetMetadata("Identity");
150
jsonItem
[
metadatumName] = item.GetMetadata(metadatumName);
156
targetResults
[
"Items"] = outputArray;
157
targetResultsNode
[
targetName] = targetResults;
160
_topLevelNode
[
"TargetResults"] = targetResultsNode;
XMake.cs (1)
4671
jsonNode
[
featureName] = Features.CheckFeatureAvailability(featureName).ToString();
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
781
jObj
[
"default"] = JsonSerializer.SerializeToNode(attr.Value);
786
jObj
[
"pattern"] = regexAttr.Pattern;
System.Text.Json (1)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (1)
34
jObject
[
propertyName] = jNodeValue;
TestProject.AppHost (2)
TestProgram.cs (2)
163
root
[
project.Name] = projectJson;
166
projectJson
[
"Endpoints"] = endpointsJsonArray;
119 references to
Aspire.Hosting (1)
Devcontainers\DevcontainerSettingsWriter.cs (1)
97
let l = attrs
[
"label"]?.ToString()
Aspire.Hosting.Azure (1)
Provisioning\JsonExtensions.cs (1)
12
var node = obj
[
key];
Aspire.Hosting.Azure.Tests (19)
AzureBicepProvisionerTests.cs (9)
27
Assert.Equal("david", parameters
[
"name"]?["value"]?.ToString());
63
Assert.Equal("john", parameters
[
"name"]?["value"]?.ToString());
64
Assert.Equal(20, parameters
[
"age"]?["value"]?.GetValue<int>());
65
Assert.Equal(["a", "b", "c"], parameters
[
"values"]?["value"]?.AsArray()?.Select(v => v?.ToString()) ?? []);
66
Assert.Equal("connection string", parameters
[
"conn"]?["value"]?.ToString());
67
Assert.Equal("value", parameters
[
"jsonObj"]?["value"]?["key"]?.ToString());
68
Assert.Equal("paramValue", parameters
[
"param"]?["value"]?.ToString());
69
Assert.Equal("paramValue/1", parameters
[
"expr"]?["value"]?.ToString());
70
Assert.Equal("http://localhost:1023", parameters
[
"endpoint"]?["value"]?.ToString());
AzureBicepResourceTests.cs (8)
1028
Assert.Equal("azure.bicep.v0", manifest
[
"type"]?.ToString());
1029
Assert.Equal("infrastructure1.module.bicep", manifest
[
"path"]?.ToString());
2847
Assert.Equal("{ai.value}", aiManifest
[
"connectionString"]?.ToString());
2848
Assert.Equal("parameter.v0", aiManifest
[
"type"]?.ToString());
2851
Assert.Equal("{servicebus.value}", serviceBusManifest
[
"connectionString"]?.ToString());
2852
Assert.Equal("parameter.v0", serviceBusManifest
[
"type"]?.ToString());
2855
Assert.Equal("{ai.connectionString}", serviceManifest
[
"env"]?["APPLICATIONINSIGHTS_CONNECTION_STRING"]?.ToString());
2856
Assert.Equal("{servicebus.connectionString}", serviceManifest
[
"env"]?["ConnectionStrings__servicebus"]?.ToString());
AzureEventHubsExtensionsTests.cs (1)
419
document
[
"UserConfig"]!["LoggingConfig"] = new JsonObject { ["Type"] = "Console" };
AzureServiceBusExtensionsTests.cs (1)
617
document
[
"UserConfig"]!["Logging"] = new JsonObject { ["Type"] = "Console" };
Aspire.Hosting.Redis.Tests (5)
RedisFunctionalTests.cs (5)
672
var agreements = jo
[
"agreements"];
675
Assert.False(agreements
[
"analytics"]!.GetValue<bool>());
676
Assert.False(agreements
[
"notifications"]!.GetValue<bool>());
677
Assert.False(agreements
[
"encryption"]!.GetValue<bool>());
678
Assert.True(agreements
[
"eula"]!.GetValue<bool>());
Aspire.Hosting.Tests (4)
KestrelConfigTests.cs (1)
305
Assert.Equal(expectedEnv, manifest
[
"env"]!.ToString());
Utils\ManifestUtils.cs (2)
35
var resourceNode = obj
[
resource.Name];
57
var resourceNode = obj
[
r.Name];
WithEndpointTests.cs (1)
550
Assert.Equal(expectedEnv, manifest
[
"env"]!.ToString());
ConfigurationSchemaGenerator (11)
ConfigSchemaEmitter.cs (11)
119
var backupTypeNode = currentNode
[
"type"];
123
if (currentNode
[
propertiesName] is not JsonObject propertiesNode)
132
if (propertiesNode
[
pathSegment] is not JsonObject pathSegmentNode)
147
backupCasingOfPathSegmentName = propertiesNode
[
pathSegment].GetPropertyName();
174
var existingValue = propertiesNode
[
pathSegment];
240
var backupTypeNode = currentNode
[
"type"];
244
if (currentNode
[
"properties"] is not JsonObject propertiesNode)
284
var backupPropertyNode = currentNode
[
property.ConfigurationKeyName];
315
var backupTypeNode = currentNode
[
"type"];
316
var backupContainerNode = currentNode
[
containerName];
449
var propertyNodeType = propertyNode
[
"type"];
dotnet-user-jwts (6)
Helpers\JwtAuthenticationSchemeSettings.cs (4)
28
if (config
[
AuthenticationKey] is JsonObject authentication)
30
if (authentication
[
SchemesKey] is JsonObject schemes)
70
if (config
[
AuthenticationKey] is JsonObject authentication &&
71
authentication
[
SchemesKey] is JsonObject schemes)
Helpers\SigningKeysHandler.cs (2)
82
var signingKeys = secrets
[
signkingKeysPropertyName].AsArray();
85
var toRemove = signingKeys.SingleOrDefault(key => key
[
"Issuer"].GetValue<string>() == issuer);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (28)
UserJwtsTests.cs (28)
113
Assert.Equal("dotnet-user-jwts", appSettings
[
"Authentication"]["Schemes"]["Bearer"]["ValidIssuer"].GetValue<string>());
116
Assert.Equal("new-issuer", appSettings
[
"Authentication"]["Schemes"]["Bearer"]["ValidIssuer"].GetValue<string>());
130
Assert.Equal("dotnet-user-jwts", appSettings
[
"Authentication"]["Schemes"]["Bearer"]["ValidIssuer"].GetValue<string>());
133
Assert.Equal("new-issuer", appSettings
[
"Authentication"]["Schemes"]["Bearer"]["ValidIssuer"].GetValue<string>());
304
Assert.Equal("baz", fooField
[
"Bar"].GetValue<string>());
521
var signingKey = Assert.Single(secretsJson
[
SigningKeysHandler.GetSigningKeyPropertyName(DevJwtsDefaults.Scheme)].AsArray());
522
Assert.Equal(32, signingKey
[
"Length"].GetValue<int>());
523
Assert.True(Convert.TryFromBase64String(signingKey
[
"Value"].GetValue<string>(), new byte[32], out var _));
525
Assert.Equal("baz", fooField
[
"Bar"].GetValue<string>());
549
var signingKey = Assert.Single(secretsJson
[
SigningKeysHandler.GetSigningKeyPropertyName(DevJwtsDefaults.Scheme)].AsArray());
550
Assert.Equal(32, signingKey
[
"Length"].GetValue<int>());
551
Assert.True(Convert.TryFromBase64String(signingKey
[
"Value"].GetValue<string>(), new byte[32], out var _));
553
Assert.Equal("baz", fooField
[
"Bar"].GetValue<string>());
588
var signingKey = Assert.Single(secretsJson
[
SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")].AsArray());
589
Assert.Equal(32, signingKey
[
"Length"].GetValue<int>());
590
Assert.True(Convert.TryFromBase64String(signingKey
[
"Value"].GetValue<string>(), new byte[32], out var _));
591
Assert.Equal("test-issuer", signingKey
[
"Issuer"].GetValue<string>());
610
var signingKeys = secretsJson
[
SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")].AsArray();
612
Assert.NotNull(signingKeys.SingleOrDefault(signingKey => signingKey
[
"Issuer"].GetValue<string>() == "test-issuer"));
613
Assert.NotNull(signingKeys.SingleOrDefault(signingKey => signingKey
[
"Issuer"].GetValue<string>() == "test-issuer-2"));
631
var signingKey1 = Assert.Single(secretsJson
[
SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")].AsArray());
632
Assert.Equal("test-issuer", signingKey1
[
"Issuer"].GetValue<string>());
633
Assert.Equal(32, signingKey1
[
"Length"].GetValue<int>());
634
Assert.True(Convert.TryFromBase64String(signingKey1
[
"Value"].GetValue<string>(), new byte[32], out var _));
635
var signingKey2 = Assert.Single(secretsJson
[
SigningKeysHandler.GetSigningKeyPropertyName("test-scheme-2")].AsArray());
636
Assert.Equal("test-issuer", signingKey2
[
"Issuer"].GetValue<string>());
637
Assert.Equal(32, signingKey2
[
"Length"].GetValue<int>());
638
Assert.True(Convert.TryFromBase64String(signingKey2
[
"Value"].GetValue<string>(), new byte[32], out var _));
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (2)
1390
Assert.NotNull(deserializedResponseBody
[
"$type"]);
1391
Assert.Equal(nameof(JsonTodoChild), deserializedResponseBody
[
"$type"]!.GetValue<string>());
RequestDelegateGenerator\RequestDelegateCreationTests.Responses.cs (2)
679
Assert.NotNull(node
[
"$type"]);
680
Assert.Equal(nameof(JsonTodoChild), node
[
"$type"]!.GetValue<string>());
Microsoft.AspNetCore.OpenApi (7)
Extensions\JsonNodeSchemaExtensions.cs (7)
118
var isArray = MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes && schemaTypes.HasFlag(JsonSchemaType.Array);
124
var isArray = MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes && schemaTypes.HasFlag(JsonSchemaType.Array);
130
var isArray = MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes && schemaTypes.HasFlag(JsonSchemaType.Array);
197
if (underlyingType != null && MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes &&
341
&& MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes &&
444
&& MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes
462
if (MapJsonNodeToSchemaType(schema
[
OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes &&
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
OperationTests.MinimalApis.cs (1)
156
Assert.Equal("johndoe", userExample
[
"username"].GetValue<string>());
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.cs (1)
364
if (ctx.TypeInfo.NumberHandling is not JsonNumberHandling.Strict && schema
[
"type"] is JsonArray { Count: 2 } typeArray)
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAISerializationTests.cs (2)
382
Assert.Equal("The person whose age is being requested", (string)parameterSchema
[
"description"]!);
383
Assert.Equal("string", (string)parameterSchema
[
"type"]!);
Microsoft.ML.AutoML (9)
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (2)
18
var schema = jValue
[
"schema"].GetValue<string>();
19
var estimators = jValue
[
"estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (2)
19
var estimatorType = jsonObject
[
"estimatorType"].GetValue<EstimatorType>();
20
var parameter = jsonObject
[
"parameter"].GetValue<Parameter>();
SweepableEstimator\Converter\SweepableEstimatorPipelineConverter.cs (2)
18
var parameter = jNode
[
"parameter"].GetValue<Parameter>();
19
var estimators = jNode
[
"estimators"].GetValue<SweepableEstimator[]>();
SweepableEstimator\Converter\SweepablePipelineConverter.cs (3)
18
var currentSchema = jValue
[
"currentSchema"].GetValue<string>();
19
var schema = jValue
[
"schema"].GetValue<string>();
20
var estimators = jValue
[
"estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
Microsoft.ML.AutoML.SourceGenerator (10)
SearchSpaceGenerator.cs (10)
39
var className = Utils.ToTitleCase(jNode
[
"name"].GetValue<string>());
40
var searchSpaceJArray = jNode
[
"search_space"].AsArray();
43
var optionName = Utils.ToTitleCase(t
[
"name"].GetValue<string>());
44
string optionTypeName = t
[
"type"].GetValue<string>() switch
65
var defaultToken = t.AsObject().ContainsKey("default") ? t
[
"default"] : null;
86
var searchSpaceNode = t.AsObject().ContainsKey("search_space") ? t
[
"search_space"] : null;
96
var minToken = searchSpaceNode
[
"min"];
97
var minValue = searchSpaceNode
[
"min"].GetValue<double>();
98
var maxValue = searchSpaceNode
[
"max"].GetValue<double>();
99
var logBase = searchSpaceObject.ContainsKey("log_base") is false ? "false" : searchSpaceNode
[
"log_base"].GetValue<bool>() ? "true" : "false";
MSBuild (4)
JsonOutputFormatter.cs (4)
35
ErrorUtilities.VerifyThrow(_topLevelNode
[
"Properties"] is null, "Should not add multiple lists of properties to the json format.");
53
ErrorUtilities.VerifyThrow(_topLevelNode
[
"Items"] is null, "Should not add multiple lists of items to the json format.");
89
ErrorUtilities.VerifyThrow(_topLevelNode
[
"Items"] is null, "Should not add multiple lists of items to the json format.");
130
ErrorUtilities.VerifyThrow(_topLevelNode
[
"TargetResults"] is null, "Should not add multiple lists of target results to the json format.");
Roslyn.VisualStudio.Next.UnitTests (3)
UnifiedSettings\UnifiedSettingsTests.cs (3)
134
var categories = jsonDocument!.Root
[
"categories"]!.AsObject();
236
var categories = jsonDocument!.Root
[
"categories"]!.AsObject();
261
var properties = jsonDocument!.Root
[
"properties"]!.AsObject()
ServiceBus.AppHost (1)
Program.cs (1)
36
document
[
"UserConfig"]!["Logging"] = new JsonObject { ["Type"] = "Console" };
Shared.Tests (2)
JsonSchemaExporter\JsonSchemaExporterTests.cs (2)
61
JsonValue type = Assert.IsAssignableFrom<JsonValue>(schema
[
"type"]);
77
JsonValue value = Assert.IsAssignableFrom<JsonValue>(schema
[
"type"]);