99 references to GetArrayLength
aspire (3)
Acquisition\PeerInstallProbe.cs (2)
161installations.GetArrayLength() > 0) 165else if (doc.RootElement.ValueKind == JsonValueKind.Array && doc.RootElement.GetArrayLength() > 0)
Mcp\Tools\WaitForResourcesTool.cs (1)
239if (resourceNamesElement.GetArrayLength() > MaximumResourceNameCount)
aspire-managed (1)
src\Shared\NativeProviderContractReader.cs (1)
33capabilities.GetArrayLength() > 128)
Aspire.Cli.EndToEnd.Tests (1)
DoctorCommandTests.cs (1)
262if (recordingEvent.GetArrayLength() >= 3 && recordingEvent[1].GetString() == "o")
Aspire.Cli.Tests (18)
Commands\LsCommandTests.cs (3)
161Assert.Equal(0, document.RootElement.GetArrayLength()); 244Assert.Equal(2, document.RootElement.GetArrayLength()); 276Assert.Equal(0, document.RootElement.GetArrayLength());
Commands\PsCommandTests.cs (4)
221Assert.Equal(1, document.RootElement.GetArrayLength()); 259Assert.Equal(1, document.RootElement.GetArrayLength()); 305Assert.Equal(1, document.RootElement.GetArrayLength()); 491Assert.Equal(0, document.RootElement.GetArrayLength());
Mcp\ListIntegrationsToolTests.cs (3)
65Assert.Equal(0, integrations.GetArrayLength()); 93Assert.Equal(5, integrations.GetArrayLength()); 126Assert.Equal(1, integrations.GetArrayLength());
Mcp\ListResourcesToolTests.cs (5)
459Assert.Equal(expectedCount, resources.RootElement.GetArrayLength()); 699Assert.Equal(64, json.RootElement.GetArrayLength()); 711Assert.Equal(32, firstResource.GetProperty("waiting_for").GetArrayLength()); 712Assert.Equal(16, firstResource.GetProperty("urls").GetArrayLength()); 713Assert.Equal(32, firstResource.GetProperty("relationships").GetArrayLength());
Npm\AspireJsLauncherTests.cs (1)
134Assert.Equal(1, args.GetArrayLength());
Projects\FallbackProjectParserTests.cs (1)
31Assert.Equal(expected ? 1 : 0, result.RootElement.GetProperty("Items").GetProperty("PackageReference").GetArrayLength());
Projects\PrebuiltAppHostServerTests.cs (1)
4566Assert.Equal(2, probeManifest.RootElement.GetProperty("managedAssemblies").GetArrayLength());
Aspire.Dashboard.Tests (10)
Terminal\TerminalWebSocketTests.cs (10)
242var graphics = await ReadUntilAsync(browser, frame => frame.GetProperty("placements").GetArrayLength() > 0, timeout.Token); 248var restored = await ReadUntilAsync(reconnected, frame => frame.GetProperty("placements").GetArrayLength() > 0, timeout.Token); 305static bool HasPlacement(JsonElement frame) => frame.GetProperty("placements").GetArrayLength() == 1; 331var initial = await ReadUntilAsync(first, frame => frame.GetProperty("placements").GetArrayLength() == 1, timeout.Token); 343var original = await ReadUntilAsync(first, frame => frame.GetProperty("placements").GetArrayLength() == 1 && 345var restored = await ReadUntilAsync(late, frame => frame.GetProperty("placements").GetArrayLength() == 1, timeout.Token); 368var initial = await ReadUntilAsync(first, frame => frame.GetProperty("placements").GetArrayLength() == 1, timeout.Token); 390frame.GetProperty("placements").GetArrayLength() == 1 && 407var initial = await ReadUntilAsync(browser, frame => frame.GetProperty("hyperlinks").GetArrayLength() > 0, timeout.Token); 417var restored = await ReadUntilAsync(reconnected, frame => frame.GetProperty("hyperlinks").GetArrayLength() > 0, timeout.Token);
Aspire.Deployment.EndToEnd.Tests (7)
AzureEntraIdStarterDeploymentTests.cs (7)
102resource => resource.GetProperty("identifierUris").GetArrayLength() == 1 103&& resource.GetProperty("api").GetProperty("oauth2PermissionScopes").GetArrayLength() == 1, 113Assert.Equal(0, apiApplication.GetProperty("api").GetProperty("preAuthorizedApplications").GetArrayLength()); 116Assert.Equal(0, apiApplication.GetProperty("web").GetProperty("redirectUris").GetArrayLength()); 120resource => resource.GetProperty("web").GetProperty("redirectUris").GetArrayLength() == 2 121&& resource.GetProperty("requiredResourceAccess").GetArrayLength() == 1, 126Assert.Equal(0, webApplication.GetProperty("identifierUris").GetArrayLength());
Aspire.Hosting.Foundry (1)
FoundryLocalService.cs (1)
588webUrls.GetArrayLength() > 0 &&
Aspire.Hosting.Kubernetes (2)
KubernetesEnvironmentResource.cs (2)
1843for (var i = 0; i < listeners.GetArrayLength(); i++) 2031for (var i = 0; i < managedFields.GetArrayLength(); i++)
Aspire.Hosting.Native.CodeGeneration (1)
src\Shared\NativeProviderContractReader.cs (1)
33capabilities.GetArrayLength() > 128)
Aspire.Hosting.Native.Core.Tests (4)
NativeProviderClientTests.cs (4)
32.GetProperty("capabilities").GetArrayLength()); 43.GetProperty("capabilities").GetArrayLength()); 73Assert.Equal(0, capabilities.GetProperty("capabilities").GetArrayLength()); 164Assert.Equal(3, discovery.GetProperty("capabilities").GetArrayLength());
Aspire.Hosting.Native.Server (9)
Api\PipelineApi.cs (2)
107if (!root.TryGetProperty("steps", out var array) || array.ValueKind != JsonValueKind.Array || array.GetArrayLength() > 1024) 449if (value.ValueKind != JsonValueKind.Array || value.GetArrayLength() > 1024)
Auxiliary\NativeAuxiliaryBackchannel.cs (1)
405arguments.ValueKind == JsonValueKind.Array && arguments.GetArrayLength() == 0))
Auxiliary\NativeAuxiliaryProtocol.cs (3)
36if (parameters.ValueKind == JsonValueKind.Array && parameters.GetArrayLength() <= 1) 38value = parameters.GetArrayLength() == 1 ? parameters[0] : null; 74if (request.Params.Value.ValueKind != JsonValueKind.Array || request.Params.Value.GetArrayLength() > maximum)
Cli\NativeCliProtocol.cs (2)
78if (request.Params is not { ValueKind: JsonValueKind.Array } arguments || arguments.GetArrayLength() != 1 || 91(parameters.ValueKind != JsonValueKind.Array || parameters.GetArrayLength() != 0))
Rpc\NativeBackchannelProtocol.cs (1)
44arguments.GetArrayLength() != 1 || arguments[0].ValueKind != JsonValueKind.Number ||
Aspire.Hosting.Radius (1)
Secrets\SealedSecretManifest.cs (1)
516JsonValueKind.Array => element.GetArrayLength() > 0,
Aspire.Hosting.Tests (1)
ManifestGenerationTests.cs (1)
160Assert.Equal(addExecutableArgs.Length + withArgsArgs.Length, args.GetArrayLength());
Aspire.TestTools (4)
GitHubActionsApi.cs (4)
31if (jobsArray.GetArrayLength() == 0) 46if (jobsArray.GetArrayLength() < 100) 66if (artifactsArray.GetArrayLength() == 0) 78if (artifactsArray.GetArrayLength() < 100)
dotnet-aot (1)
parent\dotnet\Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
947if (value.GetArrayLength() == 0)
Infrastructure.Tests (2)
TemplateManifest\TemplateManifestNuGetTests.cs (1)
39.GetProperty("downloadDependencies").GetArrayLength());
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (1)
2295Assert.Equal(2, selected.RootElement.GetArrayLength());
Microsoft.AspNetCore.Components.Endpoints (1)
Serialization\JsonStoredDataSerializer.cs (1)
95var array = new object?[valueElement.GetArrayLength()];
Microsoft.AspNetCore.Components.Web (4)
WebEventData\ChangeEventArgsReader.cs (1)
52var result = new string?[jsonElement.GetArrayLength()];
WebEventData\DragEventArgsReader.cs (2)
59var items = new DataTransferItem[value.GetArrayLength()]; 104var values = new string[value.GetArrayLength()];
WebEventData\TouchEventArgsReader.cs (1)
81var touchPoints = new TouchPoint[jsonElement.GetArrayLength()];
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Infrastructure\DefaultTempDataSerializer.cs (1)
82int arrayLength = arrayElement.GetArrayLength();
Microsoft.DotNet.Cli.InternalMicrosoft (1)
Providers\MacPlatformSsoDetectionProvider.cs (1)
89kerberosStatuses.GetArrayLength() == 0)
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIConversionTests.cs (1)
1617Assert.Equal(3, nestedObj.GetProperty("innerArray").GetArrayLength());
Microsoft.ML.Tokenizers (4)
Model\SentencePieceTokenizer.cs (4)
627List<(string Piece, float Score)> vocab = new List<(string Piece, float Score)>(vocabElement.GetArrayLength()); 630if (entry.ValueKind != JsonValueKind.Array || entry.GetArrayLength() < 2) 926ids.GetArrayLength() > 0) 969if (postProcessor.TryGetProperty(property, out JsonElement el) && el.ValueKind == JsonValueKind.Array && el.GetArrayLength() >= 2 &&
Microsoft.ML.Tokenizers.Tests (1)
UnigramTests.cs (1)
38if (token.ValueKind == JsonValueKind.Array && token.GetArrayLength() == 2)
Microsoft.NET.Build.Containers (4)
LocalDaemons\ContainerRuntimes.cs (2)
83errorProperty.ValueKind == JsonValueKind.Array && errorProperty.GetArrayLength() == 0) 225if (item.ValueKind != JsonValueKind.Array || item.GetArrayLength() != 2)
LocalDaemons\DockerCli.cs (2)
162else if (errorProperty.ValueKind == JsonValueKind.Array && errorProperty.GetArrayLength() == 0) 640if (item.ValueKind != JsonValueKind.Array || item.GetArrayLength() != 2) continue;
Microsoft.TestPlatform.CommunicationUtilities (10)
Serialization\AttachmentConverters.cs (1)
29if (element.TryGetProperty("Attachments", out var attachments) && attachments.GetArrayLength() > 0)
Serialization\TestCaseConverter.cs (1)
28if (!data.TryGetProperty("Properties", out var properties) || properties.GetArrayLength() == 0)
Serialization\TestCaseConverterV2.cs (1)
45if (data.TryGetProperty("Properties", out var properties) && properties.GetArrayLength() > 0)
Serialization\TestObjectBaseConverter.cs (1)
63if (!data.TryGetProperty("Properties", out var properties) || properties.GetArrayLength() == 0)
Serialization\TestResultConverter.cs (3)
31if (data.TryGetProperty("Attachments", out var attachments) && attachments.GetArrayLength() > 0) 43if (data.TryGetProperty("Messages", out var messages) && messages.GetArrayLength() > 0) 54if (!data.TryGetProperty("Properties", out var properties) || properties.GetArrayLength() == 0)
Serialization\TestResultConverterV2.cs (3)
34if (data.TryGetProperty("Attachments", out var attachments) && attachments.GetArrayLength() > 0) 46if (data.TryGetProperty("Messages", out var messages) && messages.GetArrayLength() > 0) 76if (data.TryGetProperty("Properties", out var properties) && properties.GetArrayLength() > 0)
rzc (2)
Json\JsonDataReader.cs (2)
157var length = _currentValue.GetArrayLength(); 175var length = _currentValue.GetArrayLength();
System.Text.Json (4)
System\Text\Json\Document\JsonElement.cs (3)
58/// <paramref name="index"/> is not in the range [0, <see cref="GetArrayLength"/>()). 1298if (element1.GetArrayLength() != element2.GetArrayLength())
System\Text\Json\Nodes\JsonArray.cs (1)
298list = new List<JsonNode?>(jElement.GetArrayLength());