8523 references to Length
Aspire.Dashboard (2)
Model\ResourceOutgoingPeerResolver.cs (1)
31if (snapshot.Length > 0)
Model\ResourceViewModel.cs (1)
89return healthReports.Length == 0
Aspire.Hosting (5)
ApplicationModel\CustomResourceSnapshot.cs (1)
121return healthReports.Length == 0
ApplicationModel\ResourceNotificationService.cs (3)
406builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 422builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 446for (var i = 0; i < commands.Length; i++)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
13for (var i = 0; i < properties.Length; i++)
Aspire.Hosting.Analyzers (2)
Infrastructure\WellKnownTypes.cs (2)
88if (types.Length == 0) 93if (types.Length == 1)
Aspire.Hosting.Azure (1)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
13for (var i = 0; i < properties.Length; i++)
Aspire.Hosting.Tests (1)
Codespaces\CodespacesUrlRewriterTests.cs (1)
87var match = re.Snapshot.Urls.Length > 0 && re.Snapshot.Urls[0].Url.Contains("app.github.dev");
BuildActionTelemetryTable (2)
Program.cs (1)
438Console.WriteLine($"Generating Kusto datatable of {codeActionAndProviderTypes.Length} CodeAction and provider hashes ...");
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
BuildValidator (1)
Program.cs (1)
281logger.LogError($"\t{diff.AssemblyInfo.FilePath} had {diff.Diagnostics.Length} diagnostics.");
ConfigurationSchemaGenerator (16)
ConfigSchemaEmitter.cs (1)
422attribute.ConstructorArguments.Length == 1 &&
ConfigSchemaGenerator.cs (2)
65if (args.Length != 3) 88if (args.Length != 1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (6)
615if (candidate.Parameters.Length is 0) 652initializationStrategy = ctor.Parameters.Length is 0 ? ObjectInstantiationStrategy.ParameterlessConstructor : ObjectInstantiationStrategy.ParameterizedConstructor; 852type.InstanceConstructors.SingleOrDefault(ctor => ctor.DeclaredAccessibility is Accessibility.Public && ctor.Parameters.Length is 0) is not null; 860member is IMethodSymbol { Parameters.Length: 1 } method && 876member is IMethodSymbol { Parameters.Length: 2 } method && 956if (throwIfNullMethod is IMethodSymbol throwIfNullMethodSymbol && throwIfNullMethodSymbol.IsStatic && throwIfNullMethodSymbol.Parameters.Length == 2)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (3)
43int paramCount = @params.Length; 138int paramCount = @params.Length; 193int paramCount = @params.Length;
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (3)
21@params.Length < 2 || 47int paramCount = @params.Length; 75int paramCount = @params.Length;
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (1)
20int paramCount = @params.Length;
IdeBenchmarks (2)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
104for (var j = 0; j < _tags.Length; j++)
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
63Console.WriteLine($"Total {items.Length} items are generated.");
illink (5)
ILLink.RoslynAnalyzer (32)
COMAnalyzer.cs (1)
63 marshalAsAttribute.ConstructorArguments.Length >= 1 && marshalAsAttribute.ConstructorArguments[0] is TypedConstant typedConstant &&
DataFlow\DynamicallyAccessedMembersBinder.cs (1)
45 foreach (var c in typeDefinition.GetConstructorsOnType (filter: m => (m.DeclaredAccessibility == Accessibility.Public) && m.Parameters.Length == 0))
DataFlow\LocalDataFlowVisitor.cs (3)
324 if (arrayElementRef.Indices.Length != 1) 664 if (operation.Indices.Length != 1) 758 if (attributeData.ConstructorArguments.Length != 1)
DynamicallyAccessedMembersAnalyzer.cs (3)
87 return locations.Value.Length > 0 ? locations.Value[0] : Location.None; 224 for (int i = 0; i < overrideMethod.TypeParameters.Length; i++) { 292 && methodSymbol.Parameters[methodSymbol.Parameters.Length - 1].GetDynamicallyAccessedMemberTypes () != DynamicallyAccessedMemberTypes.None) {
IMethodSymbolExtensions.cs (2)
61 return method.Parameters.Length; 69 return method.Parameters.Length + (method.HasImplicitThis () ? 1 : 0);
RequiresAnalyzerBase.cs (1)
95 for (int i = 0; i < typeParams.Length; i++) {
RequiresAssemblyFilesAnalyzer.cs (3)
130 protected override bool VerifyAttributeArguments (AttributeData attribute) => attribute.ConstructorArguments.Length == 0 || 131 attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..]; 136 if (requiresAttribute.ConstructorArguments.Length >= 1) {
RequiresDynamicCodeAnalyzer.cs (1)
143 attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
RequiresUnreferencedCodeUtils.cs (1)
37 => attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (2)
1300 if (size == null || size != genericParameters.Length) { 1360 var builder = ImmutableArray.CreateBuilder<GenericParameterValue> (genericParameters.Length);
TrimAnalysis\DiagnosticContext.cs (1)
66 if (symbol.DeclaringSyntaxReferences.Length == 0
TrimAnalysis\FlowAnnotations.cs (1)
161 && parameter.Ordinal == parameterMethod.Parameters.Length - 1) {
TrimAnalysis\GenericArgumentDataFlow.cs (1)
42 for (int i = 0; i < typeArguments.Length; i++) {
TrimAnalysis\MethodProxy.cs (3)
22 internal partial bool HasMetadataParameters () => Method.Parameters.Length > 0; 34 internal partial bool HasGenericParametersCount (int genericParameterCount) => Method.TypeParameters.Length == genericParameterCount; 41 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (Method.TypeParameters.Length);
TrimAnalysis\ReflectionAccessAnalyzer.cs (2)
76 foreach (var c in typeSymbol.GetConstructorsOnType (filter: parameterCount.HasValue ? c => c.Parameters.Length == parameterCount.Value : null, bindingFlags: bindingFlags)) 82 foreach (var c in typeSymbol.GetConstructorsOnType (filter: m => (m.DeclaredAccessibility == Accessibility.Public) && m.Parameters.Length == 0))
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (3)
56 Debug.Assert (Arguments.Length == other.Arguments.Length); 59 for (int i = 0; i < Arguments.Length; i++) {
TrimAnalysis\TrimAnalysisVisitor.cs (2)
102 if (operation.DimensionSizes.Length != 1) 106 if (operation.Initializer?.ElementValues.Length >= MaxTrackedArrayValues)
TrimAnalysis\TypeProxy.cs (1)
20 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (namedType.TypeParameters.Length);
Microsoft.Analyzers.Extra (14)
CallAnalysis\Arrays.cs (3)
86foreach (var method in freezer.GetMembers("ToFrozenDictionary").OfType<IMethodSymbol>().Where(m => m.TypeParameters.Length == 2)) 95foreach (var method in freezer.GetMembers("ToFrozenSet").OfType<IMethodSymbol>().Where(m => m.TypeParameters.Length == 1)) 123if (type.TypeArguments.Length == 2)
CallAnalysis\CallAnalyzer.Handlers.cs (4)
30if (op.Arguments.Length == target.Parameters.Length) 89if (op.Arguments.Length == op.Constructor.Parameters.Length)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
180var matchParams = invocationArgList.Count == methodSymbol.Parameters.Length;
CallAnalysis\StartsEndsWith.cs (5)
25(m.Parameters.Length == 1) || 26(m.Parameters.Length == 2 && SymbolEqualityComparer.Default.Equals(m.Parameters[1].Type, stringCompType))); 31(m.Parameters.Length == 1) || 32(m.Parameters.Length == 2 && SymbolEqualityComparer.Default.Equals(m.Parameters[1].Type, stringCompType))); 50if (op.Arguments.Length > 1 && op.Arguments[1].Value.ConstantValue.HasValue)
Utilities\CompilationExtensions.cs (1)
13return type != null && type.GetMembers("ProcessPath").Length > 0;
Microsoft.Analyzers.Local (5)
CallAnalysis\CallAnalyzer.Handlers.cs (4)
30if (op.Arguments.Length == target.Parameters.Length) 89if (op.Arguments.Length == op.Constructor.Parameters.Length)
CallAnalysis\ToInvariantString.cs (1)
32if (method.Parameters.Length == 1 && SymbolEqualityComparer.Default.Equals(method.Parameters[0].Type, formatProvider))
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
52if (diagnostics.Length != 0)
Microsoft.AspNetCore.Analyzers (10)
CompilationFeatureDetector.cs (1)
37for (var j = 0; j < syntaxReferences.Length; j++)
MiddlewareAnalyzer.cs (1)
35invocation.Arguments.Length >= 1 &&
OptionsFacts.cs (1)
13for (var i = 0; i < analysis.Options.Length; i++)
ServicesAnalyzer.cs (1)
30invocation.Arguments.Length >= 1 &&
StartupAnalysis.cs (2)
27for (var i = 0; i < list.Length; i++) 44for (var i = 0; i < list.Length; i++)
StartupFacts.cs (3)
31for (var i = 0; i < members.Length; i++) 72if (symbol.Parameters.Length != 1) 110for (var i = 0; i < symbol.Parameters.Length; i++)
UseAuthorizationAnalyzer.cs (1)
32var length = middlewareAnalysis.Middleware.Length;
Microsoft.AspNetCore.App.Analyzers (55)
Authorization\AddAuthorizationBuilderAnalyzer.cs (2)
46.FirstOrDefault(member => member is { Name: "AddAuthorization", Parameters.Length: 2 }); 92if (invocation is { Arguments: { Length: 2 } invocationArguments })
Http\HeaderDictionaryAddAnalyzer.cs (1)
35&& invocation.TargetMethod.Parameters.Length == 2
Http\HeaderDictionaryIndexerAnalyzer.cs (2)
29property.Parameters.Length == 1 && 34if (propertyReference.Arguments.Length == 1 &&
Infrastructure\AmbiguousRoutePatternComparer.cs (9)
21if (x.Root.Parts.Length != y.Root.Parts.Length) 26for (var i = 0; i < x.Root.Parts.Length; i++) 54if (x.Children.Length != y.Children.Length) 59for (var i = 0; i < x.Children.Length; i++) 127if (x.PolicyFragments.Length != y.PolicyFragments.Length) 132for (var i = 0; i < x.PolicyFragments.Length; i++)
Infrastructure\EmbeddedSyntax\EmbeddedSeparatedSyntaxNodeList.cs (2)
29var allLength = NodesAndTokens.Length; 39for (var i = 0; i < NodesAndTokens.Length; i++)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (1)
40=> Diagnostics.Length > 0 ? this : WithDiagnostics(ImmutableArray.Create(diagnostic));
Infrastructure\RoutePattern\RoutePatternNodes.cs (6)
28internal override int ChildCount => Parts.Length + 1; 32if (index == Parts.Length) 48internal override int ChildCount => Children.Length; 119internal override int ChildCount => ParameterParts.Length + 2; 127else if (index == ParameterParts.Length + 1) 326internal override int ChildCount => PolicyFragments.Length + 1;
Mvc\DetectAmbiguousActionRoutes.cs (4)
58for (var i = 0; i < routePattern.Root.Parts.Length; i++) 62for (var j = 0; j < segment.Children.Length; j++) 77for (var k = 0; k < parameterNode.ParameterParts.Length; k++) 123if (actionNameAttribute != null && actionNameAttribute.ConstructorArguments.Length > 0 && actionNameAttribute.ConstructorArguments[0].Value is string name)
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
61&& targetMethod.Parameters.Length > SequenceParameterOrdinal
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (6)
331if (attribute.ConstructorArguments.Length == 0) 400if (symbols.Length >= 2 && !allowUncertainCandidates) 429if (index < parameters.Length) 481if (symbols.Length >= 2 && !allowUncertainCandidates) 507if (index < parameters.Length) 534else if (info.CandidateSymbols.Length > 0)
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (2)
337if (delegateSymbol == null && delegateSymbolInfo.CandidateSymbols.Length == 1) 351else if (info.CandidateSymbols.Length > 0)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
120for (var i = 0; i < routeParameters.Length; i++)
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
50if (symbol.DeclaringSyntaxReferences.Length > 0)
RouteHandlers\DetectAmbiguousRoutes.cs (5)
197invocation.TargetMethod.Parameters.Length == 2 && 199invocation.Arguments.Length == 2 && 200otherInvocation.Arguments.Length == 2) 237for (var i = 0; i < method.Parameters.Length; i++) 273for (var i = 0; i < arguments.Length; i++)
RouteHandlers\DisallowReturningActionResultFromMapMethods.cs (1)
91if (returnType is not INamedTypeSymbol { Name: "Task" or "ValueTask", IsGenericType: true, TypeArguments: { Length: 1 } } taskLike)
RouteHandlers\RouteHandlerAnalyzer.cs (2)
202invocation.Arguments.Length == 3 && 203targetMethod.Parameters.Length == 3 &&
src\Shared\Roslyn\MvcFacts.cs (3)
128if (method.Parameters.Length != disposableDispose.Parameters.Length) 134for (var i = 0; i < method.ExplicitInterfaceImplementations.Length; i++)
src\Shared\RoslynUtils\ParsabilityHelper.cs (4)
99methodSymbol.Parameters.Length == 2 && 109methodSymbol.Parameters.Length == 3 && 138methodSymbol.Parameters.Length == 1 && 149methodSymbol.Parameters.Length == 2 &&
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
93if (types.Length == 0) 98if (types.Length == 1)
Microsoft.AspNetCore.App.Analyzers.Test (3)
RouteEmbeddedLanguage\Infrastructure\CompletionTestHelpers.cs (1)
20if (textSpans.Length > 0)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (1)
244textSpan = spans.Length == 0 ? null : spans.Single();
RouteEmbeddedLanguage\RoutePatternClassifierTests.cs (1)
29Assert.True(spans.Length == 1);
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
32.Select(static (symbol, _) => symbol is { DeclaringSyntaxReferences: { Length: 1 } declaringSyntaxReferences } ? declaringSyntaxReferences.Single() : null)
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParameterAnalyzer.cs (1)
151if (symbol.DeclaringSyntaxReferences.Length == 1 &&
Microsoft.AspNetCore.Http.RequestDelegateGenerator (13)
RequestDelegateGenerator.cs (2)
71if (endpoint.HttpMethod != "MapFallback" || endpoint.Operation.Arguments.Length != 2) 141if (endpoint.HttpMethod != "MapFallback" && endpoint.Operation.Arguments.Length != 2)
src\Shared\RoslynUtils\ParsabilityHelper.cs (4)
99methodSymbol.Parameters.Length == 2 && 109methodSymbol.Parameters.Length == 3 && 138methodSymbol.Parameters.Length == 1 && 149methodSymbol.Parameters.Length == 2 &&
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
93if (types.Length == 0) 98if (types.Length == 1)
StaticRouteHandlerModel\Endpoint.cs (3)
47if (method.Parameters.Length == 0) 53var parameters = new EndpointParameter[method.Parameters.Length]; 55for (var i = 0; i < method.Parameters.Length; i++)
StaticRouteHandlerModel\EndpointParameter.cs (1)
488if (parameters.Length == 0)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (1)
58var routeHandlerArgumentOrdinal = invocation.Arguments.Length - 1;
Microsoft.AspNetCore.Mvc.Analyzers (10)
src\Shared\Roslyn\MvcFacts.cs (3)
128if (method.Parameters.Length != disposableDispose.Parameters.Length) 134for (var i = 0; i < method.ExplicitInterfaceImplementations.Length; i++)
TagHelpersInCodeBlocksAnalyzer.cs (1)
162if (members.Length == 0)
TopLevelParameterNameAnalyzer.cs (6)
46if (method.Parameters.Length == 0) 64for (var i = 0; i < method.Parameters.Length; i++) 69var location = parameter.Locations.Length != 0 ? 159for (var i = 0; i < attribute.NamedArguments.Length; i++) 182for (var i = 0; i < attribute.NamedArguments.Length; i++) 196for (var i = 0; i < constructorParameters.Length; i++)
Microsoft.AspNetCore.Mvc.Api.Analyzers (21)
ActualApiResponseMetadataFactory.cs (4)
106for (var i = 0; i < switchExpression.Arms.Length; i++) 249attribute.ConstructorArguments.Length == 1 && 266for (var i = 0; i < property.ExplicitInterfaceImplementations.Length; i++) 281var length = attributes.Length;
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
215return statement is IBlockOperation block && block.Operations.Length == 1 ?
ApiActionsDoNotRequireExplicitModelValidationCodeFixProvider.cs (1)
27if (context.Diagnostics.Length != 1)
src\Shared\Roslyn\MvcFacts.cs (3)
128if (method.Parameters.Length != disposableDispose.Parameters.Length) 134for (var i = 0; i < method.ExplicitInterfaceImplementations.Length; i++)
SymbolApiConventionMatcher.cs (6)
32for (var i = 0; i < conventionMethodParameters.Length; i++) 40if (methodParameters.Length <= i) 57return methodParameters.Length == conventionMethodParameters.Length; 65attribute.ConstructorArguments.Length != 1 || 87attribute.ConstructorArguments.Length != 1 ||
SymbolApiResponseMetadataProvider.cs (6)
54errorTypeAttribute.ConstructorArguments.Length == 1 && 93if (attribute.ConstructorArguments.Length != 2) 173if (attribute.ConstructorArguments.Length != 1 || 189for (var i = 0; i < attribute.NamedArguments.Length; i++) 208for (var i = 0; i < constructorParameters.Length; i++) 214if (attribute.ConstructorArguments.Length < i)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Parser.cs (2)
80if (symbol.Parameters.Length != 2) 191if (methodDeclarationSyntaxes.Length != 1)
HubServerProxyGenerator.Parser.cs (2)
89if (symbol.Parameters.Length != 1) 181if (methodDeclarationSyntaxes.Length != 1)
Microsoft.Build (8)
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (3)
33Debug.Assert(regex.GetGroupNumbers().Length - 1 == numberRangePairs.Length); 51Debug.Assert(match.Groups.Count - 1 == _numberRangePairs.Length); 52for (int i = 0; i < _numberRangePairs.Length; i++)
Definition\Project.cs (1)
2622if (includeGlobFragments.Length == 0)
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (3)
167if (metadata.Length > 0) 229EvaluatorMetadataTable metadataTable = new EvaluatorMetadataTable(_itemType, capacity: metadata.Length); 233List<KeyValuePair<ProjectMetadataElement, string>> metadataList = new(metadata.Length);
Globbing\CompositeGlob.cs (1)
93return immutableGlobs.Length switch
Microsoft.Build.BuildCheck.UnitTests (3)
EditorConfig_Tests.cs (2)
864Assert.Equal(0, config.NamedSections.Length); 877Assert.Equal(0, config.NamedSections.Length);
EditorConfigParser_Tests.cs (1)
133result.NamedSections.Length.ShouldBe(2);
Microsoft.Cci.Extensions (3)
Extensions\CSharp\CSharpCciExtensions.cs (3)
961if (value.FixedArguments.Length > 0) 967byte[] array = new byte[argumentValue.Length]; 968for (int i = 0; i < argumentValue.Length; i++)
Microsoft.CodeAnalysis (668)
Binding\UseSiteInfo.cs (1)
382(_assemblyBeingBuilt is null || dependencies.Length != 1 || dependencies[0] != _assemblyBeingBuilt))
CodeGen\ArrayMembers.cs (1)
336public ushort ParameterCount => (ushort)_parameters.Length;
CodeGen\PermissionSetAttribute.cs (1)
71Debug.Assert(namedArgs.Length == 1);
CodeGen\PrivateImplementationDetails.cs (6)
253Debug.Assert(data.Length != 1 || alignment == 1); 256((uint)data.Length, Alignment: alignment), key => 467return string.Create(hash.Length * 2, hash, (destination, hash) => toHex(hash, destination)); 532if (x.Constants.Length != y.Constants.Length) 537for (int i = 0; i < x.Constants.Length; i++)
CodeGen\SwitchIntegralJumpTableEmitter.cs (3)
103int endLabelIndex = sortedCaseLabels.Length - 1; 129this.EmitSwitchBuckets(switchBuckets, 0, switchBuckets.Length - 1); 181Debug.Assert(_sortedCaseLabels.Length > endLabelIndex);
Collections\ByteSequenceComparer.cs (3)
31if (x.IsDefault || y.IsDefault || x.Length != y.Length) 36for (var i = 0; i < x.Length; i++)
Collections\CachingDictionary.cs (1)
70return this[key].Length != 0;
Collections\ImmutableArrayExtensions.cs (71)
173switch (items.Length) 191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 192for (int i = 0; i < items.Length; i++) 212if (array.Length == 0) 242if (array.Length == 0) 269if (array.Length == 0) 289if (array.Length == 0) 309if (array.Length == 0) 332if (array.Length == 0) 356if (array.Length == 0) 380if (array.Length == 0) 405if (array.Length == 0) 426var builder = new TResult[array.Length]; 428for (var i = 0; i < array.Length; i++) 444var builder = new TResult[array.Length]; 446for (var i = 0; i < array.Length; i++) 456if (source.Length == 0) 461if (source.Length == 1) 487Debug.Assert(self.Length == other.Length); 488switch (self.Length) 506var builder = new TResult[self.Length]; 507for (int i = 0; i < self.Length; i++) 518Debug.Assert(self.Length == other.Length); 524var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 525for (int i = 0; i < self.Length; i++) 557int n = array.Length; 619int n = array.Length; 635int n = array.Length; 651int n = array.Length; 667int n = array.Length; 683int n = array.Length; 765var count1 = array1.Length; 766var count2 = array2.Length; 818if (array.Length < 2) 833var result = (builder.Count == array.Length) ? array : builder.ToImmutable(); 843if (!array.IsDefault && array.Length >= 2) 889var builder = new T[first.Length + second.Length + third.Length]; 912var builder = new T[first.Length + second.Length + third.Length + fourth.Length]; 940var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length]; 973var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length + sixth.Length]; 1026var builder = new T[self.Length + items.Count]; 1049switch (array.Length) 1085switch (array.Length) 1117for (int i = 0; i < items.Length; ++i) 1140for (var i = 0; i < items.Length; i++) 1225if (namedTypes.Length > 0) 1233Debug.Assert(members.Length > 0); 1248Debug.Assert(count < members.Length); 1279if (array1.Length != array2.Length) 1284for (int i = 0; i < array1.Length; i++) 1302for (var i = 1; i < array.Length; i++) 1375if (other.Length == 0) 1377return array.Length == 0; 1380switch (array.Length)
Collections\ImmutableMemoryStream.cs (5)
45get { return _array.Length; } 56if (value < 0 || value >= _array.Length) 71int result = Math.Min(count, _array.Length - _position); 93target = checked(offset + _array.Length); 105if (target < 0 || target >= _array.Length)
Collections\TemporaryArray`1.cs (1)
182else if (_count + items.Length <= InlineCapacity)
Collections\UnionCollection.cs (1)
52switch (collections.Length)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (3)
32Debug.Assert(regex.GetGroupNumbers().Length - 1 == numberRangePairs.Length); 49Debug.Assert(match.Groups.Count - 1 == _numberRangePairs.Length); 50for (int i = 0; i < _numberRangePairs.Length; i++)
CommandLine\AnalyzerConfigSet.cs (8)
141var allMatchers = ArrayBuilder<ImmutableArray<SectionNameMatcher?>>.GetInstance(_analyzerConfigs.Length); 147var builder = ArrayBuilder<SectionNameMatcher?>.GetInstance(config.NamedSections.Length); 154Debug.Assert(builder.Count == config.NamedSections.Length); 159Debug.Assert(allMatchers.Count == _analyzerConfigs.Length); 204for (int analyzerConfigIndex = 0; analyzerConfigIndex < _analyzerConfigs.Length; analyzerConfigIndex++) 228for (int sectionIndex = 0; sectionIndex < matchers.Length; sectionIndex++) 270analyzerConfigIndex < _analyzerConfigs.Length && sectionKeyIndex < sectionKey.Count; 275for (int matcherIndex = 0; matcherIndex < matchers.Length; matcherIndex++)
CommandLine\CommonCompiler.cs (6)
301var configs = ArrayBuilder<AnalyzerConfig>.GetInstance(analyzerConfigPaths.Length); 432var embeddedTreeMap = new Dictionary<string, SyntaxTree>(Arguments.EmbeddedFiles.Length); 921if (Arguments.AnalyzerConfigPaths.Length > 0) 1040for (i = 0; i < additionalFiles.Length; i++) 1064if (Arguments.AnalyzerConfigPaths.Length > 0) 1154var generatedSyntaxTrees = compilation.SyntaxTrees.Skip(Arguments.SourceFiles.Length).ToList();
Compilation\Compilation.cs (17)
672for (int i = 0; i < result.Length; i++) 1306int n = elementTypes.Length; 1307if (elementTypes.Length <= 1) 1350if (elementNullableAnnotations.Length != cardinality) 1365if (elementNames.Length != cardinality) 1370for (int i = 0; i < elementNames.Length; i++) 1393if (elementLocations.Length != cardinality) 1469if (memberTypes.Length != memberNames.Length) 1475if (!memberLocations.IsDefault && memberLocations.Length != memberTypes.Length) 1481if (!memberIsReadOnly.IsDefault && memberIsReadOnly.Length != memberTypes.Length) 1487if (!memberNullableAnnotations.IsDefault && memberNullableAnnotations.Length != memberTypes.Length) 1493for (int i = 0, n = memberTypes.Length; i < n; i++) 3631for (int i = 1; i < locations.Length; i++)
Compilation\DeterministicKeyBuilder.cs (1)
302for (var i = 1; i < modules.Length; i++)
Compilation\EmitResult.cs (1)
40result += ", Diagnostics.Count = " + Diagnostics.Length;
Compilation\IImportScope.cs (4)
136Debug.Assert(aliases.Length + externAliases.Length + imports.Length + xmlNamespaces.Length > 0);
Compilation\SymbolInfo.cs (1)
94internal bool IsEmpty => this.Symbol == null && this.CandidateSymbols.Length == 0;
Diagnostic\DiagnosticBag.cs (1)
128for (int i = 0; i < diagnostics.Length; i++)
Diagnostic\ProgrammaticSuppressionInfo.cs (1)
41return Suppressions.Length;
DiagnosticAnalyzer\AnalysisResultBuilder.cs (2)
48_analyzerActionCounts = new Dictionary<DiagnosticAnalyzer, AnalyzerActionCounts>(analyzers.Length); 54var map = new Dictionary<DiagnosticAnalyzer, TimeSpan>(analyzers.Length);
DiagnosticAnalyzer\AnalysisScope.cs (2)
207return compilationWithAnalyzers.Analyzers.Length == analyzers.Length;
DiagnosticAnalyzer\AnalyzerDriver.cs (8)
1065var builder = ArrayBuilder<Diagnostic>.GetInstance(reportedDiagnostics.Length); 1209for (var i = 0; i < diagnostics.Length; i++) 1802if ((int)symbol.Kind < actionsByKind.Length) 1854if (processedAnalyzers.Count < analysisScope.Analyzers.Length) 1868Debug.Assert(completedAnalyzers.Count < analysisScope.Analyzers.Length); 2058if (analysisScope.Analyzers.Length == this.Analyzers.Length) 2063else if (analysisScope.Analyzers.Length == 1)
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
237if (supportedLanguages.Length > 0) 327if (additionalLanguageNames.Length == 0)
DiagnosticAnalyzer\AnalyzerManager.cs (2)
198if (filteredSymbolStartActions.Length > 0) 210for (int i = 0; i < symbolStartActions.Length; i++)
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
982return pendingAnalyzers.Length < analysisScope.Analyzers.Length ?
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.cs (1)
30var builder = ArrayBuilder<DiagnosticDescriptor>.GetInstance(errorCodes.Length);
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (17)
742public readonly int CompilationStartActionsCount { get { return _compilationStartActions.Length; } } 743public readonly int CompilationEndActionsCount { get { return _compilationEndActions.Length; } } 744public readonly int CompilationActionsCount { get { return _compilationActions.Length; } } 745public readonly int SyntaxTreeActionsCount { get { return _syntaxTreeActions.Length; } } 746public readonly int AdditionalFileActionsCount { get { return _additionalFileActions.Length; } } 747public readonly int SemanticModelActionsCount { get { return _semanticModelActions.Length; } } 748public readonly int SymbolActionsCount { get { return _symbolActions.Length; } } 749public readonly int SymbolStartActionsCount { get { return _symbolStartActions.Length; } } 750public readonly int SymbolEndActionsCount { get { return _symbolEndActions.Length; } } 751public readonly int SyntaxNodeActionsCount { get { return _syntaxNodeActions.Length; } } 752public readonly int OperationActionsCount { get { return _operationActions.Length; } } 753public readonly int OperationBlockStartActionsCount { get { return _operationBlockStartActions.Length; } } 754public readonly int OperationBlockEndActionsCount { get { return _operationBlockEndActions.Length; } } 755public readonly int OperationBlockActionsCount { get { return _operationBlockActions.Length; } } 756public readonly int CodeBlockStartActionsCount { get { return _codeBlockStartActions.Length; } } 757public readonly int CodeBlockEndActionsCount { get { return _codeBlockEndActions.Length; } } 758public readonly int CodeBlockActionsCount { get { return _codeBlockActions.Length; } }
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
380if (attribute.CommonConstructorArguments.Length < 2)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (9)
76if (docIdResults.Length > 0) 111if (candidateMembers.Length == 0) 507var count = methodContext.TypeParameters.Length; 550for (int i = 0; i < methodContext.TypeParameters.Length; ++i) 562for (int i = 0; i < containingType.TypeParameters.Length; ++i) 584if (candidateMembers.Length == 0) 777if (symbolParameters.Length != expectedParameters.Length) 846if (index < typeParameters.Length) 861return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
DiagnosticAnalyzer\SymbolDeclaredCompilationEvent.cs (1)
53var loc = DeclaringSyntaxReferences.Length != 0 ? " @ " + string.Join(", ", System.Linq.Enumerable.Select(DeclaringSyntaxReferences, r => r.GetLocation().GetLineSpan())) : null;
DocumentationCommentId.cs (15)
266n += symbol.TypeParameters.Length; 463if (symbol.TypeParameters.Length > 0) 466_builder.Append(symbol.TypeParameters.Length); 482if (parameters.Length > 0) 486for (int i = 0, n = parameters.Length; i < n; i++) 530if (symbol.TypeParameters.Length > 0) 533_builder.Append(symbol.TypeParameters.Length); 592_builder.Append(symbol.TypeParameters.Length); 594else if (symbol.TypeArguments.Length > 0) 598for (int i = 0, n = symbol.TypeArguments.Length; i < n; i++) 988var count = methodContext.TypeParameters.Length; 1327else if (propertySymbol.Parameters.Length == 0) 1381if (symbolParameters.Length != expectedParameters.Count) 1420if (index < typeParameters.Length) 1435return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
EmbeddedText.cs (1)
56Debug.Assert(!blob.IsDefault && blob.Length >= sizeof(int));
Emit\AnonymousTypeKey.cs (1)
93for (int i = 0; i < this.Fields.Length; i++)
Emit\AsyncMoveNextBodyDebugInfo.cs (2)
42Debug.Assert(yieldOffsets.Length == resumeOffsets.Length);
Emit\CommonPEModuleBuilder.cs (1)
467for (int i = 0; i < aliases.Length; i++)
Emit\EditAndContinue\DefinitionMap.cs (5)
191for (int i = 0; i < declarators.Length; i++) 337hoistedLocalSlotCount = localSlotDebugInfo.Length; 467var builder = ArrayBuilder<DebugId>.GetInstance(lambda.Parameters.Length); 502for (int slotIndex = 0; slotIndex < hoistedLocalSlots.Length; slotIndex++) 514for (int slotIndex = 0; slotIndex < hoistedAwaiters.Length; slotIndex++)
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (1)
93public ushort ParameterCount => (ushort)_parameters.Length;
Emit\EditAndContinue\DeltaMetadataWriter.cs (4)
282if (!_methodDefs.IsAddedNotChanged(def) && def.GetBody(Context)?.SequencePoints.Length > 0) 858if (localVariables.Length > 0) 861var encoder = new BlobEncoder(writer).LocalVariableSignature(localVariables.Length); 1377for (int i = 0; i < rowCounts.Length; i++)
Emit\EditAndContinue\EmitBaseline.cs (1)
337Debug.Assert(tableEntriesAdded.Length == MetadataTokens.TableCount);
Emit\EditAndContinue\EncVariableSlotAllocator.cs (1)
84for (int slot = 0; slot < previousLocals.Length; slot++)
Emit\EditAndContinueMethodDebugInformation.cs (8)
75int end = Math.Min(data.Length, offset + maxReportedLength / 2); 84offset, (start != 0) ? "..." : "", BitConverter.ToString(left), BitConverter.ToString(right), (end != data.Length) ? "..." : "")); 104var blobReader = new BlobReader(compressedSlotMapPtr, compressedSlotMap.Length); 217var blobReader = new BlobReader(blobPtr, compressedLambdaMap.Length); 287writer.WriteCompressedInteger(Closures.Length); 320var blobReader = new BlobReader(ptr, compressedStateMachineStates.Length); 366writer.WriteCompressedInteger(StateMachineStates.Length); 367if (StateMachineStates.Length > 0)
Emit\NoPia\CommonEmbeddedMethod.cs (2)
263ushort Cci.IMethodReference.GenericParameterCount => (ushort)_typeParameters.Length; 285ushort Cci.ISignature.ParameterCount => (ushort)_parameters.Length;
Emit\NoPia\CommonEmbeddedProperty.cs (1)
139get { return (ushort)_parameters.Length; }
Emit\NoPia\EmbeddedTypesManager.cs (2)
101if (_frozen.Length > 0) 106for (int i = 1; i < _frozen.Length; i++)
Generated\Operations.Generated.cs (128)
4010Operations.Length; 40140 when index < Operations.Length 4025case 0 when previousIndex + 1 < Operations.Length: 4039if (!Operations.IsEmpty) return (true, 0, Operations.Length - 1); 4065Declarations.Length; 40690 when index < Declarations.Length 4080case 0 when previousIndex + 1 < Declarations.Length: 4094if (!Declarations.IsEmpty) return (true, 0, Declarations.Length - 1); 4127Cases.Length; 41331 when index < Cases.Length 4147case 1 when previousIndex + 1 < Cases.Length: 4161if (!Cases.IsEmpty) return (true, 1, Cases.Length - 1); 4216NextVariables.Length + 42273 when index < NextVariables.Length 4247case 3 when previousIndex + 1 < NextVariables.Length: 4261if (!NextVariables.IsEmpty) return (true, 3, NextVariables.Length - 1); 4302Before.Length + 4304AtLoopBottom.Length + 43090 when index < Before.Length 43153 when index < AtLoopBottom.Length 4326case 0 when previousIndex + 1 < Before.Length: 4337case 3 when previousIndex + 1 < AtLoopBottom.Length: 4351if (!AtLoopBottom.IsEmpty) return (true, 3, AtLoopBottom.Length - 1); 4362if (!Before.IsEmpty) return (true, 0, Before.Length - 1); 4404NextVariables.Length + 44195 when index < NextVariables.Length 4445case 5 when previousIndex + 1 < NextVariables.Length: 4459if (!NextVariables.IsEmpty) return (true, 5, NextVariables.Length - 1); 4734Catches.Length + 47411 when index < Catches.Length 4757case 1 when previousIndex + 1 < Catches.Length: 4777if (!Catches.IsEmpty) return (true, 1, Catches.Length - 1); 5020Arguments.Length; 50261 when index < Arguments.Length 5040case 1 when previousIndex + 1 < Arguments.Length: 5054if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 5171Arguments.Length; 51771 when index < Arguments.Length 5191case 1 when previousIndex + 1 < Arguments.Length: 5205if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 5238Indices.Length; 52441 when index < Indices.Length 5258case 1 when previousIndex + 1 < Indices.Length: 5272if (!Indices.IsEmpty) return (true, 1, Indices.Length - 1); 5468Arguments.Length + 54751 when index < Arguments.Length 5489case 1 when previousIndex + 1 < Arguments.Length: 5503if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 5931Arguments.Length; 59350 when index < Arguments.Length 5948case 0 when previousIndex + 1 < Arguments.Length: 5968if (!Arguments.IsEmpty) return (true, 0, Arguments.Length - 1); 6049DimensionSizes.Length + 60540 when index < DimensionSizes.Length 6067case 0 when previousIndex + 1 < DimensionSizes.Length: 6087if (!DimensionSizes.IsEmpty) return (true, 0, DimensionSizes.Length - 1); 6588Parts.Length; 65920 when index < Parts.Length 6603case 0 when previousIndex + 1 < Parts.Length: 6617if (!Parts.IsEmpty) return (true, 0, Parts.Length - 1); 6644Initializers.Length; 66480 when index < Initializers.Length 6659case 0 when previousIndex + 1 < Initializers.Length: 6673if (!Initializers.IsEmpty) return (true, 0, Initializers.Length - 1); 6700Initializers.Length; 67040 when index < Initializers.Length 6715case 0 when previousIndex + 1 < Initializers.Length: 6729if (!Initializers.IsEmpty) return (true, 0, Initializers.Length - 1); 6874Elements.Length; 68780 when index < Elements.Length 6889case 0 when previousIndex + 1 < Elements.Length: 6903if (!Elements.IsEmpty) return (true, 0, Elements.Length - 1); 7717ElementValues.Length; 77210 when index < ElementValues.Length 7732case 0 when previousIndex + 1 < ElementValues.Length: 7746if (!ElementValues.IsEmpty) return (true, 0, ElementValues.Length - 1); 7777IgnoredArguments.Length; 77810 when index < IgnoredArguments.Length 7794case 0 when previousIndex + 1 < IgnoredArguments.Length: 7814if (!IgnoredArguments.IsEmpty) return (true, 0, IgnoredArguments.Length - 1); 7844Declarators.Length + 7846IgnoredDimensions.Length; 78500 when index < IgnoredDimensions.Length 78521 when index < Declarators.Length 7865case 0 when previousIndex + 1 < IgnoredDimensions.Length: 7870case 1 when previousIndex + 1 < Declarators.Length: 7890if (!Declarators.IsEmpty) return (true, 1, Declarators.Length - 1); 7895if (!IgnoredDimensions.IsEmpty) return (true, 0, IgnoredDimensions.Length - 1); 8065Clauses.Length + 8066Body.Length; 80700 when index < Clauses.Length 80721 when index < Body.Length 8083case 0 when previousIndex + 1 < Clauses.Length: 8088case 1 when previousIndex + 1 < Body.Length: 8102if (!Body.IsEmpty) return (true, 1, Body.Length - 1); 8107if (!Clauses.IsEmpty) return (true, 0, Clauses.Length - 1); 9113Clauses.Length; 91170 when index < Clauses.Length 9128case 0 when previousIndex + 1 < Clauses.Length: 9142if (!Clauses.IsEmpty) return (true, 0, Clauses.Length - 1); 9171DimensionSizes.Length; 91771 when index < DimensionSizes.Length 9191case 1 when previousIndex + 1 < DimensionSizes.Length: 9205if (!DimensionSizes.IsEmpty) return (true, 1, DimensionSizes.Length - 1); 9242DeconstructionSubpatterns.Length + 9243PropertySubpatterns.Length; 92470 when index < DeconstructionSubpatterns.Length 92491 when index < PropertySubpatterns.Length 9260case 0 when previousIndex + 1 < DeconstructionSubpatterns.Length: 9265case 1 when previousIndex + 1 < PropertySubpatterns.Length: 9279if (!PropertySubpatterns.IsEmpty) return (true, 1, PropertySubpatterns.Length - 1); 9284if (!DeconstructionSubpatterns.IsEmpty) return (true, 0, DeconstructionSubpatterns.Length - 1); 9330Arms.Length; 93361 when index < Arms.Length 9350case 1 when previousIndex + 1 < Arms.Length: 9364if (!Arms.IsEmpty) return (true, 1, Arms.Length - 1); 10301Arguments.Length; 103071 when index < Arguments.Length 10321case 1 when previousIndex + 1 < Arguments.Length: 10335if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 10370Patterns.Length; 103740 when index < Patterns.Length 10385case 0 when previousIndex + 1 < Patterns.Length: 10399if (!Patterns.IsEmpty) return (true, 0, Patterns.Length - 1); 10681Elements.Length; 106850 when index < Elements.Length 10696case 0 when previousIndex + 1 < Elements.Length: 10710if (!Elements.IsEmpty) return (true, 0, Elements.Length - 1);
InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
InternalUtilities\OneOrMany.cs (1)
88=> HasOneItem ? 1 : _many.Length;
InternalUtilities\StringExtensions.cs (1)
27return (number < numerals.Length) ? numerals[number] : number.ToString();
MetadataReader\MetadataDecoder.cs (1)
1158var blobReader = new BlobReader(ptr, signature.Length);
MetadataReader\MetadataReaderExtensions.cs (1)
131publicKeyOrToken.Length != AssemblyIdentity.PublicKeyTokenSize)
MetadataReader\PEAssembly.cs (5)
61Debug.Assert(modules.Length > 0); 66var totalRefCount = modules.Sum(static module => module.ReferencedAssemblies.Length); 67var refCounts = ArrayBuilder<int>.GetInstance(modules.Length); 71for (int i = 0; i < modules.Length; i++) 74refCounts.Add(refsForModule.Length);
MetadataReader\PEModule.cs (1)
3850if (referencedAssemblyIndex < 0 || referencedAssemblyIndex >= this.ReferencedAssemblies.Length)
MetadataReference\AssemblyIdentity.cs (8)
136if (!publicKeyOrToken.IsDefaultOrEmpty && publicKeyOrToken.Length != PublicKeyTokenSize) 167Debug.Assert((hasPublicKey && MetadataHelpers.IsValidPublicKey(publicKeyOrToken)) || (!hasPublicKey && (publicKeyOrToken.IsDefaultOrEmpty || publicKeyOrToken.Length == PublicKeyTokenSize))); 189Debug.Assert((hasPublicKey && MetadataHelpers.IsValidPublicKey(publicKeyOrToken)) || (!hasPublicKey && (publicKeyOrToken.IsDefaultOrEmpty || publicKeyOrToken.Length == PublicKeyTokenSize))); 308get { return _publicKey.Length > 0; } 345return HasPublicKey || _lazyPublicKeyToken.Length > 0; 437Debug.Assert(hash.Length == CryptographicHashProvider.Sha1HashSize); 440int l = hash.Length - 1; 544hasPublicKey: publicKey.Length > 0,
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
109if (PublicKeyToken.Length > 0)
MetadataReference\AssemblyMetadata.cs (11)
205for (int i = 0; i < modules.Length; i++) 325Debug.Assert(_initialModules.Length == 1); 328if (additionalModuleNames.Length > 0) 330moduleBuilder = ImmutableArray.CreateBuilder<ModuleMetadata>(1 + additionalModuleNames.Length); 352for (int i = _initialModules.Length; i < moduleBuilder.Count; i++) 393Debug.Assert(_initialModules.Length == 1 || _initialModules.Length == previousData.Modules.Length); 396for (int i = _initialModules.Length; i < previousData.Modules.Length; i++) 417for (int i = 1; i < modules.Length; i++)
NativePdbWriter\PdbWriter.cs (3)
109if (localScopes.Length > 0) 154CloseMethod(methodBody.IL.Length); 469for (int i = 1; i < scopes.Length; i++)
Operations\ControlFlowBranch.cs (1)
139int stopAt = leavingRegions.Length - 1;
Operations\ControlFlowGraph.cs (5)
48Debug.Assert(root.LastBlockOrdinal == blocks.Length - 1); 51Debug.Assert(localFunctionsMap.Count == localFunctions.Length); 52Debug.Assert(localFunctions.Distinct().Length == localFunctions.Length); 256Interlocked.CompareExchange(ref _lazyLocalFunctionsGraphs, new ControlFlowGraph[LocalFunctions.Length], null);
Operations\ControlFlowGraphBuilder.cs (20)
463Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 465for (int i = startAt; i < tryAndCatch.NestedRegions.Length; i++) 1417for (int i = 0; i < statements.Length; i++) 2000int numElements = originalArray.Length; 2050for (int i = 0; i < arguments.Length; i++) 2069for (int i = 0; i < arguments.Length; i++) 2092Debug.Assert(index >= 0 && index < args.Length); 3969var resourceQueue = ArrayBuilder<(IVariableDeclarationOperation, IVariableDeclaratorOperation)>.GetInstance(declarationGroup.Declarations.Length); 5739if (initialization.Length == 1 && initialization[0].Kind == OperationKind.VariableDeclarationGroup) 6386var initializerBuilder = ArrayBuilder<IOperation>.GetInstance(operation.Initializers.Length); 6387for (int i = 0; i < operation.Initializers.Length; i++) 6519var builder = ArrayBuilder<IOperation>.GetInstance(initializer.ElementValues.Length); 6520for (int i = initializer.ElementValues.Length - 1; i >= 0; i--) 6696var numElements = tuple.Elements.Length; 6816for (int i = arguments.Length - 1; i > 1; i--) 7045var partsBuilder = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(operation.Parts.Length); 7046for (int i = operation.Parts.Length - 1; i >= 0; i--) 7247var builder = ArrayBuilder<IArgumentOperation>.GetInstance(propertySymbol.Parameters.Length); 7515bool isImplicit = operation.Clauses.Length > 1 || IsImplicit(operation); 7976var initializerBuilder = ArrayBuilder<IOperation>.GetInstance(initializers.Length);
Operations\ControlFlowRegion.cs (3)
96Debug.Assert(NestedRegions.Length == 2); 105Debug.Assert(NestedRegions.Length >= 2); 110for (int i = 1; i < NestedRegions.Length; i++)
Operations\IOperation.OperationList.Reversed.cs (2)
60var builder = ArrayBuilder<IOperation>.GetInstance(input.Length); 61for (int i = input.Length - 1; i >= 0; i--)
Operations\Operation.cs (1)
159if (operations.Length == 0)
Operations\OperationExtensions.cs (2)
240if (index < 0 || index >= dynamicOperation.Arguments.Length) 307if (index < 0 || index >= dynamicOperation.Arguments.Length)
Operations\OperationNodes.cs (20)
310 when index < Children.Length 36internal override int ChildOperationsCount => Children.Length; 45case 0 when previousIndex + 1 < Children.Length: 58int.MaxValue when !Children.IsEmpty => (true, 0, Children.Length - 1), 1020 when index < Children.Length 107internal override int ChildOperationsCount => Children.Length; 116case 0 when previousIndex + 1 < Children.Length: 129int.MaxValue when !Children.IsEmpty => (true, 0, Children.Length - 1), 262internal override int ChildOperationsCount => (Initializer is null ? 0 : 1) + Arguments.Length; 2670 when index < Arguments.Length 282case 0 when previousIndex + 1 < Arguments.Length: 307if (!Arguments.IsEmpty) return (true, 0, Arguments.Length - 1); 340internal override int ChildOperationsCount => (Operation is null ? 0 : 1) + Arguments.Length; 3471 when index < Arguments.Length 364case 1 when previousIndex + 1 < Arguments.Length: 381if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 426internal override int ChildOperationsCount => (Operation is null ? 0 : 1) + Arguments.Length; 4331 when index < Arguments.Length 450case 1 when previousIndex + 1 < Arguments.Length: 467if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1);
PEWriter\CustomDebugInfoWriter.cs (4)
214for (int k = 0; k < dynamicTransformFlags.Length; k++) 231dynamicTransformFlags.Length <= CustomDebugInfoEncoder.DynamicAttributeSize && 234(scope, local) => (local.Name, GetDynamicFlags(local), local.DynamicTransformFlags.Length, (local.SlotIndex < 0) ? 0 : local.SlotIndex)); 279usingCounts.Add(scope.GetUsedNamespaces(context).Length);
PEWriter\ExtendedPEBuilder.cs (1)
57var builder = ArrayBuilder<Section>.GetInstance(baseSections.Length + 1);
PEWriter\MetadataWriter.cs (26)
605builder = ArrayBuilder<IParameterDefinition>.GetInstance(parameters.Length + 1); 609for (int i = 0; i < parameters.Length; i++) 629builder = ArrayBuilder<IParameterDefinition>.GetInstance(parameters.Length); 1239writer.WriteCompressedInteger(permissionSet.Length); 2226if (exportedTypes.Length == 0) 2231metadata.SetCapacity(TableIndex.ExportedType, exportedTypes.Length); 2998int ilLength = methodBody.IL.Length; 3000bool isSmallBody = ilLength < 64 && methodBody.MaxStack <= 8 && localSignatureHandleOpt.IsNil && exceptionRegions.Length == 0; 3016codeSize: methodBody.IL.Length, 3018exceptionRegionCount: exceptionRegions.Length, 3046if (localVariables.Length == 0) 3053var encoder = new BlobEncoder(builder).LocalVariableSignature(localVariables.Length); 3069if (local.CustomModifiers.Length > 0) 3082if (localConstant.CustomModifiers.Length > 0) 3243while (offset < generatedIL.Length) 3393if (!ExceptionRegionEncoder.IsSmallRegionCount(exceptionRegions.Length)) 3414Debug.Assert(parameterTypeInformation.RefCustomModifiers.Length == 0 || parameterTypeInformation.IsByReference); 3425Debug.Assert(fieldReference.RefCustomModifiers.Length == 0 || fieldReference.IsByReference); 3467Debug.Assert(parameters.Length == arguments.Length); 3475for (int i = 0; i < parameters.Length; i++) 3541var literalsEncoder = vectorEncoder.Count(a.Elements.Length); 3713if (identity.PublicKeyToken.Length > 0) 3779encoder.Parameters(declaredParameters.Length + varargParameters.Length, out returnTypeEncoder, out parametersEncoder); 3805if (varargParameters.Length > 0)
PEWriter\MetadataWriter.DynamicAnalysis.cs (6)
90_blobHeapSize += GetCompressedIntegerLength(blob.Length) + blob.Length; 128if (spans.Length == 0) 134var writer = new BlobBuilder(4 + spans.Length * 4); 143for (int i = 0; i < spans.Length; i++) 315writer.WriteCompressedInteger(blob.Length);
PEWriter\MetadataWriter.PortablePdb.cs (10)
82if (bodyOpt.LocalScopes.Length == 0) 91length: bodyOpt.IL.Length); 519for (int i = 0; i < vector.Length; i++) 580Debug.Assert(asyncInfo.ResumeOffsets.Length == asyncInfo.YieldOffsets.Length); 587for (int i = 0; i < asyncInfo.ResumeOffsets.Length; i++) 632if (sequencePoints.Length == 0) 649for (int i = 0; i < sequencePoints.Length; i++) 708for (int i = 1; i < sequencePoints.Length; i++) 983if (pair.Aliases.Length > 0)
PEWriter\SigningUtilities.cs (1)
62keySize = assembly.Identity.PublicKey.Length;
ReferenceManager\AssemblyDataForAssemblyBeingBuilt.cs (7)
39var builderSize = referencedAssemblyData.Length + modules.Sum(static module => module.ReferencedAssemblies.Length); 48for (int i = 0; i < modules.Length; i++) 84var boundReferences = new AssemblyReferenceBinding[_referencedAssemblies.Length]; 86for (int i = 0; i < _referencedAssemblyData.Length; i++) 93for (int i = _referencedAssemblyData.Length; i < _referencedAssemblies.Length; i++)
ReferenceManager\CommonReferenceManager.Binding.cs (28)
111Debug.Assert(explicitReferences.Length == explicitReferenceMap.Length); 115explicitAssembliesMap.EnsureCapacity(explicitAssemblies.Length); 120for (int i = 0; i < explicitAssemblies.Length; i++) 127for (int i = 0; i < explicitAssemblies.Length; i++) 159Debug.Assert(referenceBindings.Count == allAssemblies.Length); 177var candidateInputAssemblySymbols = new TAssemblySymbol[allAssemblies.Length]; 226Debug.Assert(referenceBindings.Count == explicitAssemblies.Length); 227Debug.Assert(explicitReferences.Length == explicitReferenceMap.Length); 230int totalReferencedAssemblyCount = explicitAssemblies.Length - 1; 248int explicitAssemblyCount = explicitAssemblies.Length; 405for (int moduleIndex = 0; moduleIndex < explicitModules.Length; moduleIndex++) 408var moduleBindingsCount = explicitModules[moduleIndex].ReferencedAssemblies.Length; 420for (int referenceIndex = 0; referenceIndex < explicitReferenceMap.Length; referenceIndex++) 435Debug.Assert(result.Count == explicitModules.Length + totalReferencedAssemblyCount); 440if (modules.Length == 0) 445var result = ArrayBuilder<int>.GetInstance(modules.Length); 446result.ZeroInit(modules.Length); 448for (int i = 0; i < resolvedReferences.Length; i++) 465var result = ArrayBuilder<ResolvedReference>.GetInstance(references.Length); 466for (int i = 0; i < references.Length; i++) 592int totalAssemblies = assemblies.Length; 736int totalAssemblies = assemblies.Length; 997for (int i = 1; i < assemblies.Length; i++) 1008assembly.AssemblyReferences.Length == 0 && 1049if (assemblies.Length == 1 && assemblies[0].AssemblyReferences.Length == 0)
ReferenceManager\CommonReferenceManager.Resolution.cs (5)
225int referenceCount = references.Length; 226int referenceDirectiveCount = (referenceDirectiveLocations != null ? referenceDirectiveLocations.Length : 0); 882if (references.Length > 1) 897var boundReferences = new AssemblyReferenceBinding[references.Length]; 898for (int j = 0; j < references.Length; j++)
ReferenceManager\CommonReferenceManager.State.cs (14)
388Debug.Assert(_lazyReferencedAssemblies.Length == 0 || _lazyCorLibraryOpt != null); 427Debug.Assert(referencedModules.Length == referencedModulesReferences.Length); 428Debug.Assert(referencedModules.Length == referencedModulesMap.Count); 429Debug.Assert(referencedAssemblies.Length == aliasesOfReferencedAssemblies.Length); 472referencedAssembliesMap = new Dictionary<MetadataReference, int>(referenceMap.Length); 474var aliasesOfReferencedAssembliesBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(referenceMap.Length - referencedModuleCount); 479for (int i = 0; i < referenceMap.Length; i++) 544Debug.Assert(originalIdentities.Length == symbols.Length); 547for (int i = 0; i < originalIdentities.Length; i++) 715for (int i = 0; i < ReferencedAssemblies.Length; i++) 724return aliases.Length == 0 || aliases.IndexOf(MetadataReferenceProperties.GlobalAlias, StringComparer.Ordinal) >= 0;
ReferenceManager\MergedAliases.cs (1)
84var result = ArrayBuilder<string>.GetInstance(aliasesOpt.Length);
ReferenceManager\ModuleReferences.cs (2)
48Debug.Assert(identities.Length == symbols.Length);
SignatureComparer.cs (5)
35Debug.Assert(!result || position == signature.Length); 53if (paramCount != parameters.Length) 79Debug.Assert(position == signature.Length); 97if (paramCount != parameters.Length) 124Debug.Assert(position == signature.Length);
SourceFileResolver.cs (1)
62var pathMapBuilder = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(pathMap.Length);
SourceGeneration\GeneratedCodeUtilities.cs (1)
31if (symbol.DeclaringSyntaxReferences.Length > 1)
SourceGeneration\GeneratorDriver.cs (14)
33Debug.Assert(state.Generators.GroupBy(s => s.GetGeneratorType()).Count() == state.Generators.Length); // ensure we don't have duplicate generator types 40_state = new GeneratorDriverState(parseOptions, optionsProvider, generators, incrementalGenerators, additionalTexts, ImmutableArray.Create(new GeneratorState[generators.Length]), DriverStateTable.Empty, SyntaxStore.Empty, driverOptions, runtime: TimeSpan.Zero); 90generatorStates: _state.GeneratorStates.AddRange(new GeneratorState[generators.Length])); 97var states = ArrayBuilder<GeneratorState>.GetInstance(generators.Length); 121for (int i = 0; i < newGenerators.Length; i++) 194ArrayBuilder<GeneratedSourceResult> sources = ArrayBuilder<GeneratedSourceResult>.GetInstance(generatorState.PostInitTrees.Length + generatorState.GeneratedTrees.Length); 224var stateBuilder = ArrayBuilder<GeneratorState>.GetInstance(state.Generators.Length); 228for (int i = 0; i < state.IncrementalGenerators.Length; i++) 280else if (generatorState.PostInitTrees.Length > 0 && generatorState.RequiresPostInitReparse(state.ParseOptions)) 294if (generatorState.PostInitTrees.Length > 0) 312for (int i = 0; i < state.IncrementalGenerators.Length; i++) 315if (shouldSkipGenerator(state.Generators[i]) || generatorState.OutputNodes.Length == 0) 371var trees = ArrayBuilder<GeneratedSyntaxTree>.GetInstance(generatedSources.Length);
SourceGeneration\GeneratorDriverState.cs (4)
37Debug.Assert(Generators.Length == GeneratorStates.Length); 38Debug.Assert(IncrementalGenerators.Length == GeneratorStates.Length);
SourceGeneration\GlobalAliases.cs (5)
36if (aliasesArray.Length == 0) 39if (aliasesArray.Length == 1) 42var total = ArrayBuilder<(string aliasName, string symbolName)>.GetInstance(aliasesArray.Sum(a => a.AliasAndSymbolNames.Length)); 52if (ga1.AliasAndSymbolNames.Length == 0) 55if (ga2.AliasAndSymbolNames.Length == 0)
SourceGeneration\Nodes\BatchNode.cs (2)
70if (previousItems.Length != entryCount) 87Debug.Assert(indexInPrevious == previousItems.Length);
SourceGeneration\Nodes\InputNode.cs (3)
54itemsSet.EnsureCapacity(inputItems.Length); 80else if (inputItems.Length == previousTable.Count) 130var tableBuilder = NodeStateTable<T>.Empty.ToBuilder(_name, stepTrackingEnabled: false, tableCapacity: inputs.Length);
SourceGeneration\Nodes\NodeStateTable.cs (16)
69Debug.Assert(!hasTrackedSteps || steps.Length == states.Length); 77public int Count => _states.Length; 114while (_nextStatesIndex < _stateTable._states.Length) 136if (_nextStatesIndex < _stateTable._states.Length) 179Debug.Assert((_states.Length == 1 || _states.Length == 2 && _states[0].IsRemovedDueToInputRemoval) && _states[^1].Count == 1); 359if (previousEntry.Count == 0 && outputs.Length == 0) 375var totalBuilderItems = Math.Max(previousEntry.Count, outputs.Length); 376var builder = previousEntry.Count == outputs.Length ? null : new TableEntry.Builder(capacity: totalBuilderItems); 378var sharedCount = Math.Min(previousEntry.Count, outputs.Length); 421for (int i = sharedCount; i < outputs.Length; i++) 470var canUsePrevious = _previous._states.Length > previousTableEntryIndex; 598Debug.Assert(states.Length == 1 || states.Distinct().Length > 1); 630public EntryState GetState(int index) => _states.Length == 1 ? _states[0] : _states[index];
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
118if (attributes.Length > 0)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
109.Where(static tuple => tuple.Item2.Length > 0)
SourceGeneration\RunResults.cs (1)
91Debug.Assert(exception is null || (generatedSources.IsEmpty && diagnostics.Length == 1));
SourceGeneration\SyntaxStore.cs (1)
62var syntaxInputBuilders = ArrayBuilder<(SyntaxInputNode node, ISyntaxInputBuilder builder)>.GetInstance(_syntaxInputNodes.Length);
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (2)
54if (declaredSymbol is INamespaceSymbol namespaceSymbol && namespaceSymbol.ConstituentNamespaces.Length > 1) 60Debug.Assert(assemblyScopedNamespaceSymbol.ConstituentNamespaces.Length == 1);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
122builder.WriteInt32(s.Length); 187builder.WriteInt32(info.Names.Length);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (8)
218while (offset < bytes.Length) 422var resultBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(groupSizes.Length); 430if (pos >= importStrings.Length) 453for (; pos < importStrings.Length; pos++) 470if (pos < importStrings.Length) 521if (i + sizeof(int) > bytes.Length) 533if (i + sizeof(short) > bytes.Length) 545if (i + sizeof(byte) > bytes.Length)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
600Debug.Assert(start + length <= items.Length);
StrongName\CryptoBlobParser.cs (4)
93if (blob.IsDefault || blob.Length < s_publicKeyHeaderSize + 1) 110if (blob.Length != s_publicKeyHeaderSize + publicKeySize) 206if (blob.Length < BlobHeaderSize + RsaPubKeySize) 224if (blob.Length - s_offsetToKeyData < modulusLength)
StrongName\DesktopStrongNameProvider.cs (1)
251strongName.StrongNameSignatureGeneration(filePath, null, (IntPtr)pinned, keyPair.Length, null, pcbSignatureBlob: out _);
SymbolDisplay\SymbolDisplayExtensions.cs (2)
30if (parts.Length == 0) 35if (parts.Length == 1)
Symbols\Attributes\CommonAttributeData.cs (12)
180for (int i = namedArguments.Length - 1; i >= 0; i--) 207Debug.Assert(parameters.Length == 5); 275Debug.Assert(this.CommonConstructorArguments.Length == 1); 318if (args.Length > 0) 323Debug.Assert(args.Length <= 2); 326if (args.Length == 2) 375if (args.Length == 3 || args.Length == 4) 395Debug.Assert(this.CommonConstructorArguments.Length == 0); 410if (attribute.CommonConstructorArguments.Length == 1) 435int position = attribute.CommonConstructorArguments.Length; 491int position = attribute.CommonConstructorArguments.Length;
Symbols\Attributes\MarshalAsAttributeDecoder.cs (5)
125int position = arguments.Attribute.CommonConstructorArguments.Length; 179int position = arguments.Attribute.CommonConstructorArguments.Length; 216int position = arguments.Attribute.CommonConstructorArguments.Length; 305int position = arguments.Attribute.CommonConstructorArguments.Length; 371int position = arguments.Attribute.CommonConstructorArguments.Length;
Symbols\Attributes\SecurityWellKnownAttributeData.cs (2)
70Debug.Assert(_lazySecurityActions.Length == customAttributes.Length); 72for (int i = 0; i < customAttributes.Length; i++)
Symbols\ISymbolExtensions.cs (3)
33var typeArgs = new ITypeSymbol[reducedFrom.TypeParameters.Length]; 36for (int i = 0, n = method.TypeParameters.Length; i < n; i++) 52for (int i = 0, n = reducedFrom.TypeParameters.Length; i < n; i++)
Syntax\LineDirectiveMap.cs (3)
174Debug.Assert(Entries.Length > 1); 185for (int i = 1; i < Entries.Length; i++) 232yield return CreateLineMapping(current, unmappedEndLine, lineLength, currentIndex: Entries.Length - 1);
Text\CompositeText.cs (9)
32Debug.Assert(segments.Length > 0); 39_segmentOffsets = new int[segments.Length]; 97while (segIndex < _segments.Length && count > 0) 155while (segIndex < _segments.Length && count > 0) 438var segmentLineNumbers = new int[compositeText.Segments.Length]; 441Debug.Assert(compositeText.Segments.Length > 0); 442for (int i = 0; i < compositeText.Segments.Length; i++) 455Debug.Assert(i == compositeText.Segments.Length - 1 || segment[^1] != '\r' || compositeText.Segments[i + 1][0] != '\n'); 562for (lastSegmentIndexInclusive = binarySearchSegmentIndex; lastSegmentIndexInclusive < _compositeText.Segments.Length - 1; lastSegmentIndexInclusive++)
Text\LargeText.cs (2)
38_chunkStartOffsets = new int[chunks.Length]; 41for (int i = 0; i < chunks.Length; i++)
Text\SourceText.cs (1)
54if (!checksum.IsDefault && checksum.Length != CryptographicHashProvider.GetHashSize(checksumAlgorithm))
Text\TextChangeRangeExtensions.cs (6)
319switch (oldIndex == oldChanges.Length, newIndex == newChanges.Length) 326while (oldIndex < oldChanges.Length) 332while (newIndex < newChanges.Length) 343if (oldIndex < oldChanges.Length) 358if (newIndex < newChanges.Length)
Microsoft.CodeAnalysis.CodeStyle (243)
src\Analyzers\Core\Analyzers\ConvertTypeofToNameof\AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
79return typeofOperation.TypeOperand is INamedTypeSymbol namedType && namedType.TypeArguments.Length == 0;
src\Analyzers\Core\Analyzers\Helpers\DeserializationConstructorCheck.cs (1)
20methodSymbol.Parameters.Length == 2 &&
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (4)
120.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length)); 191.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length));
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (8)
67if (method.Locations.Length != 1 || method.DeclaringSyntaxReferences.Length != 1) 93if (statements.Length != 1) 125if (statements.Length < 3) 139if (variables.Length != 1 || 140varDeclStatement.Declarations.Length != 1) 146if (declaration.Declarators.Length != 1) 196for (var i = 1; i < statements.Length - 1; i++)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
80invocation.Arguments.Length == 1)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
165Locations.Length: 1,
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
182if (symbol is ITypeSymbol typeSymbol && typeSymbol.DeclaringSyntaxReferences.Length > 1)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
20for (var index = switchStatement.Cases.Length - 1; index >= 0; index--)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
697if (intersect.Length != idsForPragma.Length)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
70return namedAttributeArguments.Length > 0;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
776if (methodSymbol.Parameters.Length == 0) 784methodSymbol.Parameters.Length == 1 &&
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (4)
87if (invocation.Arguments.Length == 1 88|| (invocation.Arguments.Length == 2 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 1))) 105|| (invocation.Arguments.Length == 1 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 0))) 202var argCount = invocation.Arguments.Length;
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (2)
104if (method.Parameters.Length != 1) 161if (members.Length > 0)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (6)
144DeclaringSyntaxReferences.Length: 1, 350if (property.DeclaringSyntaxReferences.Length != 1) 367if (property.Parameters.Length > 0) 374if (!CanExplicitInterfaceImplementationsBeFixed && property.ExplicitInterfaceImplementations.Length != 0) 439if (attributes.Length > 0 && !@this.SupportsFieldAttributesOnProperties) 528Field.DeclaringSyntaxReferences.Length: 1,
src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
25public int Count => (TrivialField != null ? 1 : 0) + NonTrivialFields.Length;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
171collectionExpressionMatches.Value.matches.Length >= collectionInitializerMatches.Value.matches.Length
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
240if (method.Parameters.Length != 1)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
156operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.IncrementOperatorName).Length > 0) 176operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.DecrementOperatorName).Length > 0)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
103if (symbolInfo.CandidateSymbols.Length > 0 ||
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
56if (ifIndex + 1 >= parentBlock.Operations.Length)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
40m.Parameters.Length == 2);
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
98.FirstOrDefault(m => m is { DeclaredAccessibility: Accessibility.Public, Parameters.Length: 2 });
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
185ExplicitInterfaceImplementations.Length: > 0,
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (4)
42if (context.OperationBlocks.Length != 1) 52var elementCount = (accessesBase ? 1 : 0) + (hashedMembers.IsDefaultOrEmpty ? 0 : hashedMembers.Length); 66if (elementCount == 1 && statements.Length < 2) 70Debug.Assert(elementCount >= 2 || statements.Length >= 2);
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
176for (var i = ifOperationIndex + 1; i < containingBlock.Operations.Length; i++) 278if (block.Operations.Length != 1)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
133if (parameters.Length == 0) 236if (parameterWithMatchingName.IsParams && parameters.Length != arguments.Count)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (71)
173switch (items.Length) 191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 192for (int i = 0; i < items.Length; i++) 212if (array.Length == 0) 242if (array.Length == 0) 269if (array.Length == 0) 289if (array.Length == 0) 309if (array.Length == 0) 332if (array.Length == 0) 356if (array.Length == 0) 380if (array.Length == 0) 405if (array.Length == 0) 426var builder = new TResult[array.Length]; 428for (var i = 0; i < array.Length; i++) 444var builder = new TResult[array.Length]; 446for (var i = 0; i < array.Length; i++) 456if (source.Length == 0) 461if (source.Length == 1) 487Debug.Assert(self.Length == other.Length); 488switch (self.Length) 506var builder = new TResult[self.Length]; 507for (int i = 0; i < self.Length; i++) 518Debug.Assert(self.Length == other.Length); 524var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 525for (int i = 0; i < self.Length; i++) 557int n = array.Length; 619int n = array.Length; 635int n = array.Length; 651int n = array.Length; 667int n = array.Length; 683int n = array.Length; 765var count1 = array1.Length; 766var count2 = array2.Length; 818if (array.Length < 2) 833var result = (builder.Count == array.Length) ? array : builder.ToImmutable(); 843if (!array.IsDefault && array.Length >= 2) 889var builder = new T[first.Length + second.Length + third.Length]; 912var builder = new T[first.Length + second.Length + third.Length + fourth.Length]; 940var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length]; 973var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length + sixth.Length]; 1026var builder = new T[self.Length + items.Count]; 1049switch (array.Length) 1085switch (array.Length) 1117for (int i = 0; i < items.Length; ++i) 1140for (var i = 0; i < items.Length; i++) 1225if (namedTypes.Length > 0) 1233Debug.Assert(members.Length > 0); 1248Debug.Assert(count < members.Length); 1279if (array1.Length != array2.Length) 1284for (int i = 0; i < array1.Length; i++) 1302for (var i = 1; i < array.Length; i++) 1375if (other.Length == 0) 1377return array.Length == 0; 1380switch (array.Length)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
182else if (_count + items.Length <= InlineCapacity)
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (9)
76if (docIdResults.Length > 0) 111if (candidateMembers.Length == 0) 507var count = methodContext.TypeParameters.Length; 550for (int i = 0; i < methodContext.TypeParameters.Length; ++i) 562for (int i = 0; i < containingType.TypeParameters.Length; ++i) 584if (candidateMembers.Length == 0) 777if (symbolParameters.Length != expectedParameters.Length) 846if (index < typeParameters.Length) 861return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
88=> HasOneItem ? 1 : _many.Length;
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
27return (number < numerals.Length) ? numerals[number] : number.ToString();
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
31if (symbol.DeclaringSyntaxReferences.Length > 1)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (6)
319switch (oldIndex == oldChanges.Length, newIndex == newChanges.Length) 326while (oldIndex < oldChanges.Length) 332while (newIndex < newChanges.Length) 343if (oldIndex < oldChanges.Length) 358if (newIndex < newChanges.Length)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
600Debug.Assert(start + length <= items.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (2)
313Debug.Assert(match.Groups.Count - 1 == _numberRangePairs.Length); 314for (var i = 0; i < _numberRangePairs.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSeparatedSyntaxNodeList.cs (2)
30var allLength = NodesAndTokens.Length; 40for (var i = 0; i < NodesAndTokens.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs (7)
51=> Diagnostics.Length > 0 ? this : WithDiagnostics([diagnostic]); 78if (LeadingTrivia.Length == 0 && VirtualChars.Length == 0 && TrailingTrivia.Length == 0) 82Math.Min(LeadingTrivia.Length == 0 ? int.MaxValue : LeadingTrivia[0].GetSpan().Start, 84TrailingTrivia.Length == 0 ? int.MaxValue : TrailingTrivia[0].GetSpan().Start)); 87Math.Max(LeadingTrivia.Length == 0 ? int.MinValue : LeadingTrivia[^1].GetSpan().End, 89TrailingTrivia.Length == 0 ? int.MinValue : TrailingTrivia[^1].GetSpan().End));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (5)
169IEventSymbol @event => @event.ExplicitInterfaceImplementations.Length > 0, 170IMethodSymbol method => method.ExplicitInterfaceImplementations.Length > 0, 171IPropertySymbol property => property.ExplicitInterfaceImplementations.Length > 0, 355.WhereAsArray(t => t.members.Length > 0); 663Parameters.Length: 1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (3)
27DeclaringSyntaxReferences.Length: > 0, 31DeclaringSyntaxReferences.Length: > 0, 44if (member is IPropertySymbol { DeclaringSyntaxReferences.Length: > 0 } property &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (6)
107var parameterCount = symbol.GetParameters().Length; 127if (bestMethod is null || Math.Abs(method.Parameters.Length - parameterCount) < Math.Abs(bestMethod.Parameters.Length - parameterCount)) 500var count = extensionUsedAsInstance ? Math.Max(0, method.Parameters.Length - 1) : method.Parameters.Length; 734Parameters.Length: 0,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (3)
44var result = new List<INamedTypeSymbol>(allInterfaces.Length + 1) 750TypeArguments.Length: 1, 758TypeArguments.Length: 1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
16writer.WriteInt32(values.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (2)
409if (block.Operations.Length == 0) 412var firstOp = block.Operations.Length == 1
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
202if (typeArguments.Length == 1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
37var lastBlockOrdinal = blocks.Length - 1; 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
306lastBlockOrdinal: lambdaOrLocalFunctionCfg.Blocks.Length - 1, operationsBuilder, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
414Contract.ThrowIfFalse(intervals.Length == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\IFileBannerFactsExtensions.cs (1)
16return node.GetLeadingTrivia().Skip(leadingBlankLines.Length).ToImmutableArray();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
162if (nodes.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
265=> index < values.Length ? values[index] : null; 277if (parameters.Length != refKinds.Count)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
389if (originalParameterTypes.IsDefault || parameters.Length != originalParameterTypes.Count) 737if (info.CandidateSymbols.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
315WriteInteger(array.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolution.cs (1)
36internal int SymbolCount => Symbol != null ? 1 : CandidateSymbols.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolution.Enumeration.cs (1)
38while (++_index < _symbolKeyResolution.CandidateSymbols.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolutionExtensions.cs (1)
16if (resolution.CandidateSymbols.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (18)
337var candidateLength = originalSymbolInfo.CandidateSymbols.Length; 338if (candidateLength > 0 && candidateLength == newSymbolInfo.CandidateSymbols.Length) 481methodSymbol.Parameters.Length == newMethodSymbol.Parameters.Length && 786if (originalLocalVariables.Length != newLocalVariables.Length) 789for (int i = 0, n = originalLocalVariables.Length; i < n; i++) 1085Debug.Assert(signature1Parameters.Length == signature2Parameters.Length); 1086Debug.Assert(specifiedArguments.Length <= signature1Parameters.Length || 1087(signature1Parameters.Length > 0 && !signature1Parameters.Last().IsParams)); 1089if (signature1Parameters.Length != signature2Parameters.Length) 1095if (signature1Parameters.Length == 0) 1115for (var i = 0; i < specifiedArguments.Length; i++) 1145if (i < signature1Parameters.Length) 1160for (var i = 0; i < signature1Parameters.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
70if (_nodes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EventMap.cs (1)
153get { return _registries != null && _registries.Length > 0; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (3)
52Contract.ThrowIfTrue(_index + values.Length > _values.Length); 53Array.Copy(ImmutableCollectionsMarshal.AsArray(values)!, 0, _values, _index, values.Length); 54_index += values.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (2)
61var tasks = new Task[streams.Length]; 62for (var i = 0; i < streams.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
217if (collection.Length == 1 && EqualityComparer<TValue>.Default.Equals(collection[0], value))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (5)
54property1.Parameters.Length != property2.Parameters.Length || 224for (var i = 0; i < method1.TypeParameters.Length; i++) 246if (typeParameter1.ConstraintTypes.Length != typeParameter2.ConstraintTypes.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (17)
78if (x.Length != y.Length) 83for (var i = 0; i < x.Length; i++) 208x.Parameters.Length != y.Parameters.Length || 273return x.Locations.Length == 1 && y.Locations.Length == 1 && 425if (xElements.Length != yElements.Length) 431for (var i = 0; i < xElements.Length; i++) 448for (var i = 0; i < xElements.Length; i++) 469var count = xParameters.Length; 470if (yParameters.Length != count) 494var count = xTypeArguments.Length; 495if (yTypeArguments.Length != count) 601x.Parameters.Length == y.Parameters.Length &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
123Hash.Combine(x.Parameters.Length, 244Hash.Combine(x.Parameters.Length,
Microsoft.CodeAnalysis.CodeStyle.Fixes (99)
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
89var annotation = diagnostics.Length == 1 ? RenameAnnotation.Create() : null;
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (4)
83if (potentialConversionTypes.Length == 1) 87else if (potentialConversionTypes.Length > 1) 200for (var j = 0; j < parameters.Length; j++) 231if (potentialConversionTypes.Length == 1)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (2)
121if (parameters.Length == 0) 134var parameterIndex = Math.Min(i, parameters.Length - 1);
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (1)
68if (derivedType.Interfaces.Length != 0)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (7)
202foreach (var method in methodCandidates.OrderBy(m => m.Parameters.Length)) 236=> method.IsParams() ? method.Parameters.Length - 1 : method.Parameters.Length; 248var fixes = codeFixData.Length <= 2 257var builder = new FixedSizeArrayBuilder<CodeAction>(codeFixData.Length); 334var builder = new FixedSizeArrayBuilder<CodeFixData>(methodsAndArgumentsToAdd.Length); 460if (i >= method.Parameters.Length)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
47if (method.ExplicitInterfaceImplementations.Length > 0)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (4)
90for (int i = 0, n = Math.Min(t1NameSegments.Length, t2NameSegments.Length); i < n; i++) 105return t1NameSegments.Length - t2NameSegments.Length;
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
66for (var index = 0; index < parameterNames.Length; index++)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
64var constructorsCount = delegatedConstructor.ContainingType.InstanceConstructors.Length;
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (6)
165var argumentCount = delegatedConstructor.Parameters.Length; 196for (var i = allParameters.Length; i > 0; i--) 257if (ctor.Parameters.Length != ParameterTypes.Length) 260for (var i = 0; i < ParameterTypes.Length; i++) 282=> _arguments.IsDefault || index >= _arguments.Length ? string.Empty : _arguments[index].Name;
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (7)
44return constructor.Parameters.Length == parameters.Length && 87Debug.Assert(constructor.Parameters.Length == expressions.Length); 112for (var i = 0; i < constructorInCompilation.Parameters.Length; i++) 157for (var i = 0; i < parameterNames.Length; i++) 361else if (symbol is IPropertySymbol { Parameters.Length: 0 } property)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (2)
45m => m.Parameters.Length == 0); 61if (state.UnimplementedConstructors.Length > 1)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (3)
86return UnimplementedConstructors.Length > 0; 94if (classType.Constructors.Any(static c => c.Parameters.Length == 0 && c.IsImplicitlyDeclared)) 96var baseNoArgConstructor = baseType.Constructors.FirstOrDefault(c => c.Parameters.Length == 0);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
55var baseConstructorArguments = baseConstructor.Parameters.Length != 0
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (3)
185for (var i = 0; i < typeArguments.Length; i++) 214var result = new FixedSizeArrayBuilder<IParameterSymbol>(modifiers.Length); 215for (var i = 0; i < modifiers.Length; i++)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
64switch (symbol.ConstraintTypes.Length) 96for (var i = 1; i < symbol.ConstraintTypes.Length; i++)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
204var parameterIndex = containingMethod.Parameters.Length; 206if (containingMethod.Parameters.Length > 0) 211for (var i = containingMethod.Parameters.Length - 1; i >= 0; i--)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (3)
34.Where(p => !p.IsImplicitlyDeclared && p.Parameters.Length == 0 && p.GetMethod != null) 49.FirstOrDefault(c => c.Parameters.Length > 0 && c.Parameters[0].IsPrimaryConstructor(cancellationToken)); 256if (member is IMethodSymbol { IsStatic: false, ReturnsVoid: true, Arity: 0, Parameters.Length: 0 } disposeMethod)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
372method1.TypeParameters.Length == method2.TypeParameters.Length &&
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (2)
81if (method.Parameters.Length != conflictingMethod.Parameters.Length)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
54if (property is { IsIndexer: false, Parameters.Length: > 0 } &&
src\Analyzers\Core\CodeFixes\MakeMemberStatic\AbstractMakeMemberStaticCodeFixProvider.cs (2)
23if (context.Diagnostics.Length == 1 && 35for (var i = 0; i < diagnostics.Length; i++)
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
35for (var i = 0; i < diagnostics.Length; i++)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
132diagnostics.Length == 1, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (3)
61return arms.Length > 0 && PopulateSwitchExpressionHelpers.IsDefault(arms[^1]) 62? arms.Length - 1 63: arms.Length;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (3)
86if (cases.Length > 0) 91return cases.Length - 1; 95return cases.Length;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
44if (definition is not null && definition.DeclaringSyntaxReferences.Length > 0)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (2)
209if (localDeclaration.Declarations.Length != 1) 216if (declarators.Length != 1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208if (parameters.Length != expectedParameterCount)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
77public override int Arity => this.TypeParameters.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
72public override int Arity => this.TypeParameters.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
172return errors.Length > 0; 194if (errors.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
57for (var i = 0; i < method.TypeParameters.Length; i++) 111for (var i = 0; i < typeParameters.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
16for (var i = 0; i < parameterNames.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (2)
75if (types.Length == 0) 105if (types.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (5)
207if (property.Parameters.Length > 0) 220if (conflictingProperty is { GetMethod: not null, Parameters.Length: 0 } && 221property is { GetMethod: not null, Parameters.Length: 0 }) 246if (property.Parameters.Length > 0) 261if (conflictingProperty is { SetMethod.Parameters.Length: 1 } &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
45if (memberReferences.Length <= 8) 90if (components.Length == 0) 109if (components.Length == 1 && !useInt64)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (4)
31for (var i = parameterIndex + 1; i < method.Parameters.Length; i++) 97for (int i = 0, n = targetTuple.Elements.Length; i < n; i++) 129targetTupleTemp.Elements.Length == valueTupleTemp.Elements.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
133.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnType: var returnType, Parameters.Length: 0 } && 149.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnsVoid: true, Parameters.Length: 0 }) is IMethodSymbol disposeMethodFromPattern)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (4)
46using var isFixedDisposer = ArrayBuilder<bool>.GetInstance(names.Length, fillWithValue: false, out var isFixed); 48var result = ArrayBuilder<string>.GetInstance(names.Length); 66using var _1 = ArrayBuilder<bool>.GetInstance(names.Length, out var isFixedBuilder); 67using var _2 = ArrayBuilder<string>.GetInstance(names.Length, out var result);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
55get { return _services.Length > 0; }
Microsoft.CodeAnalysis.CSharp (1406)
Binder\Binder.CapturedParametersFinder.cs (1)
41var captured = ArrayBuilder<ParameterSymbol>.GetInstance(primaryConstructor.Parameters.Length);
Binder\Binder.QueryUnboundLambdaState.cs (1)
46public override int ParameterCount { get { return _parameters.Length; } }
Binder\Binder.ValueChecks.cs (13)
412parameters = parameters.RemoveAt(parameters.Length - 1); 416Debug.Assert(parameters.Length == indexerAccess.Indexer.Parameters.Length); 428namesBuilder = ArrayBuilder<(string Name, Location Location)?>.GetInstance(argumentNamesOpt.Length); 962if (indices.Length == 1 && 2315for (int argIndex = 0; argIndex < argsOpt.Length; argIndex++) 2320Debug.Assert(argIndex == argsOpt.Length - 1); 2331var parameter = argIndex < parameters.Length ? 2434for (int argIndex = 0; argIndex < argsOpt.Length; argIndex++) 2962var paramsMatched = BitVector.Create(parameters.Length); 2963for (int argIndex = 0; argIndex < argsOpt.Length; argIndex++) 2968for (int paramIndex = 0; paramIndex < parameters.Length; paramIndex++) 4519if (expr.Type?.IsRefLikeType != true || expr.Elements.Length == 0)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
58for (int i = path.Length - 1; i >= 0; i--)
Binder\Binder_Attributes.cs (18)
38Debug.Assert(binders.Length == attributesToBind.Length); 41for (int i = 0; i < attributesToBind.Length; i++) 84Debug.Assert(binders.Length == attributesToBind.Length); 85Debug.Assert(boundAttributeTypes.Length == attributesToBind.Length); 88for (int i = 0; i < attributesToBind.Length; i++) 174if (errorType.CandidateSymbols.Length == 1 && errorType.CandidateSymbols[0] is NamedTypeSymbol) 326Debug.Assert(rewrittenArguments.Length == attributeConstructor.ParameterCount); 346var lengthAfterRewriting = rewrittenArguments.Length; 362var lengthBeforeRewriting = arguments.Length; 378|| argsToParamsOpt.Length == lengthAfterRewriting); 708int argumentsCount = constructorArgsArray.Length; 711int parameterCount = parameters.Length; 765int numArguments = arguments.Length; 879var builder = ArrayBuilder<TypedConstant>.GetInstance(elements.Length); 974int boundsCount = bounds.Length;
Binder\Binder_Constraints.cs (6)
35Debug.Assert(typeParameters.Length > 0); 38int n = typeParameters.Length; 391Debug.Assert(typeParameters.Length > 0); 392Debug.Assert(typeParameters.Length == constraintClauses.Count); 393int n = typeParameters.Length; 413int n = constraintTypes.Length;
Binder\Binder_Conversions.cs (15)
318Debug.Assert(conversion.UnderlyingConversions.Length == 1); 375sourceTypes.Length == destTypes.Length) 378Debug.Assert(elementConversions.Length == sourceTypes.Length); 380for (int i = 0; i < sourceTypes.Length; i++) 1421else if (addMethods.Length == 1) 1452var resultBuilder = ArrayBuilder<MethodSymbol>.GetInstance(finalApplicableCandidates.Length); 1871if (method.Arity != allTypeArguments.Length) 1883if (allTypeArguments.Length > 0) 2316Debug.Assert(lambdaSymbol.ParameterCount == delegateParameters.Length); 2479Debug.Assert(targetElementTypes.Length == arguments.Length, "converting a tuple literal to incompatible type?"); 2827int numParams = delegateOrFuncPtrParameters.Length; 2829if (methodParameters.Length != numParams + (isExtensionMethod ? 1 : 0)) 2832Debug.Assert(methodParameters.Length > numParams + (isExtensionMethod ? 1 : 0));
Binder\Binder_Crefs.cs (7)
22Debug.Assert((symbols.Length > 1) == ((object?)ambiguityWinner != null), "ambiguityWinner should be set iff more than one symbol is returned."); 443int numInstanceConstructors = instanceConstructors.Length; 502if (results.Length == 0) 504for (int i = 0; i < parameterSymbols.Length; i++) 638if (symbols.Length > 1 && arity == 0) 677if (symbols.Length > 1) 680ArrayBuilder<Symbol> unwrappedSymbols = ArrayBuilder<Symbol>.GetInstance(symbols.Length);
Binder\Binder_Deconstruct.cs (5)
262if (variables.Count != tupleOrDeconstructedTypes.Length) 264Error(diagnostics, ErrorCode.ERR_DeconstructWrongCardinality, syntax, tupleOrDeconstructedTypes.Length, variables.Count); 351var matchCount = Math.Min(variables.Count, foundTypes.Length); 474int rightLength = rhsLiteral.Arguments.Length; 685for (int i = (deconstructMethod.IsExtensionMethod ? 1 : 0); i < parameters.Length; i++)
Binder\Binder_Expressions.cs (63)
332var boundArgs = ArrayBuilder<BoundExpression>.GetInstance(sourceTuple.Arguments.Length); 1070NamedTypeSymbol.VerifyTupleTypePresent(elements.Length, node, this.Compilation, diagnostics); 2759if (originalUserDefinedConversions.Length > 1) 2765Debug.Assert(originalUserDefinedConversions.Length == 0, 2794targetElementTypesWithAnnotations.Length == tuple.Arguments.Length) 2803Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2858for (int i = 0; i < targetElementTypesWithAnnotations.Length; i++) 3402Debug.Assert(!expanded || result.ParameterFromArgument(arg) != parameters.Length - 1); 3476if (expanded && paramNum == parameters.Length - 1) 3497Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == arguments.Count); 3568int paramsIndex = parameters.Length - 1; 3604int paramsIndex = parameters.Length - 1; 3624Debug.Assert(collectionArgs.Length != 0); 3630Debug.Assert(collectionArgs.Length == 1 || firstParamsArgument + collectionArgs.Length == arguments.Count); 3633if (!argsToParamsOpt.IsDefault && collectionArgs.Length > 1) 3635argsToParamsBuilder = ArrayBuilder<int>.GetInstance(argsToParamsOpt.Length); 3639for (var i = firstParamsArgument + collectionArgs.Length - 1; i != firstParamsArgument; i--) 3701if (memberAnalysisResult.Kind == MemberResolutionKind.ApplicableInExpandedForm && correspondingParameter.Ordinal == parameters.Length - 1) 3748parameters.Length)); 3754if (memberAnalysisResult.ArgsToParamsOpt.IsDefault && arguments.Count == parameters.Length) 3762var handlerArgumentIndexesBuilder = ArrayBuilder<int>.GetInstance(handlerParameterIndexes.Length, fillWithValue: BoundInterpolatedStringArgumentPlaceholder.UnspecifiedParameter); 3763for (int handlerParameterIndex = 0; handlerParameterIndex < handlerParameterIndexes.Length; handlerParameterIndex++) 3790var argumentPlaceholdersBuilder = ArrayBuilder<BoundInterpolatedStringArgumentPlaceholder>.GetInstance(handlerArgumentIndexes.Length); 3791var argumentRefKindsBuilder = ArrayBuilder<RefKind>.GetInstance(handlerArgumentIndexes.Length); 3796for (int i = 0; i < handlerArgumentIndexes.Length; i++) 3817(memberAnalysisResult.Kind == MemberResolutionKind.ApplicableInExpandedForm && originalParameterIndex + 1 == parameters.Length)) 4229Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length); 4254Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length); 4377int numSizes = sizes.Length; 4635else if (boundInitExprOpt.Length != constantSizeOpt) 4646ConstantValue.Create(boundInitExprOpt.Length), 6396boundElementInitializerExpressions.Length == 1 && 6557for (int i = 0; i < constructors.Length; i++) 6656if (finalApplicableCandidates.Length == 1) 7129if (!succeededConsideringAccessibility && allInstanceConstructors.Length > candidateConstructors.Length) 7557for (int i = 0; i < typeArgumentsWithAnnotations.Length; ++i) 7934Debug.Assert(rightArity == (typeArgumentsWithAnnotations.IsDefault ? 0 : typeArgumentsWithAnnotations.Length)); 8127if (symbols.Length > 0 && symbols[0].Kind == SymbolKind.Method) 8147methods.Length == 1 ? methods[0] : null, 8156var symbolOpt = symbols.Length == 1 ? symbols[0] : null; 8473arity = typeArgumentsWithAnnotations.Length; 9247else if (convertedIndex is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } && 9763if (finalApplicableCandidates.Length == 1) 9827PropertySymbol property = (candidates.Length == 1) ? candidates[0] : CreateErrorPropertySymbol(candidates); 10394if (methods.Length == 0) 10411if (methods.Length == 0) 10483var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: node.Methods.Length); 10580int n = node.TypeArgumentsOpt.IsDefaultOrEmpty ? 0 : node.TypeArgumentsOpt.Length; 10628var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: node.Methods.Length); 10644int arity = typeArguments.IsDefaultOrEmpty ? 0 : typeArguments.Length; 10813Debug.Assert(parameterRefKinds.IsDefault || parameterRefKinds.Length == parameterTypes.Length); 10814Debug.Assert(parameterDefaultValues.IsDefault || parameterDefaultValues.Length == parameterTypes.Length); 10816Debug.Assert(!hasParams || parameterTypes.Length != 0); 10842WellKnownTypes.GetWellKnownActionDelegate(invokeArgumentCount: parameterTypes.Length) : 10843WellKnownTypes.GetWellKnownFunctionDelegate(invokeArgumentCount: parameterTypes.Length); 10850if (typeArguments.Length == 0) 10862var fieldsBuilder = ArrayBuilder<AnonymousTypeField>.GetInstance(parameterTypes.Length + 1); 10864for (int i = 0; i < parameterTypes.Length; i++) 10874isParams: hasParams && i == parameterTypes.Length - 1,
Binder\Binder_Initializers.cs (4)
171for (int i = 0; i < initializers.Length; i++) 182for (int j = 0; j < siblingInitializers.Length; j++) 235isLast: i == initializers.Length - 1 && j == siblingInitializers.Length - 1);
Binder\Binder_InterpolatedString.cs (15)
249if ((unconvertedInterpolatedString.Parts.Length > 4 || !AllInterpolatedStringPartsAreStrings(unconvertedInterpolatedString.Parts)) && 372int n = parts.Length - 1; 530Debug.Assert(arg.AppendCalls.Length > i); 590Debug.Assert(appendCalls.Length == 1); 643: additionalConstructorArguments.Length == additionalConstructorRefKinds.Length); 669Debug.Assert(appendCallsArray.Select(a => a.Length).SequenceEqual(partsArray.Select(a => a.Length))); 670Debug.Assert(appendCallsArray.All(appendCalls => appendCalls.All(a => a is { HasErrors: true } or BoundCall { Arguments: { Length: > 0 } } or BoundDynamicInvocation))); 712int constructorArgumentLength = 3 + additionalConstructorArguments.Length; 854for (int i = 0; i < unconvertedInterpolatedString.Parts.Length; i++) 874partsBuilder = ArrayBuilder<BoundExpression>.GetInstance(unconvertedInterpolatedString.Parts.Length); 906var firstPartsLength = partsArray[0].Length; 907var builderAppendCallsArray = ArrayBuilder<ImmutableArray<BoundExpression>>.GetInstance(partsArray.Length); 909var positionInfoArray = ArrayBuilder<ImmutableArray<(bool IsLiteral, bool HasAlignment, bool HasFormat)>>.GetInstance(partsArray.Length);
Binder\Binder_Invocation.cs (24)
101Debug.Assert(names.IsDefault || names.Length == args.Length); 563for (int argIndex = 0; argIndex < refKinds.Length; argIndex++) 788if (finalApplicableCandidates.Length == 0) 792else if (finalApplicableCandidates.Length == 1) 806Debug.Assert(finalApplicableCandidates.Length > 0); 863var lastParamIndex = parameters.Length - 1; 1427int n = parameters.Length; 1447Debug.Assert(argumentOrdinal < argsToParamsOpt.Length); 1476int paramsIndex = parameters.Length - 1; 1477var visitedParameters = BitVector.Create(parameters.Length); 1505Debug.Assert(argumentsBuilder.Count >= parameters.Length); // Accounting for arglist cases 1508Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == argumentsBuilder.Count); 1516argsToParamsBuilder = ArrayBuilder<int>.GetInstance(argsToParamsOpt.Length); 1532defaultArguments = BitVector.Create(parameters.Length); 1586Debug.Assert(argumentsBuilder.Count == parameters.Length); 1587Debug.Assert(argumentRefKindsBuilder is null || argumentRefKindsBuilder.Count == 0 || argumentRefKindsBuilder.Count == parameters.Length); 1588Debug.Assert(namesBuilder is null || namesBuilder.Count == 0 || namesBuilder.Count == parameters.Length); 1589Debug.Assert(argsToParamsBuilder is null || argsToParamsBuilder.Count == parameters.Length); 1725BoundExpression arraySize = new BoundLiteral(node, ConstantValue.Create(collectionArgs.Length), int32Type) { WasCompilerGenerated = true }; 1930constructedMethods.Add(m.ConstructedFrom == m && m.Arity == typeArgumentsWithAnnotations.Length ? m.Construct(typeArgumentsWithAnnotations) : m); 1936if (methods.Length == 1 && !IsUnboundGeneric(methods[0])) 2154return (i < parameterList.Length) ? parameterList[i].Type : null; 2188for (int i = 0, n = members.Length; i < n; i++)
Binder\Binder_Lookup.cs (5)
222if (!errorType.CandidateSymbols.IsDefault && errorType.CandidateSymbols.Length == 1) 1075for (int i = interfaces.Length - 1; i >= 0; i--) 1102for (int i = baseInterfaces.Length - 1; i >= 0; i--) 1127if (interfaces.Length > 0) 1131if (interfaces.Length > 1)
Binder\Binder_Patterns.cs (9)
1066bool isError = hasErrors || outPlaceholders.IsDefaultOrEmpty || i >= outPlaceholders.Length; 1162if (elementTypesWithAnnotations.Length != node.Subpatterns.Count && !hasErrors) 1164diagnostics.Add(ErrorCode.ERR_WrongNumberOfSubpatterns, node.Location, declType, elementTypesWithAnnotations.Length, node.Subpatterns.Count); 1171bool isError = i >= elementTypesWithAnnotations.Length; 1416hasErrors = outPlaceholders.IsDefault || tupleDesignation.Variables.Count != outPlaceholders.Length; 1421bool isError = outPlaceholders.IsDefaultOrEmpty || i >= outPlaceholders.Length; 1435if (elementTypes.Length != tupleDesignation.Variables.Count && !hasErrors) 1438strippedInputType, elementTypes.Length, tupleDesignation.Variables.Count); 1444bool isError = i >= elementTypes.Length;
Binder\Binder_Query.cs (7)
314int n = result.Arguments.Length; 470arguments = arguments.SetItem(arguments.Length - 1, MakeQueryClause(join.Into, arguments[arguments.Length - 1], g)); 539arguments = arguments.SetItem(arguments.Length - 1, MakeQueryClause(join.Into, arguments[arguments.Length - 1], g)); 633arguments.SetItem(arguments.Length - 2, MakeQueryClause(from, arguments[arguments.Length - 2], x2, invocation, castInvocation)));
Binder\Binder_Statements.cs (9)
153(block = (BoundBlock)result).Statements.Length == 1 && 2174Debug.Assert(anonymousFunction.ParameterCount == delegateParameters.Length); 2271if (originalUserDefinedConversions.Length > 1) 2277Debug.Assert(originalUserDefinedConversions.Length == 0, 2339targetElementTypes.Length == tuple.Arguments.Length) 2348Error(diagnostics, ErrorCode.ERR_ConversionNotTupleCompatible, syntax, tuple.Arguments.Length, targetType); 2510var argLength = tupleArguments.Length; 2519for (int i = 0; i < targetElementTypes.Length; i++)
Binder\Binder_Symbols.cs (5)
728if (typesArray.Length < 2) 730throw ExceptionUtilities.UnexpectedValue(typesArray.Length); 1448typeArguments.IsDefault ? 0 : typeArguments.Length, 1887int aLocationsCount = !snd.Locations.IsDefault ? snd.Locations.Length : 0; 1888int bLocationsCount = fst.Locations.Length;
Binder\Binder_TupleOperators.cs (11)
49if (multiple.Operators.Length == 0) 55int length = arguments.Length; 56Debug.Assert(length == multiple.Operators.Length); 233int length = leftParts.Length; 234Debug.Assert(length == rightParts.Length); 284Debug.Assert(leftNoNames || rightNoNames || leftNames.Length == rightNames.Length); 292int length = leftNoNames ? rightNames.Length : leftNames.Length; 353return tuple.Arguments.Length; 364return tupleType.TupleElementTypesWithAnnotations.Length;
Binder\DecisionDagBuilder.cs (19)
148using var builder = TemporaryArray<StateForCase>.GetInstance(switchSections.Length); 173using var builder = TemporaryArray<StateForCase>.GetInstance(switchArms.Length); 234var length = testSequence.Length; 325var patternLength = pattern.Subpatterns.Length; 536int count = Math.Min(method.ParameterCount - extensionExtra, recursive.Deconstruction.Length); 557int count = Math.Min(elementTypes.Length, recursive.Deconstruction.Length); 774for (int i = 0; i < sortedBoundDagNodes.Length; i++) 1002for (int i = sortedStates.Length - 1; i >= 0; i--) 1656for (int i = 0; i < allStates.Length; i++) 2293var builder = ArrayBuilder<Tests>.GetInstance(seq.Length); 2326Debug.Assert(remainingTests.Length > 1); 2340var trueBuilder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2341var falseBuilder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2354var builder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2362var builder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2372int length = this.RemainingTests.Length; 2412for (int j = 0, n = testsToInsert.Length; j < n; j++) 2492for (int j = 0, n = testsToInsert.Length; j < n; j++)
Binder\DecisionDagBuilder_ListPatterns.cs (5)
23var tests = ArrayBuilder<Tests>.GetInstance(4 + subpatterns.Length * 2); 31subpatterns.Length == 1 && 45? new BoundDagRelationalTest(syntax, BinaryOperatorKind.IntGreaterThanOrEqual, ConstantValue.Create(subpatterns.Length - 1), lengthTemp) 46: new BoundDagValueTest(syntax, ConstantValue.Create(subpatterns.Length), lengthTemp))); 54index -= subpatterns.Length - 1;
Binder\ForEachLoopBinder.cs (3)
483if (originalUserDefinedConversions.Length > 1) 1481else if (overloadResolutionResult.GetAllApplicableMembers() is var applicableMembers && applicableMembers.Length > 1) 1554else if (overloadResolutionResult?.GetAllApplicableMembers() is { } applicableMembers && applicableMembers.Length > 1)
Binder\ForLoopBinder.cs (1)
108Debug.Assert(increment.Kind != BoundKind.StatementList || ((BoundStatementList)increment).Statements.Length > 1);
Binder\Imports.cs (3)
97var expandedUsingsBuilder = ArrayBuilder<NamespaceOrTypeAndUsingDirective>.GetInstance(previousSubmissionUsings.Length); 194if (externs1.Length == 0) 199if (externs2.Length == 0)
Binder\InMethodBinder.cs (1)
207parameterMap = new MultiDictionary<string, ParameterSymbol>(parameters.Length, EqualityComparer<string>.Default);
Binder\LocalBinderFactory.cs (1)
369return parameters.RemoveAt(parameters.Length - 1);
Binder\LocalScopeBinder.cs (5)
94if (_lazyLocalsMap == null && this.Locals.Length > 0) 108if (_lazyLocalFunctionsMap == null && this.LocalFunctions.Length > 0) 122if (_lazyLabelsMap == null && this.Labels.Length > 0) 134Debug.Assert(array.Length > 0); 139for (int i = array.Length - 1; i >= 0; i--)
Binder\PatternExplainer.cs (11)
39int nodeCount = nodes.Length; 250for (int i = 0, n = pathToNode.Length; i < n; i++) 319if (evaluations.IsEmpty && constraints.Length == 1) 339if (evaluations.Length == 1 && constraints.Length == 1 && 354if (evaluations.Length == 1 && constraints.Length == 1 && 383for (int i = 1; i < evaluations.Length; i++) 426for (int i = 1; i < evaluations.Length; i++) 474int cardinality = elements.Length; 543int count = method.Parameters.Length - extensionExtra;
Binder\RefSafetyAnalysis.cs (3)
662for (int i = 0; i < arguments.Length; i++) 976Debug.Assert(parameters.Length - offset == n); 1033var builder = ArrayBuilder<DeconstructionVariable>.GetInstance(arguments.Length);
Binder\Semantics\Conversions\Conversion.cs (1)
1240sub.Add(new TreeDumperNode($"underlyingConversions[{underlyingConversions.Length}]", null,
Binder\Semantics\Conversions\Conversions.cs (2)
196if (elements.Length > 0 && 203var builder = ArrayBuilder<Conversion>.GetInstance(elements.Length);
Binder\Semantics\Conversions\ConversionsBase.cs (16)
1194var innerConversions = ArrayBuilder<Conversion>.GetInstance(switchExpression.SwitchArms.Length); 1513for (int p = 0; p < delegateParameters.Length; ++p) 1527for (int p = 0; p < delegateParameters.Length; ++p) 1558for (int p = 0; p < delegateParameters.Length; ++p) 1569for (int p = 0; p < delegateParameters.Length; ++p) 2334if (!destination.IsTupleTypeOfCardinality(arguments.Length)) 2340Debug.Assert(arguments.Length == targetElementTypes.Length); 2343var argumentConversions = ArrayBuilder<Conversion>.GetInstance(arguments.Length); 2344for (int i = 0; i < arguments.Length; i++) 2412sourceTypes.Length != destTypes.Length) 2417var nestedConversions = ArrayBuilder<Conversion>.GetInstance(sourceTypes.Length); 2418for (int i = 0; i < sourceTypes.Length; i++) 3244TypeParameters: { Length: 1 } 3686for (int i = 0; i < sourceTypeArguments.Length; ++i)
Binder\Semantics\Conversions\UserDefinedConversionResult.cs (1)
85for (int i = 0; i < Results.Length; ++i)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (1)
46if (u.Length == 0)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (3)
90if (u.Length == 0) 555for (int i = 0; i < items.Length; ++i) 814for (int currentIndex = 0; currentIndex < items.Length; ++currentIndex)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
102Debug.Assert(Method.ParameterRefKinds.Length == 2); 122Debug.Assert(Method.ParameterRefKinds.Length == 2);
Binder\Semantics\Operators\UnaryOperatorSignature.cs (1)
56Debug.Assert(Method.ParameterRefKinds.Length == 1);
Binder\Semantics\OverloadResolution\ArgumentAnalysisResult.cs (2)
26Debug.Assert(arg < ArgsToParamsOpt.Length); 125for (int i = 0; i < ArgsToParamsOpt.Length; ++i)
Binder\Semantics\OverloadResolution\MemberAnalysisResult.cs (2)
169Debug.Assert(arg < ArgsToParamsOpt.Length); 323Debug.Assert(conversions.Length != 0);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (60)
164private int NumberArgumentsToProcess => System.Math.Min(_arguments.Length, _formalParameterTypes.Length); 278Debug.Assert(methodTypeParameters.Length > 0); 280Debug.Assert(formalParameterRefKinds.IsDefault || formalParameterRefKinds.Length == formalParameterTypes.Length); 284if (formalParameterTypes.Length == 0) 332_fixedResults = new (TypeWithAnnotations, bool)[methodTypeParameters.Length]; 333_exactBounds = new HashSet<TypeWithAnnotations>[methodTypeParameters.Length]; 334_upperBounds = new HashSet<TypeWithAnnotations>[methodTypeParameters.Length]; 335_lowerBounds = new HashSet<TypeWithAnnotations>[methodTypeParameters.Length]; 336_nullableAnnotationLowerBounds = new NullableAnnotation[methodTypeParameters.Length]; 350for (int i = 0; i < _formalParameterTypes.Length; ++i) 373for (int i = 0; i < _methodTypeParameters.Length; ++i) 375for (int j = 0; j < _methodTypeParameters.Length; ++j) 397for (int i = 0; i < _methodTypeParameters.Length; ++i) 425Debug.Assert(0 <= index && index < _formalParameterTypes.Length); 447for (int i = 0; i < _methodTypeParameters.Length; i++) 475return 0 <= index && index < _methodTypeParameters.Length; 499for (int methodTypeParameterIndex = 0; methodTypeParameterIndex < _methodTypeParameters.Length; ++methodTypeParameterIndex) 649if (argument.Elements.Length == 0) 709if (!destination.IsTupleTypeOfCardinality(sourceArguments.Length)) 716Debug.Assert(sourceArguments.Length == destTypes.Length); 722for (int i = 0; i < sourceArguments.Length; i++) 874if (argument.Elements.Length == 0) 907if (!destination.IsTupleTypeOfCardinality(sourceArguments.Length)) 913Debug.Assert(sourceArguments.Length == destTypes.Length); 915for (int i = 0; i < sourceArguments.Length; i++) 952var needsFixing = BitVector.Create(_methodTypeParameters.Length); 954for (int param = 0; param < _methodTypeParameters.Length; param++) 963for (int param = 0; param < _methodTypeParameters.Length; param++) 1020for (int iParam = 0; iParam < _methodTypeParameters.Length; iParam++) 1080for (int iParam = 0; iParam < _methodTypeParameters.Length; iParam++) 1167_dependencies = new Dependency[_methodTypeParameters.Length, _methodTypeParameters.Length]; 1171for (iParam = 0; iParam < _methodTypeParameters.Length; ++iParam) 1173for (jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1193Debug.Assert(0 <= iParam && iParam < _methodTypeParameters.Length); 1194Debug.Assert(0 <= jParam && jParam < _methodTypeParameters.Length); 1218for (int kParam = 0; kParam < _methodTypeParameters.Length; ++kParam) 1244for (int iParam = 0; iParam < _methodTypeParameters.Length; ++iParam) 1246for (int jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1264for (int iParam = 0; iParam < _methodTypeParameters.Length; ++iParam) 1266for (int jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1279for (int iParam = 0; iParam < _methodTypeParameters.Length; ++iParam) 1281for (int jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1301for (int jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1312for (int jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1325for (int jParam = 0; jParam < _methodTypeParameters.Length; ++jParam) 1553int size = delegateParameters.Length; 1815sourceTypes.Length != targetTypes.Length) 1820for (int i = 0; i < sourceTypes.Length; i++) 2340var result = dictionary.Count != interfaces.Length ? dictionary.Values.ToImmutableArray() : interfaces; 3082if (originalDelegateParameters.Length != anonymousFunction.ParameterCount) 3201if ((method.ParameterCount < 1) || (arguments.Length < 1)) 3234Debug.Assert(_formalParameterTypes.Length >= 1); 3236Debug.Assert(_arguments.Length >= 1); 3248for (int iParam = 0; iParam < _methodTypeParameters.Length; ++iParam)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (22)
286if (applicableMethods.Length != methods.Count) 2524int m1ParamsOrdinal = m1LeastOverriddenParameters.Length - 1; 2525int m2ParamsOrdinal = m2LeastOverriddenParameters.Length - 1; 2565parameter.Ordinal == parameters.Length - 1) 3089Debug.Assert(underlyingElementConversions1.Length == underlyingElementConversions2.Length && underlyingElementConversions1.Length == collectionExpressionElements.Length); 3091for (int i = 0; i < underlyingElementConversions1.Length; i++) 3286switch (lambda.Body.Statements.Length) 3354if (!destination.IsTupleTypeOfCardinality(sourceArguments.Length)) 3360Debug.Assert(sourceArguments.Length == destTypes.Length); 3362for (int i = 0; i < sourceArguments.Length; i++) 3708if (p1.Length != p2.Length) 3713for (int i = 0; i < p1.Length; ++i) 3805Debug.Assert(firstParamsElementIndex == -1 || (firstParamsElementIndex >= 0 && firstParamsElementIndex < types.Length)); 3847if (parm >= parameters.Length) 3991if (parm == parameters.Length - 1) 4263for (int i = 0; i < parameterTypes.Length; i++) 4401int paramCount = parameters.ParameterTypes.Length + (isVararg ? 1 : 0);
Binder\Semantics\OverloadResolution\OverloadResolution_ArgsToParameters.cs (8)
176return ArgumentAnalysisResult.RequiredParameterMissing(parameters.Length); 289int parameterCount = memberParameters.Length + (isVararg ? 1 : 0); 316for (int p = 0; p < memberParameters.Length; ++p) 322if (expanded && p == memberParameters.Length - 1) 351int parameterCount = parameters.Length + (isVararg ? 1 : 0); 365if (parameters.Length == parameterPosition || !CanBeOptional(parameters[parameterPosition], isMethodGroupConversion)) 443int count = expanded ? parameters.Length - 1 : parameters.Length;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (3)
901if (badParamIndex == parameters.Length) 936FunctionPointerMethodSymbol functionPointerMethodBeingInvoked = symbols.IsDefault || symbols.Length != 1 1120for (int i = argumentOffset; i < parameters.Length; i++)
Binder\SwitchBinder.cs (3)
84if (_lazySwitchLabelsMap == null && this.Labels.Length > 0) 95Debug.Assert(labels.Length > 0); 97var map = new Dictionary<object, SourceLabelSymbol>(labels.Length, new SwitchConstantValueHelper.SwitchLabelsComparer());
Binder\SwitchBinder_Patterns.cs (2)
89var sectionBuilder = ArrayBuilder<BoundSwitchSection>.GetInstance(switchSections.Length); 93var labelBuilder = ArrayBuilder<BoundSwitchLabel>.GetInstance(oldSection.SwitchLabels.Length);
Binder\WithPrimaryConstructorParametersBinder.cs (1)
84parameterMap = new MultiDictionary<string, ParameterSymbol>(parameters.Length, EqualityComparer<string>.Default);
BoundTree\BoundCollectionExpression.cs (1)
20for (int i = 0; i < Elements.Length; i++)
BoundTree\BoundDecisionDag.cs (1)
105for (int i = sortedNodes.Length - 1; i >= 0; i--)
BoundTree\BoundNode_Source.cs (1)
87if (statements.Length == 1 && block.Locals.IsEmpty)
BoundTree\BoundNodeExtensions.cs (1)
24for (int i = 0, n = nodeArray.Length; i < n; ++i)
BoundTree\BoundTreeRewriter.cs (1)
34for (int i = 0; i < list.Length; i++)
BoundTree\BoundTreeWalker.cs (3)
21for (int i = 0; i < list.Length; i++) 44this.Visit(arguments[arguments.Length - 1]); 48this.Visit(arguments[arguments.Length - 2]);
BoundTree\Constructors.cs (2)
188for (int i = 0; i < arguments.Length; i++) 236var builder = ArrayBuilder<RefKind>.GetInstance(result.Length);
BoundTree\Formatting.cs (5)
84var argumentDisplays = new object[arguments.Length]; 90for (int i = 1; i < arguments.Length; i++) 193if (arguments.Length == 0) 200var argumentDisplays = new object[arguments.Length]; 207for (int i = 1; i < arguments.Length; i++)
BoundTree\InterpolatedStringHandlerData.cs (1)
23public bool HasTrailingHandlerValidityParameter => ArgumentPlaceholders.Length > 0 && ArgumentPlaceholders[^1].ArgumentIndex == BoundInterpolatedStringArgumentPlaceholder.TrailingConstructorValidityParameter;
BoundTree\LengthBasedStringSwitchData.cs (9)
92Debug.Assert(lengthCaseLabels.Length > 0); 107Debug.Assert(charCaseLabels.Length > 0); 122Debug.Assert(stringCaseLabels.Length > 0); 134StringBasedJumpTables.All(t => t.StringCaseLabels.Length <= 5); 170Debug.Assert(casesWithGivenLength.Length > 0); 178if (casesWithGivenLength.Length == 1) 207Debug.Assert(caseLabels.Length > 0); 255Debug.Assert(cases.Length > 0 && cases.All(c => c.value is not null)); 266builder.AppendLine($"Buckets: {string.Join(", ", StringBasedJumpTables.Select(t => t.StringCaseLabels.Length))}");
BoundTree\NullabilityRewriter.cs (1)
235var builder = ArrayBuilder<T>.GetInstance(symbols.Length);
BoundTree\TupleBinaryOperatorInfo.cs (2)
114Debug.Assert(operators.IsEmpty || operators.Length > 1); // an empty array is used for error cases, otherwise tuples must have cardinality > 1 126sub.Add(new TreeDumperNode($"nestedOperators[{Operators.Length}]", null,
BoundTree\UnboundLambda.cs (13)
177parameterRefKinds.IsDefault ? Enumerable.Repeat(RefKind.None, parameterTypes.Length).ToImmutableArray() : parameterRefKinds, 919var numParametersToCheck = Math.Min(targetParameterTypes.Length, ParameterCount); 1033Debug.Assert(parameterTypes.Length == parameterRefKinds.Length); 1050other.ParameterTypes.Length != this.ParameterTypes.Length || 1056for (int i = 0; i < this.ParameterTypes.Length; i++) 1483public override int ParameterCount { get { return _parameterNames.IsDefault ? 0 : _parameterNames.Length; } } 1524Debug.Assert(!_parameterNames.IsDefault && 0 <= index && index < _parameterNames.Length); 1535Debug.Assert(0 <= index && index < _parameterTypesWithAnnotations.Length); 1541Debug.Assert(0 <= index && index < _parameterTypesWithAnnotations.Length); 1555Debug.Assert(0 <= index && index < _parameterTypesWithAnnotations.Length); 1569if (statements.Length == 1 &&
CodeGen\EmitAddress.cs (1)
385for (int i = 0; i < indices.Length; ++i)
CodeGen\EmitArrayInitializer.cs (9)
85for (int i = 0; i < inits.Length; i++) 144for (int i = 0; i < inits.Length; i++) 299if (inits.Length == 0) 337var writer = new BlobBuilder(initializers.Length * 4); 346if (inits.Length != 0) 374return inits.Length != 0 && inits[0].Kind == BoundKind.ArrayInitialization; 483var elementCount = initializers.Length; 815Debug.Assert(initializers.Length > 0); 818var writer = new BlobBuilder(initializers.Length * 4);
CodeGen\EmitConversion.cs (1)
384if (parameters.Length != 2) continue;
CodeGen\EmitExpression.cs (25)
707for (int i = 0; i < expression.Arguments.Length; i++) 949Debug.Assert(arguments.Length == parameters.Length || 950(arguments.Length == parameters.Length + 1 && arguments is [.., BoundArgListOperator]), "argument count must match parameter count"); 953Debug.Assert(argRefKindsOpt.IsDefault || argRefKindsOpt.Length == arguments.Length || 954(argRefKindsOpt.Length == arguments.Length - 1 && arguments is [.., BoundArgListOperator]), "if we have argRefKinds, we should have one for each argument"); 956for (int i = 0; i < arguments.Length; i++) 970if (i < parameters.Length) 972if (!argRefKindsOpt.IsDefault && i < argRefKindsOpt.Length) 1680method.IsVararg ? (BoundArgListOperator)arguments[arguments.Length - 1] : null); 2014actualMethodTargetedByTheCall.IsVararg ? (BoundArgListOperator)arguments[arguments.Length - 1] : null); 2254int fixedArgCount = arguments.Length - 1; 2255int varArgCount = ((BoundArgListOperator)arguments[fixedArgCount]).Arguments.Length; 2262stack -= arguments.Length; 2278int fixedArgCount = objCreation.Arguments.Length - 1; 2279int varArgCount = ((BoundArgListOperator)objCreation.Arguments[fixedArgCount]).Arguments.Length; 2286stack -= objCreation.Arguments.Length; 2456constructor.IsVararg ? (BoundArgListOperator)expression.Arguments[expression.Arguments.Length - 1] : null); 2464int argumentsLength = expression.Arguments.Length; 2620if (objCreation.Arguments.Length > 0 && objCreation.Arguments[0].Kind == BoundKind.ConvertedStackAllocExpression) 2713constructor.IsVararg ? (BoundArgListOperator)objCreation.Arguments[objCreation.Arguments.Length - 1] : null); 4023if (ptrInvocation.Arguments.Length > 0)
CodeGen\EmitStackAllocInitializer.cs (4)
53_builder.EmitIntConstant(data.Length); 63_builder.EmitIntConstant(data.Length); 98_builder.EmitIntConstant(data.Length); 165if (inits.Length == 0)
CodeGen\EmitStatement.cs (2)
127for (int i = 0, n = list.Statements.Length; i < n; i++) 933(statement.CatchBlocks.Length > 0) &&
CodeGen\Optimizer.cs (9)
724for (int i = 0; i < sideeffects.Length; i++) 778for (int i = 0; i < sideeffects.Length - 1; i++) 1260Debug.Assert(arguments.Length == parameters.Length || arguments.Length == parameters.Length + 1); 1263for (int i = 0; i < arguments.Length; i++) 1298for (int i = 0; i < arguments.Length; i++) 1763for (int i = 0; i < initializers.Length; i++)
CommandLine\CSharpCompiler.cs (5)
54var trees = new SyntaxTree?[sourceFiles.Length]; 55var normalizedFilePaths = new string?[sourceFiles.Length]; 62sourceFiles.Length, 78for (int i = 0; i < sourceFiles.Length; i++) 100for (int i = 0; i < sourceFiles.Length; i++)
Compilation\CSharpCompilation.cs (18)
2231if (method.Parameters.Length == 0) 2236if (method.Parameters.Length > 1) 2569binderFactories = new WeakReference<BinderFactory>[this.SyntaxTrees.Length]; 2625if (_lazyCompilationUnitCompletedTrees.Count == this.SyntaxTrees.Length) 2950syntaxTrees.Length, 3008if (EventQueue != null && SyntaxTrees.Length == 0) 3201if (updated.Count == SyntaxTrees.Length) 3729for (int i = 1; i < modules.Length; i++) 3863if (bytesText.Length != bytes.Length * 2) 4057for (int i = 0; i < parameterTypes.Length; i++) 4070if (parameterRefKinds.Length != parameterTypes.Length) 4073throw new ArgumentException(string.Format(CSharpResources.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length)); 4142var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(elementTypes.Length); 4143for (int i = 0; i < elementTypes.Length; i++) 4198for (int i = 0, n = memberTypes.Length; i < n; i++) 4210for (int i = 0, n = memberTypes.Length; i < n; i++)
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
31if (usings.Length == 0)
Compilation\CSharpSemanticModel.cs (11)
1056return !crefSymbols.IsDefault && crefSymbols.Length == 1 1203return !crefSymbols.IsDefault && crefSymbols.Length == 1 3599if (candidateSymbols.Length == 1 && candidateSymbols[0] is NamedTypeSymbol) 3669else if (boundObjectCreation.ConstructorsGroup.Length > 0) 4062else if (candidateConstructors.Length > 0) 4198if (methods.Length <= 1) 4355else if (methodGroup.Length == 1 && !boundNode.HasAnyErrors) 4443else if (propertyGroup.Length == 1 && !boundNode.HasAnyErrors) 4621arity = typeArguments.Length; 4671if (!typeArguments.IsDefaultOrEmpty && method.Arity == typeArguments.Length) 4791Debug.Assert(call.Arguments.Length > 0);
Compilation\MemberSemanticModel.cs (1)
879else if (symbolInfo.CandidateSymbols.Length == 1)
Compilation\SyntaxAndDeclarationManager.cs (5)
412for (int i = ordinal + 1; i < syntaxTrees.Length; i++) 546for (var i = oldOrdinal + 1; i < syntaxTrees.Length; i++) 562Debug.Assert(newTrees.Length == ordinalMap.Count); 574Debug.Assert(oldLoadDirectives.Length == newLoadDirectivesSyntax.Count); 629for (int i = current.Children.Length - 1; i >= 0; i--)
Compilation\SyntaxTreeSemanticModel.cs (1)
261switch (symbols.Length)
Compiler\AnonymousTypeMethodBodySynthesizer.cs (5)
50Debug.Assert(anonymousType.Properties.Length == paramCount); 131if (anonymousType.Properties.Length > 0) 133var fields = ArrayBuilder<FieldSymbol>.GetInstance(anonymousType.Properties.Length); 204for (int index = 0; index < anonymousType.Properties.Length; index++) 243int fieldCount = anonymousType.Properties.Length;
Compiler\ClsComplianceChecker.cs (5)
115for (int i = 0; i < symbol.Modules.Length; i++) 692for (int i = startPos; i < parameters.Length; i++) 1209System.Diagnostics.Debug.Assert(args.Length == 1, "We already checked the signature and HasErrors."); 1353int numParams = xParameterTypes.Length; 1355if (yParameterTypes.Length != numParams)
Compiler\DocumentationCommentCompiler.cs (1)
1075switch (symbols.Length)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
135Debug.Assert(expander._nextSourceIncludeElementIndex == expander._sourceIncludeElementNodes.Length); 476Debug.Assert(_nextSourceIncludeElementIndex < _sourceIncludeElementNodes.Length); 578if (parameters.Length > 0)
Compiler\MethodCompiler.cs (1)
494for (int memberOrdinal = 0; memberOrdinal < members.Length; memberOrdinal++)
Declarations\DeclarationTable.cs (1)
128var builder = ArrayBuilder<SingleNamespaceDeclaration>.GetInstance(oldRootDeclarations.Length + 1);
Declarations\MergedNamespaceDeclaration.cs (2)
49for (var i = 1; i < _declarations.Length; i++) 61if (_declarations.Length == 1)
Declarations\MergedTypeDeclaration.cs (3)
163for (var i = 1; i < Declarations.Length; i++) 175if (Declarations.Length == 1) 178var builder = ArrayBuilder<SourceLocation>.GetInstance(Declarations.Length);
Emitter\EditAndContinue\CSharpDefinitionMap.cs (3)
99if (slotIndex >= localSlotDebugInfo.Length) 146var result = new EncLocalInfo[slotMetadata.Length]; 153int slotCount = Math.Min(localSlots.Length, slotMetadata.Length);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (6)
194for (int i = 1; i < otherAssembly.Modules.Length; i++) 612int n = typeParameters.Length; 637int n = typeParameters.Length; 706return modifiers.Length == 1; 736Debug.Assert(type.ConstraintTypesNoUseSiteDiagnostics.Length == other.ConstraintTypesNoUseSiteDiagnostics.Length);
Emitter\Model\ArrayTypeSymbolAdapter.cs (1)
29if (elementType.CustomModifiers.Length == 0)
Emitter\Model\AttributeDataAdapter.cs (5)
76return this.CommonConstructorArguments.Length; 84return (ushort)this.CommonNamedArguments.Length; 125if (values.Length == 0) 132var metadataExprs = new Cci.IMetadataExpression[values.Length]; 133for (int i = 0; i < values.Length; i++)
Emitter\Model\FieldSymbolAdapter.cs (1)
43if (isFixed || customModifiers.Length == 0)
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
331if (explicitImplementations.Length != 0) 873for (int i = 0; i < arguments.Length; i++)
Emitter\Model\PEAssemblyBuilder.cs (4)
129for (int i = 1; i < modules.Length; i++) 147if (ImmutableInterlocked.InterlockedInitialize(ref lazyFiles, builder.ToImmutable()) && lazyFiles.Length > 0) 168int count = modules.Length; 561Debug.Assert(symbol.Constructors.Length == description.Signatures.Length);
Emitter\Model\PEModuleBuilder.cs (6)
156for (int i = 1; i < modules.Length; i++) 618if (initialized && _lazyExportedTypes.Length > 0) 639for (int i = 1; i < modules.Length; i++) //NOTE: skipping modules[0] 790for (int i = nested.Length - 1; i >= 0; i--) 1220if (optArgList != null && optArgList.Arguments.Length > 0) 1222Cci.IParameterTypeInformation[] @params = new Cci.IParameterTypeInformation[optArgList.Arguments.Length];
Emitter\Model\PointerTypeSymbolAdapter.cs (1)
25if (AdaptedPointerTypeSymbol.PointedAtTypeWithAnnotations.CustomModifiers.Length == 0)
Emitter\Model\SpecializedFieldReference.cs (1)
67if (customModifiers.Length == 0)
Emitter\Model\SymbolAdapter.cs (1)
148for (int i = 0; i < userDefined.Length; i++)
FlowAnalysis\AbstractFlowPass.cs (4)
497if ((object)method == null || method.Locations.Length != 1) 1526for (int i = 0; i < arguments.Length; i++) 1545for (int i = 0; i < arguments.Length; i++) 1568return refKindsOpt.IsDefault || refKindsOpt.Length <= index ? RefKind.None : refKindsOpt[index];
FlowAnalysis\AbstractFlowPass_Switch.cs (1)
25var iLastSection = (switchSections.Length - 1);
FlowAnalysis\DefiniteAssignment.cs (1)
1665if (!bad.ChildBoundNodes.IsDefault && bad.ChildBoundNodes.Length == 1)
FlowAnalysis\FlowAnalysisPass.cs (3)
101else if (method.Locations.Length == 1) 119var builder = ArrayBuilder<BoundStatement>.GetInstance(implicitlyInitializedFields.Length); 170int n = statements.Length;
FlowAnalysis\NullableWalker.cs (64)
954var builder = ArrayBuilder<Symbol>.GetInstance(members.Length + baseRequiredMembers.Count); 2868for (int i = 0; i < methodParameters.Length; i++) 2873var parameterType = i >= signatureParameters.Length ? parameter.TypeWithAnnotations : signatureParameters[i].TypeWithAnnotations; 3755var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.Elements.Length); 4449var builder = ArrayBuilder<VisitResult>.GetInstance(argumentResults.Length); 4456builder.AddRange(argumentResults, 1, argumentResults.Length - 1); 4562for (int i = 0; i < arguments.Length; i++) 4589if (currentDeclarationIndex >= node.Declarations.Length) 4628var expressions = ArrayBuilder<BoundExpression>.GetInstance(initialization.Initializers.Length); 4859if (node.Indices.Length == 1 && 6373|| parameterCount != arguments.Length 6388Debug.Assert(arguments.Length == 2); 6399Debug.Assert(arguments.Length == 1); 6573if (compareExchangeInfo.Arguments.Length != 3) 6582Debug.Assert(argsToParamsOpt is { IsDefault: true } or { Length: 3 }); 6839Debug.Assert(refKindsOpt.IsDefaultOrEmpty || refKindsOpt.Length == arguments.Length); 6840Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == arguments.Length); 6910var conversionResultsBuilder = ArrayBuilder<VisitResult>.GetInstance(results.Length); 6916for (int i = 0; i < results.Length; i++) 6919var argument = i < arguments.Length ? arguments[i] : argumentNoConversion; 6953conversions.IsDefault || i >= conversions.Length ? Conversion.Identity : conversions[i], 6991for (int i = 0; i < arguments.Length; i++) 7013for (int i = 0; i < arguments.Length; i++) 7064for (int a = 0; a < arguments.Length; ++a) 7069Debug.Assert(parametersOpt.IsDefault || arguments.Length == parametersOpt.Length); 7081if (elements.Length == 0) 7097Debug.Assert(defaultArguments.IsNull || elements.Length == 1); 7098Debug.Assert(elements.Length == 1 || a == arguments.Length - 1); 7099var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(arguments.Length + elements.Length - 1); 7102argumentsBuilder.AddRange(arguments, a + 1, arguments.Length - (a + 1)); 7103Debug.Assert(argumentsBuilder.Count == arguments.Length + elements.Length - 1); 7107var argsToParamsBuilder = ArrayBuilder<int>.GetInstance(argsToParamsOpt.Length + elements.Length - 1); 7109argsToParamsBuilder.AddMany(arguments.Length - 1, elements.Length); 7110argsToParamsBuilder.AddRange(argsToParamsOpt, a + 1, argsToParamsOpt.Length - (a + 1)); 7116var refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(refKindsOpt.Length + elements.Length - 1); 7118refKindsBuilder.AddMany(RefKind.None, elements.Length); 7119refKindsBuilder.AddRange(refKindsOpt, a + 1, refKindsOpt.Length - (a + 1)); 7285int n = arguments.Length; 7799int n = arguments.Length; 7862if (expanded && parameter.Ordinal == parametersOpt.Length - 1) 7898arguments.Length, 7994int n = argumentResults.Length; 8022Debug.Assert(collectionExpressionVisitResults.Length == collection.Elements.Length); 8529Debug.Assert(values.Length == types.Length); 8530Debug.Assert(values.Length == (useRestField ? Math.Min(tupleType.TupleElements.Length, NamedTypeSymbol.ValueTupleRestPosition) : tupleType.TupleElements.Length)); 8535int n = values.Length; 8546values.Length == NamedTypeSymbol.ValueTupleRestPosition && 8606int n = valueElements.Length; 10259Debug.Assert(parameters.Length - offset == n); 10308Debug.Assert(rightParts.Length == n); 10412var builder = ArrayBuilder<DeconstructionVariable>.GetInstance(arguments.Length); 12067if (node.Locals.Length > 0)
FlowAnalysis\NullableWalker.SnapshotManager.cs (2)
44for (int i = 1; i < incrementalSnapshots.Length; i++) 118RoslynDebug.Assert(_walkerSharedStates.Length > _incrementalSnapshots[position].snapshot.SharedStateIndex, $"Did not find shared state for {node} `{node.Syntax}`.");
FlowAnalysis\NullableWalker.Variables.cs (2)
67return $"Id={Id}, Symbol={symbol}, Count={VariableSlot.Length}"; 168_variableBySlot.AddMany(default, snapshot.VariableSlot.Length);
FlowAnalysis\NullableWalker_Patterns.cs (5)
199for (int i = 0, n = Math.Min(rp.Deconstruction.Length, elements.IsDefault ? 0 : elements.Length); i < n; i++) 912int numSwitchArms = node.SwitchArms.Length; 967|| node is BoundSwitchExpression { SwitchArms: { Length: 0 } }); 996int numSwitchArms = node.SwitchArms.Length;
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
203if (rootScopeHoistedLocals.Length > 0)
Lowering\ClosureConversion\ClosureConversion.cs (4)
904Debug.Assert(typeParameters.Length == frameType.Arity); 922refkindsBuilder.AddMany(RefKind.None, arguments.Length); 984var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArguments.Length); 1023Debug.Assert((typeArgumentsOpt.IsDefault && !originalMethod.IsGenericMethod) || (typeArgumentsOpt.Length == originalMethod.Arity));
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (5)
294if (node.Indices.Length == 1) 999Debug.Assert(ci.Initializers.Length != 0); 1056(node.Arguments.Length == 0 && !node.Type.IsStructType()) || 1064if (node.Type.IsAnonymousType && node.Arguments.Length != 0) 1068for (int i = 0; i < node.Arguments.Length; i++)
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
108if (typeArguments.Length > lambdaFrame.Arity)
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (2)
81if (!structEnvironments.IsDefaultOrEmpty && typeParameters.Length != 0) 218internal int ExtraSynthesizedParameterCount => this._structEnvironments.IsDefault ? 0 : this._structEnvironments.Length;
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
92node.Indices.Length == 1 && 359for (int i = 0; i < arguments.Length; i++)
Lowering\DiagnosticsPass_Warnings.cs (8)
25Debug.Assert(arguments.Length == argumentRefKindsOpt.Length); 26for (int i = 0; i < arguments.Length; i++) 237if (method.ParameterCount != arguments.Length || 242for (int i = 0; i < arguments.Length; i++) 370if (parameters.Length == 2 && TypeSymbol.Equals(parameters[0].Type, t, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(parameters[1].Type, t, TypeCompareKind.ConsiderEverything2)) 911int length = leftArguments.Length; 912Debug.Assert(length == rightTuple.Arguments.Length);
Lowering\Extensions.cs (1)
19if (!ArgumentRefKinds.IsDefault && index < ArgumentRefKinds.Length)
Lowering\InitializerRewriter.cs (1)
33var boundStatements = ArrayBuilder<BoundStatement>.GetInstance(boundInitializers.Length);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
234methodBodyFactory.Literal(dynamicAnalysisSpans.Length)));
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (3)
554Debug.Assert(refKinds.IsDefault || arguments.Length == refKinds.Length); 575for (int i = 0; i < arguments.Length; i++)
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (3)
189methodDefinition.Parameters.Length == parametersWithCancellationToken.Length - 1 && 198parametersWithCancellationToken.AsSpan(0, methodDefinition.Parameters.Length),
Lowering\LocalRewriter\LocalRewriter.cs (3)
748var statements = ArrayBuilder<BoundStatement?>.GetInstance(node.Statements.Length); 826if (node.Indices.Length != 1) 883if (block.Statements.Length == 1)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (8)
390for (int i = 0, length = nodesToLower.Length; i < length; i++) 458(indexOfNode + 2 < nodesToLower.Length) && 634Debug.Assert(cases.Length == whenTrueCases.Length + whenFalseCases.Length); 763lengthBasedDispatch.ShouldGenerateLengthBasedSwitch(node.Cases.Length) && 770EnsureStringHashFunction(node.Cases.Length, node.Syntax, stringPatternInput); 822lowerFloatDispatch(0, cases.Length);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
616int count = loweredInput.Arguments.Length; 620var newArguments = ArrayBuilder<BoundExpression>.GetInstance(loweredInput.Arguments.Length);
Lowering\LocalRewriter\LocalRewriter_Block.cs (1)
79for (int i = startIndex; i < statements.Length; i++)
Lowering\LocalRewriter\LocalRewriter_Call.cs (33)
454Debug.Assert(rewrittenArguments.Length == 2); 664Debug.Assert(argumentRefKindsOpt.IsDefault || argumentRefKindsOpt.Length == arguments.Length); 730var visitedArgumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(arguments.Length); 737for (int i = 0; i < arguments.Length; i++) 821positionsAssignedToTemp = BitVector.Create(arguments.Length); 841if (interpolationData.ArgumentPlaceholders.Length > (interpolationData.HasTrailingHandlerValidityParameter ? 1 : 0)) 912if (interpolationData.ArgumentPlaceholders.Length > (interpolationData.HasTrailingHandlerValidityParameter ? 1 : 0)) 1019Debug.Assert(expanded ? rewrittenArguments.Length == parameters.Length : rewrittenArguments.Length >= parameters.Length); 1026if (expanded && TryOptimizeParamsArray(rewrittenArguments[rewrittenArguments.Length - 1], out optimized)) 1028return rewrittenArguments.SetItem(rewrittenArguments.Length - 1, optimized); 1083BoundExpression[] actualArguments = new BoundExpression[parameters.Length]; // The actual arguments that will be passed; one actual argument per formal parameter. 1084ArrayBuilder<BoundAssignmentOperator> storesToTemps = ArrayBuilder<BoundAssignmentOperator>.GetInstance(rewrittenArguments.Length); 1085ArrayBuilder<RefKind> refKinds = ArrayBuilder<RefKind>.GetInstance(parameters.Length, RefKind.None); 1158for (int i = 0; i < parameters.Length; i++) 1187Debug.Assert(argumentRefKindsOpt.IsDefault || argumentRefKindsOpt.Length >= parameters.Length); 1197refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(parameters.Length); 1202refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(parameters.Length, fillWithValue: RefKind.None); 1225Debug.Assert(rewrittenArguments.Length == methodOrIndexer.GetParameterCount() + 1); 1238return rewrittenArguments.Length == methodOrIndexer.GetParameterCount() && 1264for (int i = 0; i < elements.Length; i++) 1273elementsBuilder = ArrayBuilder<BoundExpression>.GetInstance(elements.Length); 1314Debug.Assert(rewrittenArguments.Length == parameters.Length); 1317for (int a = 0; a < rewrittenArguments.Length; ++a) 1329Debug.Assert(p == parameters.Length - 1); 1333if (a == rewrittenArguments.Length - 1) 1606Debug.Assert(actualArguments.Length == parameters.Length); 1609Debug.Assert(argsRefKindsBuilder.Count == parameters.Length);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (17)
102if (elements.Length == 0) 268if (elements.Length == 0) 344var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(elements.Length + 1); 417if (elements.Length == 0) 427? numberIncludingLastSpread == 0 && elements.Length == 1 && SynthesizedReadOnlyListTypeSymbol.CanCreateSingleElement(_compilation) 519&& node.Elements.Length > 0 528node.Elements.Length > 0 && 536node.Elements.Length > 0 && 546Debug.Assert(elements.Length > 0); 553int arrayLength = elements.Length; 736int knownLength = elements.Length; 1029var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(elements.Length + 1); 1040if (useKnownLength && elements.Length > 0 && _factory.CurrentFunction?.IsAsync == false) 1056if (useKnownLength && elements.Length > 0) 1237for (int i = 0; i < elements.Length; i++) 1268var isLastElement = i == (elements.Length - 1); 1301initialLength += elements.Length - numberIncludingLastSpread;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (7)
330BoundExpression[] actualArguments = new BoundExpression[parameters.Length]; // The actual arguments that will be passed; one actual argument per formal parameter. 331ArrayBuilder<BoundAssignmentOperator> storesToTemps = ArrayBuilder<BoundAssignmentOperator>.GetInstance(rewrittenArguments.Length); 332ArrayBuilder<RefKind> refKinds = ArrayBuilder<RefKind>.GetInstance(parameters.Length, RefKind.None); 519var loweredArguments = new BoundExpression[arguments.Length]; 521for (int i = 0; i < arguments.Length; i++) 788var boundTempIndices = new BoundExpression[loweredIndices.Length]; 909return objCreation.Arguments.Length == 1 && ReadIsSideeffecting(objCreation.Arguments[0]);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
956var numElements = destElementTypes.Length; 1002case BoundObjectCreationExpression { Arguments: { Length: 1 } args }: 1013when underlying.Length == 1 && underlying[0].Kind == ConversionKind.ImplicitTuple && !convertedArgument.Type!.IsNullableType():
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (5)
224Debug.Assert(leftTargets.Count == rightParts.Length && leftTargets.Count == deconstructConversionInfo.Length); 342var numElements = tupleElementTypes.Length; 387var outLocals = ArrayBuilder<BoundExpression>.GetInstance(outputPlaceholders.Length); 445var assignmentTargets = ArrayBuilder<Binder.DeconstructionVariable>.GetInstance(variables.Arguments.Length);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
20int numFixedLocals = localDecls.Length; 22var localBuilder = ArrayBuilder<LocalSymbol>.GetInstance(node.Locals.Length);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (3)
169var builder = ArrayBuilder<BoundExpression>.GetInstance(getEnumeratorInfo.Arguments.Length); 172builder.AddRange(getEnumeratorInfo.Arguments, 1, getEnumeratorInfo.Arguments.Length - 1); 820Debug.Assert(iterationVariables.Length == 1);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (6)
479Debug.Assert(node.ArgumentPlaceholders.Length == 1); 561Debug.Assert(node.ArgumentPlaceholders.Length == 1); 569Debug.Assert(indexerAccess.Arguments.Length == 1); 729else if (unloweredExpr is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } && 771Debug.Assert(node.ArgumentPlaceholders.Length == 2); 982Debug.Assert(node.ArgumentPlaceholders.Length == 2);
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
317if (allTemps.Length > 0)
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (3)
203var valueTemps = ArrayBuilder<BoundExpression?>.GetInstance(anonymousType.Properties.Length, fillWithValue: null); 218Debug.Assert(property.MemberIndexOpt!.Value >= 0 && property.MemberIndexOpt.Value < anonymousType.Properties.Length); 222var builder = ArrayBuilder<BoundExpression>.GetInstance(anonymousType.Properties.Length);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (4)
169var builder = ArrayBuilder<RefKind>.GetInstance(addMethod.Parameters.Length, RefKind.None); 419Debug.Assert(getSubArrayCall.Arguments.Length == 2); 595for (int i = 0; i < args.Length; i++) 622newArgs = ArrayBuilder<BoundExpression>.GetInstance(args.Length);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
94Debug.Assert(getMethod.ParameterCount == rewrittenArguments.Length);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (5)
217case BoundSequence { SideEffects.Length: 0, Value: BoundCall sequenceCall } sequence: 225var unwrappedArgsBuilder = ArrayBuilder<BoundExpression>.GetInstance(capacity: wrappedArgs.Length); 242Locals.Length: 0, 407Debug.Assert(loweredArgs.Length > 4); 532var preparedArgsBuilder = ArrayBuilder<BoundExpression>.GetInstance(capacity: args.Length);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (3)
44for (int i = construction.ArgumentRefKindsOpt.Length - 1; i >= 0; i--) 69var resultExpressions = ArrayBuilder<BoundExpression>.GetInstance(parts.Length + 1); 158int length = node.Parts.Length;
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (10)
64var builder = ArrayBuilder<BoundExpression>.GetInstance(tuple.Arguments.Length); 65for (int i = 0; i < tuple.Arguments.Length; i++) 109var numElements = destElementTypes.Length; 152var builder = ArrayBuilder<BoundExpression>.GetInstance(tuple.Arguments.Length); 153for (int i = 0; i < tuple.Arguments.Length; i++) 205case BoundObjectCreationExpression { Arguments: { Length: 0 }, Type: { } eType } _ when eType.IsNullableType(): 207case BoundObjectCreationExpression { Arguments: { Length: 1 }, Type: { } eType } creation when eType.IsNullableType(): 445int tupleCardinality = operand.Type.TupleElementTypesWithAnnotations.Length; 448Debug.Assert(underlyingConversions.Length == tupleCardinality); 491for (int i = 0; i < nestedOperators.Length; i++)
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
73for (int i = declarations.Length - 1; i >= 0; i--) //NB: inner-to-outer = right-to-left
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
54Debug.Assert(children.Length > 0);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (14)
569Debug.Assert(argumentNames.IsDefaultOrEmpty || loweredArguments.Length == argumentNames.Length); 570Debug.Assert(refKinds.IsDefault || loweredArguments.Length == refKinds.Length); 573var infos = new BoundExpression[(loweredReceiver != null ? 1 : 0) + loweredArguments.Length + (loweredRight != null ? 1 : 0)]; 580for (int i = 0; i < loweredArguments.Length; i++) 726Debug.Assert(refKinds.IsDefaultOrEmpty || refKinds.Length == loweredArguments.Length); 758byRefs = RefKindVector.Create(1 + (loweredReceiver != null ? 1 : 0) + loweredArguments.Length + (loweredRight != null ? 1 : 0) + (returnsVoid ? 0 : 1)); 768for (int i = 0; i < refKinds.Length; i++, j++) 875var result = new BoundExpression[1 + (receiver != null ? 1 : 0) + arguments.Length + (right != null ? 1 : 0)]; 886j += arguments.Length; 899var result = new TypeSymbol[1 + (receiver != null ? 1 : 0) + arguments.Length + (right != null ? 1 : 0) + (resultType.IsVoidType() ? 0 : 1)]; 912for (int i = 0; i < arguments.Length; i++)
Lowering\MethodToClassRewriter.cs (2)
334Debug.Assert(typeArgs.Length == newMethod.Arity); 336var visitedTypeArgs = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArgs.Length);
Lowering\SpillSequenceSpiller.cs (17)
441Debug.Assert(call.Arguments.Length == 1); 451Debug.Assert(call.Arguments.Length == 1); 465Debug.Assert(call.Arguments.Length == 2); 473Debug.Assert(call.Arguments.Length == 1); 486Debug.Assert(objectCreationExpression.Arguments.Length == 1); 522Debug.Assert(call.Arguments.Length == 2); 591Debug.Assert(refKinds.IsDefault || refKinds.Length == args.Length); 593if (args.Length == 0) 599Debug.Assert(newList.Length == args.Length); 604lastSpill = newList.Length; 609for (int i = newList.Length - 1; i >= 0; i--) 626builder = new BoundSpillSequenceBuilder(lastSpill < newList.Length ? (newList[lastSpill] as BoundSpillSequenceBuilder)?.Syntax : null); 629var result = ArrayBuilder<BoundExpression>.GetInstance(newList.Length); 646if (lastSpill < newList.Length) 652for (int i = lastSpill + 1; i < newList.Length; i++)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
138_fieldsForCleanup = new ArrayBuilder<FieldSymbol>(nonReusableFieldsForCleanup.Length); 417if (rewrittenStatements.Length == 1 && rewrittenStatements[0].Kind == BoundKind.StateMachineScope)
Lowering\StateMachineRewriter\StateMachineTypeSymbol.cs (1)
57Debug.Assert(base.GetAttributes().Length == 0);
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (1)
74Debug.Assert(base.GetAttributes().Length == 0);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
104get { return this.Parameters.Length; }
Lowering\SyntheticBoundNodeFactory.cs (8)
742var ctor = type.InstanceConstructors.Single(c => c.ParameterCount == args.Length); 812Debug.Assert(methodSymbol.Arity == typeArgs.Length); 849Debug.Assert(method.ParameterCount == args.Length); 865var builder = ArrayBuilder<RefKind>.GetInstance(result.Length); 886Debug.Assert(method.ParameterCount == args.Length); 1067if (sections.Length == 0) 1533if (elements.Length == 0) 1550ImmutableArray.Create<BoundExpression>(Literal(elements.Length)),
Operations\CSharpOperationFactory.cs (14)
343var builder = ArrayBuilder<TOperation>.GetInstance(boundNodes.Length); 381var builder = ArrayBuilder<IOperation>.GetInstance(children.Length); 408var builder = ArrayBuilder<IVariableDeclaratorOperation>.GetInstance(multipleDeclaration.LocalDeclarations.Length); 535if (declarations.Length > 0) 1516operatorMethod?.Parameters.Length == 1) 1938if (info.Arguments.Length == 0) 1965Debug.Assert(boundForEachStatement.IterationVariables.Length == 1); 2032Debug.Assert(boundUsingStatement.ExpressionOpt is object || boundUsingStatement.Locals.Length > 0); 2277var builder = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(parts.Length); 2299Debug.Assert(parts.Length == positionInfo.Length); 2300var builder = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(parts.Length); 2302for (int i = 0; i < parts.Length; i++) 2322Debug.Assert(bad.ChildBoundNodes.Length ==
Operations\CSharpOperationFactory_Methods.cs (13)
308ArrayBuilder<IArgumentOperation> argumentsBuilder = ArrayBuilder<IArgumentOperation>.GetInstance(arguments.Length); 311for (; i < parameters.Length; ++i) 320for (; i < arguments.Length; ++i) 326Debug.Assert(methodOrIndexer.GetIsVararg() ^ parameters.Length == arguments.Length); 368ArrayBuilder<IArgumentOperation> argumentsInEvaluationBuilder = ArrayBuilder<IArgumentOperation>.GetInstance(parameters.Length); 371for (int a = 0; a < arguments.Length; ++a) 415Debug.Assert(arguments.Length >= declarations.Length); 417var builder = ArrayBuilder<IOperation>.GetInstance(arguments.Length); 419for (int i = 0; i < arguments.Length; i++) 471Debug.Assert(currentDeclarationIndex == declarations.Length); 476if (currentDeclarationIndex >= declarations.Length)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
550for (int i = 0; i < elements.Length; i++) 793if (typeArguments.Length > 0 && Format.GenericsOptions.IncludesOption(SymbolDisplayGenericsOptions.IncludeTypeParameters)) 798for (int i = 0; i < typeArguments.Length; i++) 907for (int i = 0; i < typeParam.ConstraintTypes.Length; i++)
Symbols\AbstractTypeMap.cs (19)
62var newTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(oldTypeArguments.Length); 64for (int i = 0; i < oldTypeArguments.Length; i++) 140for (int i = 0; i < customModifiers.Length; i++) 147var builder = ArrayBuilder<CustomModifier>.GetInstance(customModifiers.Length); 151for (i++; i < customModifiers.Length; i++) 166Debug.Assert(builder.Count == customModifiers.Length); 196Debug.Assert(0 <= interfaces.Length && interfaces.Length <= 2); 198if (interfaces.Length == 1) 203else if (interfaces.Length == 2) 208else if (interfaces.Length != 0) 250var paramCount = f.Signature.Parameters.Length; 295for (int i = 0; i < original.Length; i++) 303result = new TypeSymbol[original.Length]; 327var result = ArrayBuilder<TypeWithAnnotations>.GetInstance(original.Length); 349if (original.Length == 0) 353else if (original.Length == 1) 412for (int i = 0; i < original.Length; i++) 420result = new NamedTypeSymbol[original.Length];
Symbols\AliasSymbol.cs (2)
57Debug.Assert(locations.Length == 1 || (locations.IsEmpty && aliasName == "global")); // It looks like equality implementation depends on this condition. 235if ((object?)target != null && Locations.Length > 0)
Symbols\AnonymousTypes\AnonymousTypeDescriptor.cs (2)
104Debug.Assert(newFieldTypes.Length == this.Fields.Length);
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (13)
201int nTypeArguments = fields.Length - (returnsVoid ? 1 : 0); 209Debug.Assert(i == fields.Length - 2); 234var index = fields.Length - 2; 268var template = SynthesizeDelegate(parameterCount: fields.Length - 1, refKinds, returnsVoid, generation); 270Debug.Assert(typeArguments.Length == template.TypeParameters.Length); 271return typeArguments.Length == 0 ? 293Debug.Assert(typeParameters.Length == template.TypeParameters.Length); 294return typeParameters.Length == 0 ? 303int n = fields.Length; 341if (typeParameters.Length > 0) 343var typeMap = new TypeMap(typeParameters, IndexedTypeParameterSymbol.Take(typeParameters.Length), allowAlpha: true);
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
56int parameterCount = fields.Length - 1;
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (2)
40int membersCount = fields.Length * 2 + 1; 55Debug.Assert(membersCount == _members.Length);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
26int fieldsCount = properties.Length;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (5)
55int parameterCount = typeParams.Length - (voidReturnTypeOpt is null ? 1 : 0); 108parameterCount: typeDescr.Fields.Length - 1, 125var parameterCount = fields.Length - 1; 168int typeParameterCount = typeParametersToSubstitute.Length; 196var parameterCount = fields.Length - 1;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (5)
44int fieldsCount = typeDescr.Fields.Length; 78Debug.Assert(membersCount == _members.Length); 182if (this.Properties.Length == 0) 192int displayCount = Math.Min(this.Properties.Length, 10); 209if (this.Properties.Length > displayCount)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
257get { return TypeParameters.Length; }
Symbols\ArrayTypeSymbol.cs (2)
517Debug.Assert(constructedInterfaces.Length <= 2); 639Debug.Assert(lowerBounds.IsDefaultOrEmpty || (!lowerBounds.IsEmpty && (lowerBounds.Length != rank || !lowerBounds.All(b => b == 0))));
Symbols\AssemblySymbol.cs (1)
871var length = symbol.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Length;
Symbols\Attributes\AttributeData.cs (4)
515if (namedArgs.Length == 1) 558if (members.Length == 1 && members[0].Kind == SymbolKind.Property) 794for (int i = 0; i < attributes.Length; i++) 809return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_String, out string? value) ? value : null;
Symbols\Attributes\SourceAttributeData.cs (4)
47constructorArgumentsSourceIndices.Any() && constructorArgumentsSourceIndices.Length == constructorArguments.Length); 264if (parameterCount != parameters.Length) 277if (parameterIndex >= parameters.Length)
Symbols\Compilation_UsedAssemblies.cs (2)
103for (int i = (includeMainModule ? 0 : 1); i < assembly.Modules.Length; i++) 130for (int i = 1; i < SourceAssembly.Modules.Length; i++)
Symbols\Compilation_WellKnownMembers.cs (6)
415var builder = new ArrayBuilder<KeyValuePair<string, TypedConstant>>(namedArguments.Length); 872namesBuilder.AddMany(null, type.TupleElementTypesWithAnnotations.Length); 949HandleCustomModifiers(((ArrayTypeSymbol)type).ElementTypeWithAnnotations.CustomModifiers.Length, transformFlagsBuilder); 958HandleCustomModifiers(((PointerTypeSymbol)type).PointedAtTypeWithAnnotations.CustomModifiers.Length, transformFlagsBuilder); 1014HandleCustomModifiers(customModifiers.Length, transformFlagsBuilder); 1024HandleCustomModifiers(twa.CustomModifiers.Length, transformFlagsBuilder);
Symbols\ConstraintsHelper.cs (13)
146if (constraintTypes.Length == 0) 326if ((constraintTypes.Length == 0) && (deducedBaseType.SpecialType == SpecialType.System_Object)) 329Debug.Assert(interfaces.Length == 0); 352if (typeParameters.Length == 0 || constraintClauses.Count == 0) 381if (typeParameters.Length == 0) 417int arity = typeParameters.Length; 419Debug.Assert(constraintClauses.Length == arity); 447builder = ArrayBuilder<TypeParameterConstraintClause>.GetInstance(constraintClauses.Length); 763switch (array.Length) 900Debug.Assert(typeParameters.Length == typeArguments.Length); 901Debug.Assert(typeParameters.Length > 0); 904int n = typeParameters.Length;
Symbols\ConstructedNamedTypeSymbol.cs (4)
71Debug.Assert(constructedFrom.Arity == typeArgumentsWithAnnotations.Length); 98int n = typeParameters.Length; 99Debug.Assert(typeArguments.Length == n); 100Debug.Assert(typeArguments.Length > 0);
Symbols\ExtendedErrorTypeSymbol.cs (2)
239if ((object?)oldError != null && !oldError._candidateSymbols.IsDefault && oldError._candidateSymbols.Length == 1) 268if ((object?)oldError != null && !oldError._candidateSymbols.IsDefault && oldError._candidateSymbols.Length > 0)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (17)
356if (_parameters.Length > 0) 358var paramMergedTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(_parameters.Length); 359for (int i = 0; i < _parameters.Length; i++) 406if (_parameters.Length > 0) 408var paramTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(_parameters.Length); 451Debug.Assert(originalParameters.Length == substitutedParameterTypes.Length); 452Debug.Assert(substitutedRefCustomModifiers.IsDefault || originalParameters.Length == substitutedRefCustomModifiers.Length); 459if (originalParameters.Length > 0) 461var paramsBuilder = ArrayBuilder<FunctionPointerParameterSymbol>.GetInstance(originalParameters.Length); 462for (int i = 0; i < originalParameters.Length; i++) 498Debug.Assert(parameterRefCustomModifiers.IsDefault || parameterRefCustomModifiers.Length == parameterTypes.Length); 545Debug.Assert(retAndParamTypes.Length > 0); 609var paramTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(Parameters.Length); 654var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(modifiersToSearch.Length);
Symbols\MemberSignatureComparer.cs (5)
643Debug.Assert(typeParameters1.Length == typeParameters2.Length); 645int arity = typeParameters1.Length; 686if ((constraintTypes1.Length == 0) && (constraintTypes2.Length == 0))
Symbols\MemberSymbolExtensions.cs (8)
205count += methodReturnType.CustomModifiers.Length + method.RefCustomModifiers.Length; 211count += paramType.CustomModifiers.Length + param.RefCustomModifiers.Length; 254count += type.CustomModifiers.Length + property.RefCustomModifiers.Length; 260count += paramType.CustomModifiers.Length + param.RefCustomModifiers.Length;
Symbols\MergedNamespaceSymbol.cs (4)
83Debug.Assert(namespacesToMerge.Length != 0); 85return (namespacesToMerge.Length == 1 && nameOpt == null) 103Debug.Assert(ns.ConstituentNamespaces.Length == 1); 176childCount += ns.GetMembersUnordered().Length;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (8)
116if (dynamicTransformFlags.Length == 0) 128if ((object)transformedType != null && (!checkLength || decoder._index == dynamicTransformFlags.Length)) 307if (!HandleCustomModifiers(arrayType.ElementTypeWithAnnotations.CustomModifiers.Length)) 330if (!HandleCustomModifiers(pointerType.PointedAtTypeWithAnnotations.CustomModifiers.Length)) 400if (!decoder.HandleCustomModifiers(refCustomModifiers.Length) 402|| !decoder.HandleCustomModifiers(typeWithAnnotations.CustomModifiers.Length)) 423private bool HasFlag => _index < _dynamicTransformFlags.Length || !_checkLength; 425private bool PeekFlag() => _index < _dynamicTransformFlags.Length && _dynamicTransformFlags[_index];
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (2)
314var n = candidateCustomModifiers.Length; 315if (targetCustomModifiers.Length != n)
Symbols\Metadata\PE\MetadataDecoder.cs (3)
78if (typeParameters.Length <= position) 239for (i = 0; i < assemblies.Length; i++) 251int count = arguments.Length;
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
45else if (decoder._index == transformFlags.Length) 116if (_index >= _transformFlags.Length)
Symbols\Metadata\PE\NullableTypeDecoder.cs (1)
66(nullableTransformFlags.IsDefault || position == nullableTransformFlags.Length))
Symbols\Metadata\PE\PEEventSymbol.cs (2)
383if (_addMethod.ExplicitInterfaceImplementations.Length == 0 && 384_removeMethod.ExplicitInterfaceImplementations.Length == 0)
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
314typeSymbol = DynamicTypeDecoder.TransformType(typeSymbol, customModifiersArray.Length, _handle, moduleSymbol);
Symbols\Metadata\PE\PEMethodSymbol.cs (6)
537return _lazyTypeParameters.Length; 549return TypeParameters.Length; 640return _lazySignature.Parameters.Length; 653return Parameters.Length; 1119if (parameters.Length == 0) 1190if (Parameters.Length == 0)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (12)
958if (instanceIndex < uncommon.lazyInstanceEnumFields.Length && uncommon.lazyInstanceEnumFields[instanceIndex].Handle == fieldDef) 965if (staticIndex < staticFields.Length && staticFields[staticIndex].Kind == SymbolKind.Field) 980Debug.Assert(instanceIndex == uncommon.lazyInstanceEnumFields.Length); 981Debug.Assert(staticIndex == staticFields.Length || staticFields[staticIndex].Kind != SymbolKind.Field); 1070for (; index < members.Length; index++) 1090if (index >= members.Length || members[index].Kind != SymbolKind.Method) 1118if (index == members.Length || members[index].Kind != SymbolKind.Method) 1535if (!candidates.IsDefault && candidates.Length == 1) 2442int n = members.Length; 2464int n = members.Length; 2745int n = containingTypeParameters.Length; 2760var nestedTypeMap = new TypeMap(nestedTypeParameters, IndexedTypeParameterSymbol.Take(nestedTypeParameters.Length), allowAlpha: false);
Symbols\Metadata\PE\PENamespaceSymbol.cs (1)
84var builder = ArrayBuilder<Symbol>.GetInstance(memberTypes.Length + lazyNamespaces.Count);
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
434refCustomModifiers.NullToEmpty().Length + type.CustomModifiers.Length, 763for (int i = 0; i < parameters.Length; i++) 877var builder = ArrayBuilder<int>.GetInstance(paramNames.Length);
Symbols\Metadata\PE\PEPropertySymbol.cs (3)
296originalPropertyType = DynamicTypeDecoder.TransformType(originalPropertyType, typeCustomModifiers.Length, handle, moduleSymbol, _refKind); 790if (((object)_getMethod == null || _getMethod.ExplicitInterfaceImplementations.Length == 0) && 791((object)_setMethod == null || _setMethod.ExplicitInterfaceImplementations.Length == 0))
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
270if (!modifiers.IsDefaultOrEmpty && modifiers.Length > 1)
Symbols\Metadata\PE\SymbolFactory.cs (4)
110int argumentIndex = refersToNoPiaLocalType.Length - 1; 142Debug.Assert(typeParameters.Length > 0); 144if (typeParameters.Length != arguments.Length)
Symbols\Metadata\PE\TupleTypeDecoder.cs (5)
75_namesIndex = elementNames.IsDefault ? 0 : elementNames.Length; 292int tupleCardinality = decodedType.TupleElementTypesWithAnnotations.Length; 297Debug.Assert(elementNames.IsDefault || elementNames.Length == tupleCardinality); 313var decodedArgs = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArgs.Length); 316for (int i = typeArgs.Length - 1; i >= 0; i--)
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
50Debug.Assert(module.GetReferencedAssemblies().Length == 0); 186Debug.Assert(module.GetReferencedAssemblies().Length == 0);
Symbols\MethodSymbol.cs (4)
314return this.Parameters.Length; 874if (typeArguments.Length != this.Arity) 1163AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\MethodSymbolExtensions.cs (1)
86Debug.Assert(method.IsGenericMethod == (typeArguments.Length > 0));
Symbols\MissingCorLibrarySymbol.cs (1)
65Debug.Assert(module.GetReferencedAssemblies().Length == 0);
Symbols\ModuleSymbol.cs (1)
246if (referencedAssemblyIndex < referencedAssemblies.Length)
Symbols\NamedTypeSymbol.cs (8)
185if (methods.Length != 1) 874int count = typeArguments.Length; 877Debug.Assert(count == otherTypeArguments.Length); 1043if (typeParameters.Length > 0) 1048for (int i = 0; i < typeArgumentsA.Length; i++) 1204if (typeArguments.Length != this.Arity) 1233if (current.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Length != 0) 1300int count = TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Length;
Symbols\NamespaceSymbol.cs (2)
229if (types.Length == 0) 234Debug.Assert(types.Length == 1);
Symbols\NonMissingModuleSymbol.cs (1)
74get { return GetUnifiedAssemblies().Length > 0; }
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
500Debug.Assert(overriddenMembers.Length == 0);
Symbols\ParameterSignature.cs (2)
33if (parameters.Length == 0) 41for (int parm = 0; parm < parameters.Length; ++parm)
Symbols\PropertyOrEventSymbolExtensions.cs (1)
40if (implementedAccessors.Length == 0)
Symbols\PropertySymbol.cs (1)
113return this.Parameters.Length;
Symbols\PublicModel\Symbol.cs (2)
38int n = typeArguments.Length; 39if (!typeArgumentNullableAnnotations.IsDefault && typeArgumentNullableAnnotations.Length != n)
Symbols\ReducedExtensionMethodSymbol.cs (3)
176for (int i = 0; i < typeArgsForConstraintsCheck.Length; i++) 184for (; i < typeArgsForConstraintsCheck.Length; i++) 559int count = reducedFromParameters.Length;
Symbols\ReferenceManager.cs (19)
334Debug.Assert(assemblyModules.Length == referencedModulesReferences.Length + 1); 336for (int i = 1; i < assemblyModules.Length; i++) 399Debug.Assert(bindingResult.Length == allAssemblyData.Length); 412modules.Length, 413referencedAssemblies.Length, 461int totalReferencedAssemblyCount = allAssemblyData.Length - 1; 650int moduleCount = modules.Length; 675var filteredReferencedAssemblies = new AssemblyIdentity[referencedAssemblies.Length - linkedUnderlyingReferences]; 678for (int k = 0; k < underlyingReferencedAssemblySymbols.Length; k++) 692int refsCount = referencedAssemblies.Length; 728int moduleCount = modules.Length; 769Debug.Assert(moduleSymbols.Length == 1 + modules.Length); 771var moduleReferencesBuilder = (moduleSymbols.Length > 1) ? ArrayBuilder<ModuleReferences<AssemblySymbol>>.GetInstance() : null; 774for (int moduleIndex = 0; moduleIndex < moduleSymbols.Length; moduleIndex++) 1103Debug.Assert(sourceReferencedAssemblies.Length == sourceReferencedAssemblySymbols.Length); 1116for (int i = 0; i < sourceReferencedAssemblies.Length; i++) 1124for (int i = 1; i < modules.Length; i++)
Symbols\Retargeting\RetargetingAssemblySymbol.cs (2)
108ModuleSymbol[] modules = new ModuleSymbol[underlyingAssembly.Modules.Length]; 112for (int i = 1; i < underlyingAssembly.Modules.Length; i++)
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
120for (int i = 0; i < impls.Length; i++)
Symbols\Retargeting\RetargetingMethodSymbol.cs (2)
167int count = list.Length; 323for (int i = 0; i < impls.Length; i++)
Symbols\Retargeting\RetargetingModuleSymbol.cs (6)
198Debug.Assert(referencedAssemblySymbols.Length == moduleReferences.Identities.Length); 199Debug.Assert(referencedAssemblySymbols.Length <= underlyingBoundReferences.Length); // Linked references are filtered out. 202for (i = 0, j = 0; i < referencedAssemblySymbols.Length; i++, j++) 237while (j < underlyingBoundReferences.Length && underlyingBoundReferences[j].IsLinked) 242Debug.Assert(j == underlyingBoundReferences.Length);
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (2)
80var builder = ArrayBuilder<Symbol>.GetInstance(underlyingMembers.Length); 118var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(underlyingMembers.Length);
Symbols\Retargeting\RetargetingPropertySymbol.cs (2)
104int count = list.Length; 180for (int i = 0; i < impls.Length; i++)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (6)
612if (assembliesToEmbedTypesFrom.Length > 0) 717for (int i = 0; i < oldModifiers.Length; i++) 727newModifiers = ArrayBuilder<CustomModifier>.GetInstance(oldModifiers.Length); 741Debug.Assert(newModifiers == null || newModifiers.Count == oldModifiers.Length); 1202var newArguments = ArrayBuilder<TypedConstant>.GetInstance(constructorArguments.Length); 1271var newArguments = ArrayBuilder<KeyValuePair<string, TypedConstant>>.GetInstance(namedArguments.Length);
Symbols\SignatureOnlyMethodSymbol.cs (1)
69public override int Arity { get { return _typeParameters.Length; } }
Symbols\Source\CustomModifierUtils.cs (3)
119Debug.Assert(sourceParameters.Length == destinationParameters.Length); 125int numParams = destinationParameters.Length;
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
399int numParams = implementedMemberParameters.Length;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (3)
316Debug.Assert(boundAttributes.Length == allAttributeSyntaxNodes.Length); 403compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length));
Symbols\Source\LambdaSymbol.cs (3)
327Debug.Assert(parameterTypes.Length == parameterRefKinds.Length); 344var numDelegateParameters = parameterTypes.Length;
Symbols\Source\LocalFunctionSymbol.cs (1)
308public override int Arity => TypeParameters.Length;
Symbols\Source\ParameterHelpers.cs (1)
398if (parameters.Length > 0 && compilation.ShouldEmitNullableAttributes(container))
Symbols\Source\SourceAssemblySymbol.cs (21)
129ArrayBuilder<ModuleSymbol> moduleBuilder = new ArrayBuilder<ModuleSymbol>(1 + netModules.Length); 181for (int i = 1; i < _modules.Length; i++) 988if (_modules.Length > 1 && !_compilation.Options.OutputKind.IsNetModule()) 994for (int i = 1; i < _modules.Length; i++) 1026for (int i = 1; i < _modules.Length; i++) 1064if (constituent.Length > 2 || (constituent.Length == 2 && constituent[0].ContainingModule.Ordinal != 0 && constituent[1].ContainingModule.Ordinal != 0)) 1194for (int i = 0; i < appliedSourceAttributes.Length; i++) 1285for (int i = 1; i < _modules.Length; i++) 1319Debug.Assert(attributesFromNetModules.Length == netModuleNames.Length); 1321int netModuleAttributesCount = attributesFromNetModules.Length; 1392for (int i = _modules.Length - 1; i > 0; i--) 1488Debug.Assert(attributesFromNetModules.Length == netModuleNames.Length); 1490int netModuleAttributesCount = attributesFromNetModules.Length; 1602if (attributes.Length > 0) 1604if (netmoduleAttributes.Length > 0) 1627Debug.Assert(_lazyOmittedAttributeIndices == null || !_lazyOmittedAttributeIndices.Any(i => i < 0 || i >= this.GetAttributes().Length)); 1631Debug.Assert(index < this.GetAttributes().Length); 2870for (int i = _modules.Length - 1; i > 0; i--)
Symbols\Source\SourceComplexParameterSymbol.cs (6)
691for (int i = 0; i < parameters.Length; i++) 893return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_Boolean, out bool value) ? 1297parameters = ArrayBuilder<ParameterSymbol?>.GetInstance(constructorArgument.Values.Length); 1298var ordinalsBuilder = ArrayBuilder<int>.GetInstance(constructorArgument.Values.Length); 1398Debug.Assert(boundAttributes.Length == allAttributeSyntaxNodes.Length);
Symbols\Source\SourceConstructorSymbolBase.cs (4)
64if (MethodKind == MethodKind.StaticConstructor && (_lazyParameters.Length != 0) && 73if (this.IsVararg && (IsGenericMethod || ContainingType.IsGenericType || _lazyParameters.Length > 0 && _lazyParameters[_lazyParameters.Length - 1].IsParams)) 116return _lazyParameters.Length;
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
113for (int i = 0; i < invoke.Parameters.Length; i++)
Symbols\Source\SourceEventAccessorSymbol.cs (1)
201Debug.Assert(this.Locations.Length == 1);
Symbols\Source\SourceEventSymbol.cs (2)
333AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length)); 672Debug.Assert(explicitInterfaceImplementations.Length == 1);
Symbols\Source\SourceMemberContainerSymbol.cs (22)
393var partCount = declaration.Declarations.Length; 461if (ContainingType!.Locations.Length == 1 || ContainingType.IsPartial()) 1119if (declaration.Declarations.Length >= 1 && position == declaration.Declarations[0].Location.SourceSpan.Start) 1338if (Locations.Length == 1 || IsPartial) 1467if (allMembers.Length > 1) 1613if (symbols.Length == 0) 2043if (Locations.Length == 1 || IsPartial) 2251if (Locations.Length == 1 || IsPartial) 2296if (Locations.Length == 1 || IsPartial) 2763if (this.SyntaxReferences.Length <= 1) 3008for (int i = 0; i < initializers.Length; i++) 3015if (i + 1 < initializers.Length) 3020if (initializers[i].Length != 1) 3068var groupCount = declaredMembers.InstanceInitializers.Length; 3148NonTypeMembers = ArrayBuilder<Symbol>.GetInstance(declaredMembers.NonTypeMembers.Length + 1); 3477memberBuilder ??= ArrayBuilder<Symbol>.GetInstance(types.Length + 1); 3872if (Locations.Length == 1 || IsPartial) 3908if (Locations.Length == 1 || IsPartial) 3951var numParams = propertyParams.Length + (getNotSet ? 0 : 1); 3952if (numParams != methodParams.Length) 3982methodParams.Length == 1 && 4530var existingOrAddedMembers = ArrayBuilder<Symbol>.GetInstance(recordParameters.Length);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (7)
762if (overriddenMembers.Length == 0) 835if (overriddenMembers.Length > 1) 1291for (int i = 0; i < baseParameters.Length; i++) 1328for (var i = 0; i < baseParameters.Length; i++) 1454for (int i = 0; i < baseParameters.Length; i++) 1505for (int i = 0; i < baseParameters.Length; i++) 1566if (hiddenMembers.Length == 0)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
810return TypeParameters.Length;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (8)
1127Debug.Assert(namespaceSegments.Length > 0); 1133if (namespaceSegments.Length > thisNamespaceNames.Count) 1139for (var i = 0; i < namespaceSegments.Length; i++) 1341Debug.Assert(namespaceSegments.Length > 0); 1347if (namespaceSegments.Length > thisNamespaceNames.Count) 1353for (var i = 0; i < namespaceSegments.Length; i++) 1467Debug.Assert(boundAttributes.Length == allAttributeSyntaxNodes.Length);
Symbols\Source\SourceModuleSymbol.cs (1)
117return GetAssembliesToEmbedTypesFrom().Length > 0;
Symbols\Source\SourceNamedTypeSymbol.cs (25)
268return (constraintTypes.Length > 0) ? constraintTypes[ordinal] : ImmutableArray<TypeWithAnnotations>.Empty; 297return (constraintKinds.Length > 0) ? constraintKinds[ordinal] : TypeParameterConstraintKind.None; 318int arity = typeParameters.Length; 356Debug.Assert(constraints.Length == arity); 358if (results.Length == 0) 399int arity = typeParameters.Length; 438Debug.Assert(constraints.Length == arity); 440if (results.Length == 0) 499int arity = typeParameters.Length; 501Debug.Assert(constraintClauses.Length == arity); 531Debug.Assert(originalConstraintTypes.Length == mergedConstraintTypes.Count); 533for (int j = 0; j < originalConstraintTypes.Length; j++) 540builder = ArrayBuilder<TypeParameterConstraintClause>.GetInstance(constraintClauses.Length); 562if (originalConstraintTypes.Length == 0) 564if (clause.ConstraintTypes.Length == 0) 571else if (clause.ConstraintTypes.Length == 0) 606mergedConstraintTypes = ArrayBuilder<TypeWithAnnotations>.GetInstance(originalConstraintTypes.Length); 630for (int i = constraintTypes.Length - 1; i >= 0; i--) 652int arity = typeParameters.Length; 654Debug.Assert(constraintClauses.Length == arity); 679builder = ArrayBuilder<TypeParameterConstraintClause>.GetInstance(constraintClauses.Length); 721if (originalConstraintTypes.Length == 0 && clause.ConstraintTypes.Length == 0) 1567Debug.Assert(boundAttributes.Length == allAttributeSyntaxNodes.Length);
Symbols\Source\SourceNamespaceSymbol.cs (3)
159if (allMembers.Length >= 2) 296if (@namespace.ContainingAssembly.Modules.Length > 1) 331if (types.Length > 0)
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
63members.Length,
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (1)
165int result = _lazyParameters.Length;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (5)
448Debug.Assert(this.DeclaringSyntaxReferences.Length == 1); 592int arity = typeParameters1.Length; 643for (int i = 0; i < declaredConstraints.Length; i++) 900else if (isVararg && (IsGenericMethod || ContainingType.IsGenericType || Parameters.Length > 0 && Parameters[Parameters.Length - 1].IsParams))
Symbols\Source\SourceParameterSymbolBase.cs (2)
97AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
268if (explicitInterfaceImplementations.Length > 0) 270Debug.Assert(explicitInterfaceImplementations.Length == 1); 763int nPropertyParameters = propertyParameters.Length;
Symbols\Source\SourcePropertySymbolBase.cs (5)
1373compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + RefCustomModifiers.Length, _refKind)); 1685Debug.Assert(boundAttributes.Length == allAttributeSyntaxNodes.Length); 1761if (parameters.Length > 0)
Symbols\Source\SourceSimpleParameterSymbol.cs (1)
29Debug.Assert(locations.Length <= 1);
Symbols\Source\SourceTypeParameterSymbol.cs (5)
257if (constraintTypes.Length == 0) 794Debug.Assert(overriddenTypeParameters.Length == overridingTypeParameters.Length); 852Debug.Assert(explicitImplementations.Length <= 1); 855return (explicitImplementations.Length > 0) ? explicitImplementations[0] : null;
Symbols\Source\TypeParameterConstraintClause.cs (4)
136Debug.Assert(constraintClauses.Length == typeParameters.Length); 201Debug.Assert(constraintClauses.Length == typeParameters.Length);
Symbols\SubstitutedMethodSymbol.cs (2)
335int count = unsubstitutedParameters.Length; 412for (int i = 0; i < typeArguments.Length; i++)
Symbols\SubstitutedNamedTypeSymbol.cs (1)
344var builder = ArrayBuilder<Symbol>.GetInstance(originalMembers.Length);
Symbols\SubstitutedPropertySymbol.cs (1)
157int count = unsubstitutedParameters.Length;
Symbols\Symbol.cs (1)
935if (this.IsImplicitlyDeclared && declaringReferences.Length == 0)
Symbols\Symbol_Attributes.cs (12)
315int totalAttributesCount = attributesToBind.Length; 324Debug.Assert(binders.Length == attributesToBind.Length); 467int totalAttributesCount = attributesToBind.Length; 469Debug.Assert(totalAttributesCount == boundAttributes.Length); 783for (int i = 0; i < boundAttributeTypes.Length; i++) 819for (int i = 0; i < attributeTypes.Length; i++) 847Debug.Assert(binders.Length == boundAttributes.Length); 848Debug.Assert(attributeSyntaxList.Length == boundAttributes.Length); 850int totalAttributesCount = boundAttributes.Length;
Symbols\SymbolDistinguisher.cs (1)
166if (syntaxReferences.Length > 0)
Symbols\SymbolExtensions.cs (1)
35Debug.Assert(type.TypeParameters.IsEmpty == (typeArguments.Length == 0));
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
41public override bool IsIndexer => Parameters.Length > 0;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (3)
53if (ParameterCount != _positionalMembers.Length) 60var statementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(_positionalMembers.Length + 1); 61for (int i = 0; i < _positionalMembers.Length; i++)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
182for (var i = 0; i < printableMembers.Length; i++)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (3)
30Debug.Assert(accessor.Locations.Length <= 1); 104Debug.Assert(accessor.Locations.Length <= 1); 117Debug.Assert(accessor.Locations.Length <= 1);
Symbols\Synthesized\SynthesizedContainer.cs (1)
170public override int Arity => TypeParameters.Length;
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (1)
57Debug.Assert(_constructors.Length == AttributeDescription.NativeIntegerAttribute.Signatures.Length);
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (1)
61Debug.Assert(_constructors.Length == AttributeDescription.NullableAttribute.Signatures.Length);
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (1)
45Debug.Assert(_constructors.Length == AttributeDescription.NullableContextAttribute.Signatures.Length);
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (1)
45Debug.Assert(_constructors.Length == AttributeDescription.NullablePublicOnlyAttribute.Signatures.Length);
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
65AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type, typeWithAnnotations.CustomModifiers.Length));
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
236get { return TypeParameters.Length; }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
46get { return this.TypeParameters.Length; }
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (4)
437if (_parameters.Length == other._parameters.Length && 442for (int i = 0; i < _parameters.Length; i++) 458return Hash.Combine(_name, Hash.Combine(_containingType, _parameters.Length));
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
158AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
195Debug.Assert(newOwner.IsTupleType && newOwner.TupleElementTypesWithAnnotations.Length > TupleElementIndex);
Symbols\Tuples\TupleFieldSymbol.cs (2)
333Debug.Assert(newOwner.TupleElements.Length == this._containingTuple.TupleElements.Length);
Symbols\Tuples\TupleTypeSymbol.cs (19)
43Debug.Assert(elementNames.IsDefault || elementTypesWithAnnotations.Length == elementNames.Length); 46int numElements = elementTypesWithAnnotations.Length; 76int numElements = elementTypes.Length; 129Debug.Assert(TupleElementTypesWithAnnotations.Length == newElementTypes.Length); 167Debug.Assert(newElementNames.IsDefault || this.TupleElementTypesWithAnnotations.Length == newElementNames.Length); 234Debug.Assert(chainedTupleTypeOpt is null == elementTypes.Length < ValueTupleRestPosition); 236int numElements = elementTypes.Length; 289int sourceLength = sourceNames.Length; 291Debug.Assert(allMissing || destinationNames.Length == sourceLength); 576var elementsMatchedByFields = ArrayBuilder<bool>.GetInstance(elementTypes.Length, fillWithValue: false); 577var members = ArrayBuilder<Symbol>.GetInstance(currentMembers.Length); 866Debug.Assert(names1.Length == names2.Length); 986var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(ValueTupleRestPosition - 1 + extensionTupleElementTypes.Length); 1012var builder = ArrayBuilder<FieldSymbol>.GetInstance(TupleElementTypesWithAnnotations(tuple).Length, fillWithValue: null!); 1058for (int i = members.Length - 1; i >= 0; i--)
Symbols\TypeMap.cs (6)
73for (int i = 0; i < typeParameters.Length; i++) 105if (oldTypeParameters.Length == 0) 178for (int i = currentParameters.Length - 1; i >= 0; i--) 204Debug.Assert(from.Length == to.Length); 206for (int i = 0; i < from.Length; i++)
Symbols\TypeSymbol.cs (4)
345for (int i = interfaces.Length - 1; i >= 0; i--) 359for (int i = baseInterfaces.Length - 1; i >= 0; i--) 417var resultBuilder = new MultiDictionary<NamedTypeSymbol, NamedTypeSymbol>(declaredInterfaces.Length, SymbolEqualityComparer.CLRSignature, SymbolEqualityComparer.ConsiderEverything); 569return TupleElementTypesWithAnnotations.Length == targetCardinality;
Symbols\TypeSymbolExtensions.cs (6)
866for (i = 0; i < fields.Length - 1; i++) 897for (i = 0; i < typeArguments.Length - 1; i++) 1397TypeArgumentsWithAnnotationsNoUseSiteDiagnostics: { Length: 1 } arguments, 1408TypeArgumentsWithAnnotationsNoUseSiteDiagnostics: { Length: 1 } arguments, 1419TypeArgumentsWithAnnotationsNoUseSiteDiagnostics: { Length: 1 } arguments, 1616for (int i = 0; i < typeArguments.Length; i++)
Symbols\TypeUnification.cs (12)
211if (t1.CustomModifiers.Length < t2.CustomModifiers.Length && 212t1.CustomModifiers.SequenceEqual(t2.CustomModifiers.Take(t1.CustomModifiers.Length))) 216customModifiers: ImmutableArray.Create(t2.CustomModifiers, t1.CustomModifiers.Length, t2.CustomModifiers.Length - t1.CustomModifiers.Length))); 230if (t2.CustomModifiers.Length < t1.CustomModifiers.Length && 231t2.CustomModifiers.SequenceEqual(t1.CustomModifiers.Take(t2.CustomModifiers.Length))) 235customModifiers: ImmutableArray.Create(t1.CustomModifiers, t2.CustomModifiers.Length, t1.CustomModifiers.Length - t2.CustomModifiers.Length)));
Symbols\TypeWithAnnotations.cs (1)
678else if (position < transforms.Length)
Symbols\UnboundGenericType.cs (1)
54string name = (i < typeParameters.Length) ? typeParameters[i].Name : string.Empty;
Symbols\VarianceSafety.cs (1)
486if (syntaxRefs.Length == 0)
Syntax\NullableContextStateMap.cs (4)
53for (int i = 1; i < contexts.Length; i++) 80Debug.Assert(index < _contexts.Length); 85Debug.Assert(index == _contexts.Length - 1 || position < _contexts[index + 1].Position); 122if (index >= _contexts.Length)
Utilities\InterceptableLocation.cs (1)
64Debug.Assert(checksum.Length == ContentHashLength);
Utilities\TypeSymbolExtensions.cs (1)
76=> typeWithAnnotations.CustomModifiers.Length + typeWithAnnotations.Type.CustomModifierCount();
Utilities\ValueSetFactory.NumericValueSet.cs (20)
39Debug.Assert(intervals.Length == 0 || tc.Related(GreaterThanOrEqual, intervals[0].first, tc.MinValue)); 40for (int i = 0, n = intervals.Length; i < n; i++) 54public bool IsEmpty => _intervals.Length == 0; 68return _tc.ToConstantValue(this._intervals[this._intervals.Length - 1].last); 78return _intervals.Length > 0 && _tc.Related(relation, _intervals[0].first, value); 81return _intervals.Length > 0 && _tc.Related(relation, _intervals[_intervals.Length - 1].last, value); 83return anyIntervalContains(0, _intervals.Length - 1, value); 111if (_intervals.Length == 0) 118return _tc.Related(relation, _intervals[_intervals.Length - 1].last, value); 123return _intervals.Length == 1 && _tc.Related(Equal, _intervals[0].first, value) && _tc.Related(Equal, _intervals[0].last, value); 133if (_intervals.Length == 0) 145int lastIndex = _intervals.Length - 1; 172while (l < left.Length && r < right.Length) 249while (l < left.Length && r < right.Length) 271while (l < left.Length) 278while (r < right.Length) 326return Hash.Combine(Hash.CombineValues(_intervals), _intervals.Length);
Microsoft.CodeAnalysis.CSharp.CodeStyle (45)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
97if (containingType.AllInterfaces.Length > 0) 101if (containingType.DeclaringSyntaxReferences.Length > 1)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
91{ Kind: SymbolKind.Local, DeclaringSyntaxReferences: { Length: 1 } syntaxRefs })
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
113if (ev.AddMethod is { DeclaringSyntaxReferences.Length: 0 })
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (4)
144if (invokedMethod.TypeArguments.Length != invokedTypeArguments.Count) 149if (lambdaMethod.Parameters.Length != invokedMethod.Parameters.Length) 158for (int i = 0, n = lambdaMethod.Parameters.Length; i < n; i++)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
63for (int i = firstUnreachableStatementIndex + 1, n = siblingStatements.Length; i < n; i++)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
949if (originalCreateMethod.Parameters.Length == 0) 954return arguments.Count == originalCreateMethod.Parameters.Length;
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
66Parameters.Length: 1,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
168if (type is not INamedTypeSymbol { IsTupleType: true, TupleElements.Length: >= 2 } tupleTypeOpt)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (1)
32var builder = new FixedSizeArrayBuilder<(DiagnosticDescriptor, IOption2)>(_helpers.Length);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (3)
104if (invocationOperation.Arguments.Length != 1) 126if (propertyReference.Arguments.Length != 1) 145if (arrayElementReference.Indices.Length != 1)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
106return invocation.Arguments.Length switch
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (5)
75method.Parameters.Length == 1 && 95method.Parameters.Length == 2 && 113method.Parameters.Length == 1 && 136p.Parameters.Length == 1 && 151m.Parameters.Length == 1 &&
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
296if (primaryConstructor.Parameters.Length == 0 && primaryConstructorDeclaration.AttributeLists.Count == 0)
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (4)
74if (arrayCreationOperation.DimensionSizes.Length > 1) 95if (arrayCreationOperation.IsImplicit && elements.Length == 0) 152for (var i = 0; i < arrayCreationElements.Length;) 199var length = Math.Min(arrayCreationElements.Length - startIndex, 4);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (2)
46if (tupleType.TupleElements.Length != tuple.Arguments.Count) 157containingType.TypeArguments.Length == 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
56if (leadingDirectives.Length == 0) 59return closeBraceLeadingDirectives.Length == 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
30if (results.Length > 0) 443if (semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken).Symbol is IMethodSymbol member && index < member.Parameters.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
571if (directives.Length > 0) 825method.Parameters.Length > 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (8)
633if (namedCastedType.TypeArguments.Length != 1 && originalNamedConvertedType.TypeArguments.Length != 1) 1157if (oldInterpolationOperation.Parts.Length != newInterpolationOperation.Parts.Length) 1160for (int i = 0, n = oldInterpolationOperation.Parts.Length; i < n; i++) 1454if (originalParameters.Length != rewrittenParameters.Length) 1457for (var i = 0; i < originalParameters.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
226if (memberGroup.Length != 1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (59)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
55using var _ = ArrayBuilder<TextSpan>.GetInstance(diagnostics.Length, out var spans);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
189if (GetBlockOfMethodBody(operation) is not { Operations.Length: int opLength } || 190opLength != properties.Length) 231if (GetBlockOfMethodBody(operation) is not { Operations.Length: int opLength } || 232opLength != fields.Length)
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
64Debug.Assert(diagnostics.Length == 1);
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (4)
174if (symbol is ILocalSymbol { DeclaringSyntaxReferences.Length: > 0 } local) 184else if (symbol is IFieldSymbol { IsImplicitlyDeclared: false, DeclaringSyntaxReferences.Length: > 0 } field) 202else if (symbol is IPropertySymbol { DeclaringSyntaxReferences.Length: > 0 } property) 230if (index >= 0 && index < method.Parameters.Length)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
364if (matches.Length > 0 && forceTrailingComma) 473Contract.ThrowIfTrue(expressions.Length >= 2 && match.UseSpread);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (3)
91var postMatches = CreateMatches(dummyObjectCreation.ArgumentList.Arguments, analysisResult.PostMatches, index: preMatches.Length); 111for (int i = 0, n = matches.Length; i < n; i++) 160for (int i = 1, n = matches.Length; i < n; i++)
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (3)
40objectCreation, nodesAndTokens, addTrailingComma: matches.Length > 0, static (_, expression) => expression); 42for (var i = 0; i < matches.Length; i++) 58if (i < matches.Length - 1)
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (3)
48currentMethod.Parameters.Length == originalMethod.Parameters.Length && 80for (int i = 0, n = currentMethod.Parameters.Length - 1; i < n; i++)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (3)
178Debug.Assert(elements.Length == parensDesignation.Variables.Count); 180using var _ = ArrayBuilder<ArgumentSyntax>.GetInstance(elements.Length, out var builder); 181for (var i = 0; i < elements.Length; i++)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
60List<ExpressionSyntax> references)>(diagnostics.Length);
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (2)
80for (var i = 0; i < matches.Length; i++) 93if (i < matches.Length - 1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
190if (triviaToMove.Length > 0) 206for (var i = leadingTrivia.Length - 1; i >= 0; i--)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
144builder.Capacity = initializer.ElementValues.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
84if (attribute.ConstructorArguments.Length == 0 && attribute.NamedArguments.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (2)
63var isExplicit = method.ExplicitInterfaceImplementations.Length > 0; 110if (method.ExplicitInterfaceImplementations.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
273if (info.Context.ReuseSyntax && symbol.DeclaringSyntaxReferences.Length == 1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
151if (attributes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
129if (members.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (2)
92var isExplicit = method.ExplicitInterfaceImplementations.Length > 0; 114if (method.ExplicitInterfaceImplementations.Length == 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (2)
50var result = new FixedSizeArrayBuilder<ParameterSyntax>(parameterDefinitions.Length); 124if (attributes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (2)
27=> property.IsIndexer || property.Parameters.Length == 0; 150if (attributes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\TypeParameterGenerator.cs (1)
21return typeParameters.Length == 0
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (3)
193if (symbol.TypeParameters.Length == 0) 204? Enumerable.Repeat((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length) 231if (symbol.IsTupleType && symbol.TupleElements.Length >= 2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (11)
452var constructors = type.InstanceConstructors.Where(m => m.Parameters.Length > index); 464var constructors = type.InstanceConstructors.Where(m => m.Parameters.Length > index); 570.Where(p => p.IsIndexer && p.Parameters.Length > index); 619if (method.TypeArguments.Length == 0) 706if (inferredNamedType.TypeArguments.Length == returnNamedType.TypeArguments.Length) 708for (int i = 0, n = inferredNamedType.TypeArguments.Length; i < n; i++) 754var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length; 791if (index < parameterSet.Length) 1994return memberType is INamedTypeSymbol namedType && namedType.TypeArguments.Length == 1 2255return inferredFutureUsage.Length > 0 ? inferredFutureUsage[0].InferredType : Compilation.ObjectType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\CSharpInitializeParameterService.cs (1)
84for (int i = 0, n = tupleLeft.Elements.Length; i < n; i++)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (13)
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (13)
2304CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2329CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2354CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2586CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2666CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2732CodeActionsVerifier = codeActions => Assert.Equal(4, codeActions.Length), 2792CodeActionsVerifier = codeActions => Assert.Equal(4, codeActions.Length), 2882CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2970CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 3017CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 3083CodeActionsVerifier = codeActions => Assert.Equal(2, codeActions.Length), 3145CodeActionsVerifier = codeActions => Assert.Equal(2, codeActions.Length), 10501CodeActionsVerifier = codeActions => Assert.Equal(2, codeActions.Length),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (14)
CommandLineTests.cs (14)
733Assert.Equal(3, args.Errors.Length); 822Assert.Equal(1, parsedArgs.Errors.Length); 826Assert.Equal(1, parsedArgs.Errors.Length); 830Assert.Equal(1, parsedArgs.Errors.Length); 835Assert.Equal(1, parsedArgs.Errors.Length); 840Assert.Equal(1, parsedArgs.Errors.Length); 845Assert.Equal(0, parsedArgs.Errors.Length); 1536Assert.Equal(1, parsedArgs.SourceFiles.Length); 1920Assert.Equal(1, parsedArgs.Errors.Length); 2634Assert.Equal(2, parsedArgs.MetadataReferences.Length); 2638Assert.Equal(2, parsedArgs.MetadataReferences.Length); 2648Assert.Equal(2, parsedArgs.MetadataReferences.Length); 2658Assert.Equal(2, parsedArgs.MetadataReferences.Length); 2668Assert.Equal(4, parsedArgs.MetadataReferences.Length);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\StringCopyPasteHelpers.cs (1)
544Contract.ThrowIfTrue(spans.Length == 0);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
CodeActions\PullMemberUp\CSharpPullMemberUpTests.cs (2)
46if (actions.Length == 1) 51else if (actions.Length > 1)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
98if (actions.Length > 0) 212if (actions.Length > 0)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
405Assert.Equal(3, dataSnapShot.Length);
NavigateTo\NavigateToSearcherTests.cs (3)
58if (results.Length > 0) 80if (results.Length > 0) 108if (results.Length > 0)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (1)
245Assert.Equal(2, mem20_2.Parameters.Length);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (46)
CodeGen\CodeGenDeconstructTests.cs (5)
268Assert.Equal(2, nested.Length); 1118Assert.Equal(2, nested.Length); 2298Assert.Equal(2, nested.Length); 2311Assert.Equal(2, nested.Length); 4049Assert.Equal(2, nested.Length);
CodeGen\CodeGenFunctionPointersTests.cs (2)
707Assert.Equal(length, customMods.Length); 714Assert.Equal(2, customMods.Length);
CodeGen\CodeGenLocalFunctionTests.cs (7)
3159Assert.Equal(1, goo.Parameters.Length); 3160Assert.Equal(2, bar.Parameters.Length); 3211Assert.Equal(2, inner.Parameters.Length); 3212Assert.Equal(1, middle.Parameters.Length); 3213Assert.Equal(0, outer.Parameters.Length); 3316Assert.Equal(2, goo.Parameters.Length); 3317Assert.Equal(3, bar.Parameters.Length);
CodeGen\CodeGenTupleTest.cs (29)
11681Assert.Equal(parameters1.Length, parameters2.Length); 11682for (int j = 0; j < parameters1.Length; j++) 20453Assert.Equal(2, c1Interfaces.Length); 20454Assert.Equal(3, c1AllInterfaces.Length); 20465Assert.Equal(2, c2Interfaces.Length); 20466Assert.Equal(3, c2AllInterfaces.Length); 20477Assert.Equal(2, c3Interfaces.Length); 20478Assert.Equal(2, c3AllInterfaces.Length); 20488Assert.Equal(2, c4Interfaces.Length); 20489Assert.Equal(4, c4AllInterfaces.Length); 20501Assert.Equal(2, members.Length); 20503Assert.Equal(1, cMabImplementations.Length); 20506Assert.Equal(1, cMcdImplementations.Length); 20669Assert.Equal(2, c1Interfaces.Length); 20670Assert.Equal(3, c1AllInterfaces.Length); 20681Assert.Equal(2, c2Interfaces.Length); 20682Assert.Equal(3, c2AllInterfaces.Length); 20693Assert.Equal(2, c3Interfaces.Length); 20694Assert.Equal(2, c3AllInterfaces.Length); 20704Assert.Equal(2, c4Interfaces.Length); 20705Assert.Equal(4, c4AllInterfaces.Length); 20717Assert.Equal(2, members.Length); 20719Assert.Equal(1, cMabImplementations.Length); 20722Assert.Equal(1, cMcdImplementations.Length); 20753Assert.Equal(2, c3Interfaces.Length); 20754Assert.Equal(2, c3AllInterfaces.Length); 20764Assert.Equal(1, cMabImplementations.Length); 20767Assert.Equal(1, cMcdImplementations.Length);
CodeGen\IndexAndRangeTests.cs (1)
41Assert.Equal(2, symbol.Parameters.Length);
Emit\EmitMetadataTests.cs (2)
2380Assert.Equal(2, sections.Length); 2518Assert.Equal(1, sections.Length);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Emit\EditAndContinue\SymbolMatcherTests.cs (2)
88Assert.True(members.Length > 10); 110int n = members.Length;
PDB\PortablePdbTests.cs (2)
208Assert.Equal(64, checksumData.Checksum.Length); 269Assert.Equal(48, checksumData.Checksum.Length);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (86)
Attributes\AttributeTests.cs (7)
1428Assert.Equal(8, attrs.Length); 5724Assert.Equal(0, args.Length); 7544Assert.Equal(0, info.CandidateSymbols.Length); 7585Assert.Equal(0, info.CandidateSymbols.Length); 8680Assert.Equal(0, assembly.GetAttributes().Length); 8723Assert.Equal(0, assembly.GetAttributes().Length); 8770Assert.Equal(0, assembly.GetAttributes().Length);
Attributes\AttributeTests_Assembly.cs (10)
872Assert.Equal(1, attrs.Length); 895Assert.Equal(1, attrs.Length); 1084Assert.Equal(4, attrs.Length); 1126Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length); 1205Assert.Equal(2, attrs.Length); 1241Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length); 1378Assert.Equal(5, attrs.Length); 1427Assert.Equal(5, attrs.Length); 1437Assert.Equal(1, attrs.Length); 1446Assert.Equal(5, attrs.Length);
Attributes\AttributeTests_CallerInfoAttributes.cs (1)
2300Assert.Equal(2, arguments.Length);
Attributes\AttributeTests_Dynamic.cs (2)
544Assert.Equal(expectedTransformFlags.Length, actualTransformFlags.Length); 546for (int i = 0; i < actualTransformFlags.Length; i++)
Diagnostics\DiagnosticAnalyzerTests.cs (2)
3975var expectedCount = additionalFilesHaveSamePaths ? additionalFiles.Length : 1; 3986if (!additionalFilesHaveSamePaths || fileIndex == additionalFiles.Length)
Diagnostics\GetDiagnosticsTests.cs (1)
855Assert.Equal(22, group2.Length);
FieldKeywordTests.cs (2)
8922for (int propertyIndex = 0; propertyIndex < properties.Length; propertyIndex++) 8929Assert.Equal(fields.Length, fieldIndex);
FirstClassSpanTests.cs (1)
2858Assert.Equal(2, casts.Length);
OverloadResolutionPriorityTests.cs (3)
695Assert.Equal(2, ms.Length); 803Assert.Equal(2, constructors.Length); 1570Assert.Equal(2, indexers.Length);
Semantics\PatternMatchingTests3.cs (12)
118Assert.Equal(2, xSymbol.CandidateSymbols.Length); 128Assert.Equal(2, ySymbol.CandidateSymbols.Length); 169Assert.Equal(0, xSymbol.CandidateSymbols.Length); 177Assert.Equal(0, ySymbol.CandidateSymbols.Length); 214Assert.Equal(0, xSymbol.CandidateSymbols.Length); 222Assert.Equal(0, ySymbol.CandidateSymbols.Length); 267Assert.Equal(0, xSymbol.CandidateSymbols.Length); 275Assert.Equal(0, ySymbol.CandidateSymbols.Length); 308Assert.Equal(0, xSymbol.CandidateSymbols.Length); 316Assert.Equal(0, ySymbol.CandidateSymbols.Length); 355Assert.Equal(0, xSymbol.CandidateSymbols.Length); 363Assert.Equal(0, ySymbol.CandidateSymbols.Length);
Semantics\PatternMatchingTests5.cs (2)
1195Assert.Equal(2, xSymbol.CandidateSymbols.Length); 1205Assert.Equal(2, ySymbol.CandidateSymbols.Length);
Semantics\PrimaryConstructorTests.cs (26)
4513Assert.Equal(2, context.OperationBlocks.Length); 4524Assert.Equal(3, context.OperationBlocks.Length); 4538Assert.Equal(4, context.OperationBlocks.Length); 4554Assert.Equal(1, context.OperationBlocks.Length); 4647Assert.Equal(2, context.OperationBlocks.Length); 4660Assert.Equal(3, context.OperationBlocks.Length); 4676Assert.Equal(4, context.OperationBlocks.Length); 4694Assert.Equal(1, context.OperationBlocks.Length); 4721Assert.Equal(2, context.OperationBlocks.Length); 4732Assert.Equal(3, context.OperationBlocks.Length); 4746Assert.Equal(4, context.OperationBlocks.Length); 4762Assert.Equal(1, context.OperationBlocks.Length); 5788Assert.Equal(2, context.OperationBlocks.Length); 20613Assert.Equal(2, symbols.Length); 20619Assert.Equal(1, primaryConstructor.GetAttributes().Length); 20647Assert.Equal(2, symbols1.Length); 20653Assert.Equal(1, primaryConstructor1.GetAttributes().Length); 20657Assert.Equal(1, symbols2.Length); 20691Assert.Equal(2, symbols1.Length); 20697Assert.Equal(1, primaryConstructor1.GetAttributes().Length); 20701Assert.Equal(1, symbols2.Length); 20738Assert.Equal(1, symbols1.Length); 20746Assert.Equal(2, symbols2.Length); 20788Assert.Equal(2, symbols1.Length); 20794Assert.Equal(0, primaryConstructor1.GetAttributes().Length); 20798Assert.Equal(1, symbols2.Length);
Semantics\RecordTests.cs (17)
12289Assert.Equal(2, actualMembers.Length); 12368Assert.Equal(2, actualMembers.Length); 12473Assert.Equal(2, actualMembers.Length); 23184Assert.Equal(members.Length, values.Length); 23185for (int i = 0; i < members.Length; i++) 27021Assert.Equal(2, context.OperationBlocks.Length); 27032Assert.Equal(3, context.OperationBlocks.Length); 27046Assert.Equal(4, context.OperationBlocks.Length); 27062Assert.Equal(1, context.OperationBlocks.Length); 27155Assert.Equal(2, context.OperationBlocks.Length); 27168Assert.Equal(3, context.OperationBlocks.Length); 27184Assert.Equal(4, context.OperationBlocks.Length); 27202Assert.Equal(1, context.OperationBlocks.Length); 27229Assert.Equal(2, context.OperationBlocks.Length); 27240Assert.Equal(3, context.OperationBlocks.Length); 27254Assert.Equal(4, context.OperationBlocks.Length); 27270Assert.Equal(1, context.OperationBlocks.Length);
Microsoft.CodeAnalysis.CSharp.Features (113)
ChangeSignature\CSharpChangeSignatureService.cs (2)
798if (paramNodes.Count() != declaredParameters.Length) 804if (declaredParameters.Length == 0)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (6)
144var qualifiedNamespaceName = CreateNamespaceAsQualifiedName(newNamespaceParts, aliasQualifier, newNamespaceParts.Length - 1); 161var memberAccessNamespaceName = CreateNamespaceAsMemberAccess(newNamespaceParts, aliasQualifier, newNamespaceParts.Length - 1); 192newNode = CreateNamespaceAsQualifiedName(newNamespaceParts, aliasQualifier, newNamespaceParts.Length - 1); 257CreateNamespaceAsQualifiedName(targetNamespaceParts, aliasQualifier: null, targetNamespaceParts.Length - 1) 317name: CreateNamespaceAsQualifiedName(targetNamespaceParts, aliasQualifier: null, targetNamespaceParts.Length - 1) 365if (namespaceDecls.Length != 1)
CodeRefactorings\SyncNamespace\CSharpSyncNamespaceCodeRefactoringProvider.cs (2)
41if (namespaceDecls.Length == 1 && compilationUnit.Members.Count == 1) 48if (namespaceDecls.Length == 0)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (5)
127if (leftNames.Length == 0) 133else if (rightNames.Length == 0) 384if (names.Length > 1 && names[0].SyntaxTree.Options.LanguageVersion() >= LanguageVersion.CSharp10) 387for (var i = names.Length - 2; i >= 0; i--) 394for (var i = 1; i < names.Length; i++)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (2)
204if (symbol.Parameters.Length > 0) 267if (symbol.TypeArguments.Length <= 0)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (1)
129var namedTypeSymbol = symbols.Length > 0 ? symbols[0].Symbol as INamedTypeSymbol : null;
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Indexers.cs (1)
23if (indexers.Length == 0)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
82for (var i = 0; i < s_operatorInfo.Length; i++)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
95if (index >= type.TupleElements.Length)
ConvertAnonymousType\CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
49if (i == n - 1 && i < originalSeparators.Length && originalSeparators[i].TrailingTrivia is [.., (kind: SyntaxKind.EndOfLineTrivia) newLine])
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
251methodSymbol.Parameters.Length == 1 &&
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
303methodSymbol.Parameters.Length == 0 && 344methodSymbol.Parameters.Length == 0)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
132if (!fileBanner.IsDefaultOrEmpty && globalStatements.Length > 0)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (6)
993return syntaxRefs.Length > 1 1579Debug.Assert(oldParameters.Length is 1 or 2); 1580Debug.Assert(newParameters.Length is 1 or 2); 1590if (oldParameters.Length == newParameters.Length && newParameters.Length == 2)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
285if (_statementsOrMemberOrAccessorToInsert.Length == 1)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
643Contract.ThrowIfTrue(variableInfos.Length == 0);
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
106if ((!node.IsKind(SyntaxKind.ObjectCreationExpression) && semanticModel.GetMemberGroup(expression).Length > 0) ||
GenerateConstructors\CSharpGenerateConstructorsCodeRefactoringProvider.cs (1)
59if (property.DeclaringSyntaxReferences.Length == 0)
GenerateType\CSharpGenerateTypeService.cs (3)
70var typeParameter = parameterIndex < type.TypeParameters.Length ? type.TypeParameters[parameterIndex] : null; 77var typeParameter = parameterIndex < method.TypeParameters.Length ? method.TypeParameters[parameterIndex] : null; 430if (memberGroup.Length != 0)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
157for (int i = 0, n = Math.Max(implParameters.Length, interfaceParameters.Length); i < n; i++)
ImplementInterface\CSharpImplementImplicitlyCodeRefactoringProvider.cs (1)
39if (containingTypeInterfaces.Length == 0)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
165if (parameters.Length >= 2)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (4)
31Debug.Assert(parameters.Length >= 1); 32Debug.Assert(fieldsOrProperties.Length >= 1); 33Debug.Assert(parameters.Length == fieldsOrProperties.Length);
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (1)
129using var _ = ArrayBuilder<SymbolDisplayPart>.GetInstance(displayParts.Length, out var builder);
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
246if (getAndSetMethods.SetMethodDeclaration is not MethodDeclarationSyntax setMethodDeclaration || setMethod?.Parameters.Length != 1)
SignatureHelp\LightweightOverloadResolution.cs (3)
102Debug.Assert(foundParameterIndex < parameters.Length); 184if (argumentIndex >= method.Parameters.Length && !inParams) 224Debug.Assert(parameterIndex < method.Parameters.Length);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
97if (containingType.AllInterfaces.Length > 0) 101if (containingType.DeclaringSyntaxReferences.Length > 1)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
91{ Kind: SymbolKind.Local, DeclaringSyntaxReferences: { Length: 1 } syntaxRefs })
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
113if (ev.AddMethod is { DeclaringSyntaxReferences.Length: 0 })
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (4)
144if (invokedMethod.TypeArguments.Length != invokedTypeArguments.Count) 149if (lambdaMethod.Parameters.Length != invokedMethod.Parameters.Length) 158for (int i = 0, n = lambdaMethod.Parameters.Length; i < n; i++)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
63for (int i = firstUnreachableStatementIndex + 1, n = siblingStatements.Length; i < n; i++)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
949if (originalCreateMethod.Parameters.Length == 0) 954return arguments.Count == originalCreateMethod.Parameters.Length;
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
66Parameters.Length: 1,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
168if (type is not INamedTypeSymbol { IsTupleType: true, TupleElements.Length: >= 2 } tupleTypeOpt)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (1)
32var builder = new FixedSizeArrayBuilder<(DiagnosticDescriptor, IOption2)>(_helpers.Length);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (3)
104if (invocationOperation.Arguments.Length != 1) 126if (propertyReference.Arguments.Length != 1) 145if (arrayElementReference.Indices.Length != 1)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
106return invocation.Arguments.Length switch
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (5)
75method.Parameters.Length == 1 && 95method.Parameters.Length == 2 && 113method.Parameters.Length == 1 && 136p.Parameters.Length == 1 && 151m.Parameters.Length == 1 &&
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
296if (primaryConstructor.Parameters.Length == 0 && primaryConstructorDeclaration.AttributeLists.Count == 0)
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (4)
74if (arrayCreationOperation.DimensionSizes.Length > 1) 95if (arrayCreationOperation.IsImplicit && elements.Length == 0) 152for (var i = 0; i < arrayCreationElements.Length;) 199var length = Math.Min(arrayCreationElements.Length - startIndex, 4);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
55using var _ = ArrayBuilder<TextSpan>.GetInstance(diagnostics.Length, out var spans);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
189if (GetBlockOfMethodBody(operation) is not { Operations.Length: int opLength } || 190opLength != properties.Length) 231if (GetBlockOfMethodBody(operation) is not { Operations.Length: int opLength } || 232opLength != fields.Length)
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
64Debug.Assert(diagnostics.Length == 1);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
413for (var i = fileHeader.Length - 1; i >= 0; i--)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (4)
174if (symbol is ILocalSymbol { DeclaringSyntaxReferences.Length: > 0 } local) 184else if (symbol is IFieldSymbol { IsImplicitlyDeclared: false, DeclaringSyntaxReferences.Length: > 0 } field) 202else if (symbol is IPropertySymbol { DeclaringSyntaxReferences.Length: > 0 } property) 230if (index >= 0 && index < method.Parameters.Length)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
364if (matches.Length > 0 && forceTrailingComma) 473Contract.ThrowIfTrue(expressions.Length >= 2 && match.UseSpread);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (3)
91var postMatches = CreateMatches(dummyObjectCreation.ArgumentList.Arguments, analysisResult.PostMatches, index: preMatches.Length); 111for (int i = 0, n = matches.Length; i < n; i++) 160for (int i = 1, n = matches.Length; i < n; i++)
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (3)
40objectCreation, nodesAndTokens, addTrailingComma: matches.Length > 0, static (_, expression) => expression); 42for (var i = 0; i < matches.Length; i++) 58if (i < matches.Length - 1)
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (3)
48currentMethod.Parameters.Length == originalMethod.Parameters.Length && 80for (int i = 0, n = currentMethod.Parameters.Length - 1; i < n; i++)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (3)
178Debug.Assert(elements.Length == parensDesignation.Variables.Count); 180using var _ = ArrayBuilder<ArgumentSyntax>.GetInstance(elements.Length, out var builder); 181for (var i = 0; i < elements.Length; i++)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
60List<ExpressionSyntax> references)>(diagnostics.Length);
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\CSharpUseObjectInitializerCodeFixProvider.cs (2)
80for (var i = 0; i < matches.Length; i++) 93if (i < matches.Length - 1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
190if (triviaToMove.Length > 0) 206for (var i = leadingTrivia.Length - 1; i >= 0; i--)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
144builder.Capacity = initializer.ElementValues.Length;
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
33=> !parameters.Last().IsParams || parameters.Length >= argumentCount;
UsePatternMatching\CSharpIsAndCastCheckWithoutNameCodeFixProvider.cs (1)
46Debug.Assert(diagnostics.Length == 1);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (14)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1068Assert.True(actions.Length == 0, "An action was offered when none was expected");
src\Analyzers\CSharp\Tests\ImplementInterface\ImplementInterfaceTests.cs (13)
2304CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2329CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2354CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2586CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2666CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2732CodeActionsVerifier = codeActions => Assert.Equal(4, codeActions.Length), 2792CodeActionsVerifier = codeActions => Assert.Equal(4, codeActions.Length), 2882CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 2970CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 3017CodeActionsVerifier = codeActions => Assert.Equal(3, codeActions.Length), 3083CodeActionsVerifier = codeActions => Assert.Equal(2, codeActions.Length), 3145CodeActionsVerifier = codeActions => Assert.Equal(2, codeActions.Length), 10501CodeActionsVerifier = codeActions => Assert.Equal(2, codeActions.Length),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\FunctionPointerOperations.cs (1)
209Assert.Equal(1, signature.Parameters.Length);
IOperation\IOperationTests_IArgument.cs (1)
4150if (operation.HasErrors(_compilation) || operation.Arguments.Length == 0)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (232)
Semantics\BetterCandidates.cs (8)
1092Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1100Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1108Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1116Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1124Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1169Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1217Assert.Equal(4, symbolInfo.CandidateSymbols.Length); 1270Assert.Equal(4, symbolInfo.CandidateSymbols.Length);
Semantics\BindingAsyncTasklikeTests.cs (1)
189Assert.True(diagnostics.Length == 1);
Semantics\BindingTests.cs (10)
3040Assert.Equal(2, group1.Length); 3047Assert.Equal(1, symbolInfo1.CandidateSymbols.Length); 3120Assert.Equal(2, group1.Length); 3127Assert.Equal(1, symbolInfo1.CandidateSymbols.Length); 3193Assert.Equal(2, group1.Length); 3200Assert.Equal(2, symbolInfo1.CandidateSymbols.Length); 3278Assert.Equal(2, group1.Length); 3285Assert.Equal(2, symbolInfo1.CandidateSymbols.Length); 3392Assert.Equal(1, model.LookupSymbols(node1.SpanStart, name: "MathMax").Length); 3393Assert.Equal(1, model.LookupSymbols(node1.SpanStart, name: "F1").Length);
Semantics\ColorColorTests.cs (6)
649Assert.Equal(2, parentInfo.CandidateSymbols.Length); 1080Assert.Equal(0, parentInfo.CandidateSymbols.Length); 1126Assert.Equal(0, parentInfo.CandidateSymbols.Length); 1171Assert.Equal(2, parentInfo.CandidateSymbols.Length); 1216Assert.Equal(2, parentInfo.CandidateSymbols.Length); 1295Assert.Equal(0, parentInfo.CandidateSymbols.Length);
Semantics\DeconstructionTests.cs (1)
6557Assert.Equal(2, nestedConversions.Length);
Semantics\ExpressionBodiedMemberTests.cs (12)
87Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 89Assert.Equal(0, semanticInfo.MethodGroup.Length); 142Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 160Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 175Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 193Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 239Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 241Assert.Equal(0, semanticInfo.MethodGroup.Length); 295Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 297Assert.Equal(0, semanticInfo.MethodGroup.Length); 328Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 330Assert.Equal(0, semanticInfo.MethodGroup.Length);
Semantics\FieldInitializerBindingTests.cs (2)
260Assert.Equal(0, boundInitializers.Length); 268Assert.Equal(numInitializers, boundInitializers.Length);
Semantics\ImplicitObjectCreationTests.cs (3)
4542Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4549Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4583Assert.Equal(0, symbolInfo.CandidateSymbols.Length);
Semantics\InteractiveSemanticModelTests.cs (8)
165Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 167Assert.Equal(0, semanticInfo.MethodGroup.Length); 190Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 192Assert.Equal(0, semanticInfo.MethodGroup.Length); 216Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 218Assert.Equal(0, semanticInfo.MethodGroup.Length); 244Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 251Assert.Equal(0, semanticInfo.MethodGroup.Length);
Semantics\LambdaTests.cs (13)
1243Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3938Assert.Equal(4, attributeSyntaxes.Length); 4158Assert.Equal(4, exprs.Length); 4213Assert.Equal(3, exprs.Length); 4788Assert.Equal(2, exprs.Length); 4955Assert.Equal(2, exprs.Length); 4983Assert.Equal(2, exprs.Length); 8014Assert.Equal(4, lambdas.Length); 8018Assert.Equal(2, lambdas[0].Symbol.Parameters.Length); 8028Assert.Equal(1, lambdas[1].Symbol.Parameters.Length); 8035Assert.Equal(1, lambdas[2].Symbol.Parameters.Length); 8042Assert.Equal(1, lambdas[3].Symbol.Parameters.Length); 8119Assert.Equal(3, decls.Length);
Semantics\LocalFunctionTests.cs (4)
975Assert.Equal(3, attributes.Length); 981Assert.Equal(3, returnAttributes.Length); 1775Assert.Equal(0, aSymbolInfo.CandidateSymbols.Length); 1850Assert.Equal(0, aSymbolInfo.CandidateSymbols.Length);
Semantics\LookupTests.cs (2)
1762Assert.Equal(0, symbols.Length); 1825Assert.Equal(2, symbols.Length);
Semantics\NameOfTests.cs (16)
714Assert.Equal(2, symbolInfo.CandidateSymbols.Length); 750Assert.Equal(1, symbolInfo.CandidateSymbols.Length); 797Assert.Equal(3, symbolInfo.CandidateSymbols.Length); 834Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 870Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 916Assert.Equal(3, symbolInfo.CandidateSymbols.Length); 949Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 980Assert.Equal(3, nameofCalls.Length); 982Assert.Equal(3, nameofCalls2.Length); 1052Assert.Equal(2, nameofCalls.Length); 1054Assert.Equal(2, nameofCalls2.Length); 1134Assert.Equal(6, nameofCalls.Length); 1136Assert.Equal(6, nameofCalls2.Length); 1215Assert.Equal(3, nameofCalls.Length); 1217Assert.Equal(3, nameofCalls2.Length); 1426Assert.Equal(1, symbolInfo.CandidateSymbols.Length);
Semantics\NativeIntegerTests.cs (8)
277Assert.Equal(underlyingInterfaces.Length, nativeIntegerInterfaces.Length); 279for (int i = 0; i < underlyingInterfaces.Length; i++) 288for (int i = 0; i < underlyingInterface.TypeArguments.Length; i++) 337return property.Parameters.Length == 0 && !IsSkippedPropertyName(property.Name); 386Assert.Equal(underlyingInterfaces.Length, nativeIntegerInterfaces.Length); 388for (int i = 0; i < underlyingInterfaces.Length; i++)
Semantics\NullableReferenceTypesTests.cs (5)
62842Assert.Equal(2, declarators.Length); 161242Assert.Equal(3, arms.Length); 161246Assert.Equal(3, identifiers.Length); 161288Assert.Equal(3, sections.Length); 161292Assert.Equal(3, identifiers.Length);
Semantics\ObjectAndCollectionInitializerTests.cs (6)
3482Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3489Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3529Assert.Equal(2, symbolInfo.CandidateSymbols.Length); 3623Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3661Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3945Assert.Equal(0, symbolInfo.CandidateSymbols.Length);
Semantics\OperatorTests.cs (8)
3280for (int i = 0; i < arguments.Value.Length; ++i) 7541Assert.Equal(0, info1.CandidateSymbols.Length); 7657Assert.Equal(0, symbol1.Locations.Length); 8087if (info1.CandidateSymbols.Length == 0) 8110Assert.Equal(0, info1.CandidateSymbols.Length); 8452Assert.Equal(0, symbol1.Locations.Length); 8464Assert.Equal(2, symbol1.Parameters.Length); 8565Assert.Equal(0, info1.CandidateSymbols.Length);
Semantics\OverloadResolutionTests.cs (2)
9077Assert.Equal(2, candidates.Length); 9425Assert.Equal(3, candidates.Length);
Semantics\RecordStructTests.cs (1)
6514Assert.Equal(2, context.OperationBlocks.Length);
Semantics\ScriptSemanticsTests.cs (11)
249Assert.Equal(0, summary.CandidateSymbols.Length); 254Assert.Equal(0, summary.MethodGroup.Length); 453Assert.Equal(1, members.Length); 458Assert.Equal(1, members.Length); 462Assert.Equal(1, members.Length); 466Assert.Equal(1, members.Length); 470Assert.Equal(1, members.Length); 474Assert.Equal(1, members.Length); 566Assert.Equal(0, summary.CandidateSymbols.Length); 571Assert.Equal(0, summary.MethodGroup.Length); 594Assert.True(symbols.Length > 0);
Semantics\SemanticErrorTests.cs (1)
3337Assert.Equal(1, boundCall.CandidateSymbols.Length);
Semantics\UnsafeTests.cs (52)
7263Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 7330Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 7368Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 7541Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 7863Assert.Equal(0, receiverSummary.CandidateSymbols.Length); 7867Assert.Equal(0, receiverSummary.MethodGroup.Length); 7872Assert.Equal(0, methodGroupSummary.CandidateSymbols.Length); 7881Assert.Equal(0, callSummary.CandidateSymbols.Length); 7885Assert.Equal(0, callSummary.MethodGroup.Length); 7930Assert.Equal(0, receiverSummary.CandidateSymbols.Length); 7934Assert.Equal(0, receiverSummary.MethodGroup.Length); 7948Assert.Equal(0, callSummary.MethodGroup.Length); 8174Assert.Equal(0, receiverSummary.CandidateSymbols.Length); 8178Assert.Equal(0, receiverSummary.MethodGroup.Length); 8186Assert.Equal(0, indexSummary.CandidateSymbols.Length); 8190Assert.Equal(0, indexSummary.MethodGroup.Length); 8195Assert.Equal(0, accessSummary.CandidateSymbols.Length); 8199Assert.Equal(0, accessSummary.MethodGroup.Length); 8241Assert.Equal(0, receiverSummary.CandidateSymbols.Length); 8245Assert.Equal(0, receiverSummary.MethodGroup.Length); 8254Assert.Equal(0, accessSummary.CandidateSymbols.Length); 8258Assert.Equal(0, accessSummary.MethodGroup.Length); 8299Assert.Equal(0, receiverSummary.CandidateSymbols.Length); 8303Assert.Equal(0, receiverSummary.MethodGroup.Length); 8312Assert.Equal(0, accessSummary.CandidateSymbols.Length); 8316Assert.Equal(0, accessSummary.MethodGroup.Length); 8880Assert.Equal(0, summary.CandidateSymbols.Length); 8885Assert.Equal(0, summary.MethodGroup.Length); 8915Assert.Equal(0, summary.CandidateSymbols.Length); 8920Assert.Equal(0, summary.MethodGroup.Length); 9342Assert.Equal(0, summary.CandidateSymbols.Length); 9347Assert.Equal(0, summary.MethodGroup.Length); 10234Assert.Equal(0, summary.CandidateSymbols.Length); 10238Assert.Equal(0, summary.MethodGroup.Length); 10261Assert.Equal(0, info.CandidateSymbols.Length); 10303Assert.Equal(0, summary.CandidateSymbols.Length); 10305Assert.Equal(0, summary.MethodGroup.Length); 10634Assert.Equal(0, typeSummary.CandidateSymbols.Length); 10647Assert.Equal(0, sizeOfSummary.CandidateSymbols.Length); 10652Assert.Equal(0, sizeOfSummary.MethodGroup.Length); 10696Assert.Equal(0, typeSummary.CandidateSymbols.Length); 10709Assert.Equal(0, sizeOfSummary.CandidateSymbols.Length); 10714Assert.Equal(0, sizeOfSummary.MethodGroup.Length); 10756Assert.Equal(0, typeSummary.CandidateSymbols.Length); 10769Assert.Equal(0, sizeOfSummary.CandidateSymbols.Length); 10774Assert.Equal(0, sizeOfSummary.MethodGroup.Length); 11315Assert.Equal(0, stackAllocSummary.CandidateSymbols.Length); 11317Assert.Equal(0, stackAllocSummary.MethodGroup.Length); 11327Assert.Equal(0, typeSummary.CandidateSymbols.Length); 11329Assert.Equal(0, typeSummary.MethodGroup.Length); 11341Assert.Equal(0, countSummary.CandidateSymbols.Length); 11343Assert.Equal(0, countSummary.MethodGroup.Length);
SourceGeneration\GeneratorDriverTests.cs (29)
625Assert.Equal(4, results.GeneratedTrees.Length); 626Assert.Equal(3, results.Results.Length); 635Assert.Equal(2, result1.GeneratedSources.Length); 678Assert.Equal(2, results.Results.Length); 679Assert.Equal(3, results.Diagnostics.Length); 686Assert.Equal(2, result1.Diagnostics.Length); 725Assert.Equal(3, results.Diagnostics.Length); 726Assert.Equal(3, fullDiagnostics.Length); 838Assert.Equal(2, passedIn.Length); 1076Assert.Equal(2, result.GeneratedSources.Length); 1099Assert.Equal(4, results.GeneratedTrees.Length); 1100Assert.Equal(3, results.Results.Length); 1109Assert.Equal(2, result1.GeneratedSources.Length); 1585Assert.Equal(2, runResults.Results.Length); 2221Assert.Equal(generatedContent.Length, trees.Length); 2364Assert.Equal(generatedContent.Length, trees.Length); 3211Assert.Equal(2, runResult.Results.Length); 3327Assert.Equal(2, result.GeneratedTrees.Length); 3470Assert.Equal(2, timing.GeneratorTimes.Length); 4315Assert.Equal(2, result.GeneratedTrees.Length); 4325Assert.Equal(2, result.GeneratedTrees.Length); 4334Assert.Equal(2, result.GeneratedTrees.Length); 4343Assert.Equal(2, result.GeneratedTrees.Length); 4385Assert.Equal(1, result.GeneratedTrees.Length); 4389Assert.Equal(2, result.Results.Length); 4392Assert.Equal(1, result.Results[0].GeneratedSources.Length); 4489Assert.Equal(2, result.GeneratedTrees.Length); 4499Assert.Equal(2, result.GeneratedTrees.Length); 4507Assert.Equal(2, result.GeneratedTrees.Length);
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (6)
1032Assert.True(ctx.Attributes.Length == 2); 1069Assert.True(ctx.Attributes.Length == 2); 1107Assert.True(ctx.Attributes.Length == 1); 1145Assert.True(ctx.Attributes.Length == 1); 1183Assert.True(ctx.Attributes.Length == 1); 1221Assert.True(ctx.Attributes.Length == 1);
SourceGeneration\SyntaxAwareGeneratorTests.cs (17)
519Assert.Equal(2, results.Results.Length); 869Assert.Equal(3, results.GeneratedTrees.Length); 915Assert.Equal(3, results.GeneratedTrees.Length); 961Assert.Equal(3, results.GeneratedTrees.Length); 972Assert.Equal(3, results.GeneratedTrees.Length); 983Assert.Equal(3, results.GeneratedTrees.Length); 1028Assert.Equal(3, results.GeneratedTrees.Length); 1046Assert.Equal(5, results.GeneratedTrees.Length); 1103Assert.Equal(5, results.GeneratedTrees.Length); 1127Assert.Equal(3, results.GeneratedTrees.Length); 1262Assert.Equal(3, results.GeneratedTrees.Length); 1333Assert.Equal(3, results.GeneratedTrees.Length); 1346Assert.Equal(3, results.GeneratedTrees.Length); 1410Assert.Equal(3, results.GeneratedTrees.Length); 1440Assert.Equal(3, results.GeneratedTrees.Length); 1473Assert.Equal(3, results.GeneratedTrees.Length); 2102Assert.Equal(2, timing.GeneratorTimes.Length);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1002)
Compilation\CompilationAPITests.cs (58)
364Assert.Equal(1, comp.SyntaxTrees.Length); 365Assert.Equal(1, comp.ExternalReferences.Length); 496Assert.Equal(0, comp.ExternalReferences.Length); 503Assert.Equal(1, comp.ExternalReferences.Length); 509Assert.Equal(1, comp.ExternalReferences.Length); 515Assert.Equal(0, comp.ExternalReferences.Length); 521Assert.Equal(1, compCollection.ExternalReferences.Length); 523Assert.Equal(0, compCollection.ExternalReferences.Length); 529Assert.Equal(0, compCollection.ExternalReferences.Length); 531Assert.Equal(0, comp.ExternalReferences.Length); 540Assert.Equal(0, compCollection.ExternalReferences.Length); 542Assert.Equal(0, compCollection.ExternalReferences.Length); 551Assert.Equal(0, compCollection.ExternalReferences.Length); 553Assert.Equal(0, compCollection.ExternalReferences.Length); 793Assert.Equal(5, comp.SyntaxTrees.Length); 795Assert.Equal(1, comp.SyntaxTrees.Length); 799Assert.Equal(1, comp.SyntaxTrees.Length); 803Assert.Equal(2, comp.SyntaxTrees.Length); 808Assert.Equal(3, comp.SyntaxTrees.Length); 812Assert.Equal(3, comp.SyntaxTrees.Length); 816Assert.Equal(4, comp.SyntaxTrees.Length); 826Assert.Equal(4, comp.SyntaxTrees.Length); 830Assert.Equal(4, comp.SyntaxTrees.Length); 848Assert.Equal(0, compCollection.SyntaxTrees.Length); 850Assert.Equal(0, compCollection.SyntaxTrees.Length); 856Assert.Equal(0, compCollection.SyntaxTrees.Length); 858Assert.Equal(0, compCollection.SyntaxTrees.Length); 867Assert.Equal(0, compCollection.SyntaxTrees.Length); 869Assert.Equal(0, compCollection.SyntaxTrees.Length); 878Assert.Equal(0, compCollection.SyntaxTrees.Length); 880Assert.Equal(0, compCollection.SyntaxTrees.Length); 940Assert.Equal(1, comp.SyntaxTrees.Length); 945Assert.Equal(2, comp.SyntaxTrees.Length); 951Assert.Equal(0, comp.SyntaxTrees.Length); 960Assert.Equal(1, comp.SyntaxTrees.Length); 961Assert.Equal(0, comp.ExternalReferences.Length); 972Assert.Equal(1, comp1.ExternalReferences.Length); 973Assert.Equal(1, comp1.SyntaxTrees.Length); 1174Assert.Equal(1, comp.ExternalReferences.Length); 1194Assert.Equal(2, comp.ExternalReferences.Length); 1203Assert.Equal(3, comp.ExternalReferences.Length); 1208Assert.Equal(3, comp.ExternalReferences.Length); 1213Assert.Equal(3, comp.ExternalReferences.Length); 1284Assert.Equal(3, comp.ExternalReferences.Length); 1292Assert.Equal(3, comp.ExternalReferences.Length); 1303Assert.Equal(0, comp.ExternalReferences.Length); 1417Assert.Equal(1, comp.ExternalReferences.Length); 1425Assert.Equal(1, comp.ExternalReferences.Length); 1441Assert.Equal(1, comp.ExternalReferences.Length); 1444Assert.Equal(1, comp.ExternalReferences.Length); 1488Assert.Equal(0, comp.SyntaxTrees.Length); 1490Assert.Equal(0, comp.SyntaxTrees.Length); 1557Assert.Equal(0, comp.SyntaxTrees.Length); 1582Assert.Equal(0, comp.SyntaxTrees.Length); 3454Assert.Equal(2, types[0].Locations.Length); 3476Assert.Equal(2, types.Length); 3533Assert.Equal(2, types.Length); 3571Assert.Equal(3, types.Length);
Compilation\CSharpCompilationOptionsTests.cs (3)
53Assert.Equal(0, newOpt1.Errors.Length); 159Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithMainTypeName(null).Errors.Length); 309Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication, mainTypeName: null).Errors.Length);
Compilation\GetImportScopesTests.cs (9)
146Assert.Equal(2, scopes.Single().Imports.Length); 195Assert.Equal(2, scopes.Length); 223Assert.Equal(2, scopes.Length); 335Assert.Equal(2, scopes.Single().Aliases.Length); 384Assert.Equal(2, scopes.Length); 535Assert.Equal(2, scopes.Single().ExternAliases.Length); 590Assert.Equal(2, scopes.Length); 681Assert.Equal(2, scopes.Single().Imports.Length); 687Assert.Equal(2, scopes.Single().Aliases.Length);
Compilation\GetSemanticInfoTests.cs (30)
981Assert.Equal(0, info.CandidateSymbols.Length); 1005Assert.Equal(0, info.CandidateSymbols.Length); 1029Assert.Equal(0, symbols.Length); 1223Assert.Equal(0, bindInfo.CandidateSymbols.Length); 1379Assert.Equal(0, bindInfo.CandidateSymbols.Length); 1419Assert.Equal(0, bindInfo.CandidateSymbols.Length); 1426Assert.Equal(0, bindInfo.MethodGroup.Length); 1467Assert.Equal(0, bindInfo.MethodGroup.Length); 1494Assert.Equal(0, bindInfo.CandidateSymbols.Length); 1501Assert.Equal(0, bindInfo.MethodGroup.Length); 1531Assert.Equal(1, bindInfo.CandidateSymbols.Length); 1852Assert.Equal(4, parameters.Length); 2847Assert.Equal(2, candidates.Length); 2878Assert.Equal(0, candidates.Length); 2938Assert.Equal(2, candidates.Length); 2971Assert.Equal(0, candidates.Length); 3030Assert.Equal(2, candidates.Length); 3063Assert.Equal(0, candidates.Length); 3104Assert.Equal(2, candidates.Length); 3137Assert.Equal(0, candidates.Length); 3178Assert.Equal(2, candidates.Length); 3211Assert.Equal(0, candidates.Length); 3254Assert.Equal(0, memberGroup.Length); 3762Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3825Assert.Equal(2, info.CandidateSymbols.Length); 3878Assert.Equal(1, info.CandidateSymbols.Length); 3959Assert.Equal(2, info.CandidateSymbols.Length); 4004Assert.Equal(1, info.CandidateSymbols.Length); 4915Assert.True(symbolInfo.CandidateSymbols.Length > 0); 5482Assert.NotEqual(0, invocationInfo.CandidateSymbols.Length);
Compilation\LoadDirectiveTests.cs (8)
56Assert.Equal(2, compilation.SyntaxTrees.Length); 84Assert.Equal(3, compilation.SyntaxTrees.Length); 95Assert.Equal(3, compilation.SyntaxTrees.Length); 107Assert.Equal(3, compilation.SyntaxTrees.Length); 159Assert.Equal(2, compilation.SyntaxTrees.Length); 165Assert.Equal(2, compilation.SyntaxTrees.Length); 179Assert.Equal(3, compilation.SyntaxTrees.Length); 185Assert.Equal(3, compilation.SyntaxTrees.Length);
Compilation\ReferenceManagerTests.cs (2)
879Assert.Equal(3, refs.Length); 886Assert.Equal(1, dirRefs.Length);
Compilation\SemanticModelAPITests.cs (6)
2052Assert.Equal(1, candidates.Length); 2105Assert.Equal(1, method.Parameters.Length); 2118Assert.Equal(2, info.CandidateSymbols.Length); 3234Assert.Equal(0, info.CandidateSymbols.Length); 4503Assert.Equal(2, type.TupleElements.Length); 4581Assert.Equal(2, type.TupleElements.Length);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (52)
982Assert.Equal(2, mSymbol.Parameters.Length); 1059Assert.Equal(1, symbols.Length); 1089Assert.Equal(3, symbols.Length); 1093Assert.Equal(3, symbols.Length); 1130Assert.Equal(3, symbols.Length); 1138Assert.Equal(3, symbols.Length); 1142Assert.Equal(1, symbols.Length); 1149Assert.Equal(0, symbols.Length); 1179Assert.Equal(3, symbols.Length); 1560Assert.Equal(1, symbols.Length); 1599Assert.Equal(5, symbols.Length); // A, B, C, System, Microsoft 1671Assert.Equal(4, symbols.Length); // A.SX, B.SY, Object.Equals, Object.ReferenceEquals 2081Assert.Equal(1, symbols.Length); 2084Assert.Equal(1, symbols.Length); 2191Assert.Equal(2, symbols.Length); 2194Assert.Equal(0, symbols.Length); 2198Assert.Equal(2, symbols.Length); 2201Assert.Equal(1, symbols.Length); 2205Assert.Equal(1, symbols.Length); 2208Assert.Equal(0, symbols.Length); 2212Assert.Equal(1, qnSymbols.Length); 2216Assert.Equal(1, symbols.Length); 2219Assert.Equal(0, symbols.Length); 2222Assert.Equal(0, symbols.Length); 2226Assert.Equal(1, symbols.Length); 2229Assert.Equal(0, symbols.Length); 2296Assert.Equal(2, info.CandidateSymbols.Length); 2332Assert.Equal(2, info.CandidateSymbols.Length); 2368Assert.Equal(2, info.CandidateSymbols.Length); 2625Assert.Equal(0, info.CandidateSymbols.Length); 2856Assert.Equal(1, explicitMethodSymbol.ExplicitInterfaceImplementations.Length); 2864Assert.Equal(1, explicitPropertySymbol.ExplicitInterfaceImplementations.Length); 2876Assert.Equal(1, explicitPropertyGetterSymbol.ExplicitInterfaceImplementations.Length); 2886Assert.Equal(1, explicitPropertySetterSymbol.ExplicitInterfaceImplementations.Length); 2993Assert.Equal(3, mems2.Length); 3743Assert.Equal(3, declSymbol.Locations.Length); 3746Assert.Equal(2, declSymbol.ConstituentNamespaces.Length); 4175Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4183Assert.Equal(3, symbolInfo.CandidateSymbols.Length); 4193Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4201Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4208Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4217Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4226Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4259Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4270Assert.Equal(3, symbolInfo.CandidateSymbols.Length); 4287Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4309Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4320Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4333Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4356Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4378Assert.Equal(0, symbolInfo.CandidateSymbols.Length);
Compilation\SemanticModelGetSemanticInfoTests.cs (682)
53Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 60Assert.Equal(2, semanticInfo.MethodGroup.Length); 92Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 94Assert.Equal(0, semanticInfo.MethodGroup.Length); 123Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 128Assert.Equal(0, semanticInfo.MethodGroup.Length); 157Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 162Assert.Equal(0, semanticInfo.MethodGroup.Length); 198Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 203Assert.Equal(0, semanticInfo.MethodGroup.Length); 239Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 244Assert.Equal(0, semanticInfo.MethodGroup.Length); 279Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 284Assert.Equal(0, semanticInfo.MethodGroup.Length); 316Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 321Assert.Equal(0, semanticInfo.MethodGroup.Length); 346Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 376Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 409Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 410Assert.Equal(0, semanticInfo.MemberGroup.Length); 434Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 469Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 474Assert.Equal(0, semanticInfo.MethodGroup.Length); 509Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 514Assert.Equal(0, semanticInfo.MethodGroup.Length); 552Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 559Assert.Equal(0, semanticInfo.MethodGroup.Length); 600Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 607Assert.Equal(0, semanticInfo.MethodGroup.Length); 648Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 655Assert.Equal(0, semanticInfo.MethodGroup.Length); 701Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 708Assert.Equal(0, semanticInfo.MethodGroup.Length); 731Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 738Assert.Equal(0, semanticInfo.MethodGroup.Length); 767Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 772Assert.Equal(0, semanticInfo.MethodGroup.Length); 802Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 807Assert.Equal(1, semanticInfo.MethodGroup.Length); 1650Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1652Assert.Equal(0, semanticInfo.MethodGroup.Length); 1694Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1696Assert.Equal(0, semanticInfo.MethodGroup.Length); 1726Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1728Assert.Equal(0, semanticInfo.MethodGroup.Length); 1754Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1756Assert.Equal(0, semanticInfo.MethodGroup.Length); 1785Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1787Assert.Equal(0, semanticInfo.MethodGroup.Length); 1814Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1816Assert.Equal(0, semanticInfo.MethodGroup.Length); 1844Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1846Assert.Equal(0, semanticInfo.MethodGroup.Length); 1874Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1876Assert.Equal(0, semanticInfo.MethodGroup.Length); 1904Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1906Assert.Equal(0, semanticInfo.MethodGroup.Length); 1933Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1935Assert.Equal(0, semanticInfo.MethodGroup.Length); 1963Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1965Assert.Equal(0, semanticInfo.MethodGroup.Length); 1993Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 1995Assert.Equal(0, semanticInfo.MethodGroup.Length); 2023Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2025Assert.Equal(0, semanticInfo.MethodGroup.Length); 2055Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2057Assert.Equal(0, semanticInfo.MethodGroup.Length); 2087Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2089Assert.Equal(0, semanticInfo.MethodGroup.Length); 2125Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2127Assert.Equal(0, semanticInfo.MethodGroup.Length); 2158Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2160Assert.Equal(0, semanticInfo.MethodGroup.Length); 2198Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2200Assert.Equal(0, semanticInfo.MethodGroup.Length); 2225Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2227Assert.Equal(0, semanticInfo.MethodGroup.Length); 2270Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2272Assert.Equal(0, semanticInfo.MethodGroup.Length); 2305Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2307Assert.Equal(0, semanticInfo.MethodGroup.Length); 2355Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2357Assert.Equal(0, semanticInfo.MethodGroup.Length); 2401Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2403Assert.Equal(0, semanticInfo.MethodGroup.Length); 2444Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2446Assert.Equal(0, semanticInfo.MethodGroup.Length); 2499Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2501Assert.Equal(0, semanticInfo.MethodGroup.Length); 2551Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2553Assert.Equal(0, semanticInfo.MethodGroup.Length); 2582Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 2586Assert.Equal(0, semanticInfo.MethodGroup.Length); 2619Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2621Assert.Equal(0, semanticInfo.MethodGroup.Length); 2656Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2658Assert.Equal(2, semanticInfo.MethodGroup.Length); 2697Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 2704Assert.Equal(0, semanticInfo.MethodGroup.Length); 2738Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 2745Assert.Equal(2, semanticInfo.MethodGroup.Length); 2788Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 2795Assert.Equal(2, semanticInfo.MethodGroup.Length); 2834Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 2839Assert.Equal(1, semanticInfo.MethodGroup.Length); 2877Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2879Assert.Equal(0, semanticInfo.MethodGroup.Length); 2913Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 2915Assert.Equal(2, semanticInfo.MethodGroup.Length); 2953Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 2989Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 3023Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 3028Assert.Equal(1, semanticInfo.MethodGroup.Length); 3079Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3081Assert.Equal(0, semanticInfo.MethodGroup.Length); 3124Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3126Assert.Equal(0, semanticInfo.MethodGroup.Length); 3164Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3166Assert.Equal(1, semanticInfo.MethodGroup.Length); 3206Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3208Assert.Equal(2, semanticInfo.MethodGroup.Length); 3252Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3254Assert.Equal(1, semanticInfo.MethodGroup.Length); 3291Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3293Assert.Equal(1, semanticInfo.MethodGroup.Length); 3327Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3329Assert.Equal(1, semanticInfo.MethodGroup.Length); 3364Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3366Assert.Equal(1, semanticInfo.MethodGroup.Length); 3401Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3403Assert.Equal(0, semanticInfo.MethodGroup.Length); 3432Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3434Assert.Equal(0, semanticInfo.MethodGroup.Length); 3464Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3466Assert.Equal(0, semanticInfo.MethodGroup.Length); 3499Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3501Assert.Equal(0, semanticInfo.MethodGroup.Length); 3530Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 3535Assert.Equal(0, semanticInfo.MethodGroup.Length); 3562Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3564Assert.Equal(0, semanticInfo.MethodGroup.Length); 3596Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3598Assert.Equal(0, semanticInfo.MethodGroup.Length); 3634Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3636Assert.Equal(0, semanticInfo.MethodGroup.Length); 3678Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3680Assert.Equal(0, semanticInfo.MethodGroup.Length); 3712Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3714Assert.Equal(0, semanticInfo.MethodGroup.Length); 3746Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3748Assert.Equal(0, semanticInfo.MethodGroup.Length); 3780Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3782Assert.Equal(0, semanticInfo.MethodGroup.Length); 3810Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3812Assert.Equal(0, semanticInfo.MethodGroup.Length); 3844Assert.NotEqual(0, semanticInfo.CandidateSymbols.Length); 3846Assert.Equal(0, semanticInfo.MethodGroup.Length); 3871Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3873Assert.Equal(1, semanticInfo.MethodGroup.Length); 3906Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3908Assert.Equal(0, semanticInfo.MethodGroup.Length); 3943Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3945Assert.Equal(0, semanticInfo.MethodGroup.Length); 3979Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 3981Assert.Equal(0, semanticInfo.MethodGroup.Length); 4014Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4016Assert.Equal(0, semanticInfo.MethodGroup.Length); 4045Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4047Assert.Equal(0, semanticInfo.MethodGroup.Length); 4076Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 4081Assert.Equal(1, semanticInfo.MethodGroup.Length); 4113Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4115Assert.Equal(0, semanticInfo.MethodGroup.Length); 4142Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4144Assert.Equal(0, semanticInfo.MethodGroup.Length); 4166Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4168Assert.Equal(0, semanticInfo.MethodGroup.Length); 4192Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4194Assert.Equal(0, semanticInfo.MethodGroup.Length); 4220Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 4225Assert.Equal(0, semanticInfo.MethodGroup.Length); 4253Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4255Assert.Equal(1, semanticInfo.MethodGroup.Length); 4287Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 4294Assert.Equal(0, semanticInfo.MethodGroup.Length); 4325Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4327Assert.Equal(0, semanticInfo.MethodGroup.Length); 4379Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4381Assert.Equal(0, semanticInfo.MethodGroup.Length); 4411Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4418Assert.Equal(0, semanticInfo.MethodGroup.Length); 4449Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4456Assert.Equal(0, semanticInfo.MethodGroup.Length); 4481Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4483Assert.Equal(0, semanticInfo.MethodGroup.Length); 4576Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4578Assert.Equal(0, semanticInfo.MethodGroup.Length); 4614Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4616Assert.Equal(0, semanticInfo.MethodGroup.Length); 4650Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4652Assert.Equal(0, semanticInfo.MethodGroup.Length); 4680Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4682Assert.Equal(0, semanticInfo.MethodGroup.Length); 4718Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4720Assert.Equal(0, semanticInfo.MethodGroup.Length); 4754Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4756Assert.Equal(0, semanticInfo.MethodGroup.Length); 4790Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4792Assert.Equal(0, semanticInfo.MethodGroup.Length); 4821Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4823Assert.Equal(0, semanticInfo.MethodGroup.Length); 4858Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4860Assert.Equal(0, semanticInfo.MethodGroup.Length); 4885Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 4888Assert.Equal(0, semanticInfo.MethodGroup.Length); 4924Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 4931Assert.Equal(2, semanticInfo.MethodGroup.Length); 4971Assert.Equal(3, semanticInfo.CandidateSymbols.Length); 4980Assert.Equal(3, semanticInfo.MethodGroup.Length); 5023Assert.Equal(3, semanticInfo.CandidateSymbols.Length); 5032Assert.Equal(3, semanticInfo.MethodGroup.Length); 5074Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5076Assert.Equal(0, semanticInfo.MethodGroup.Length); 5114Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 5119Assert.Equal(3, semanticInfo.MethodGroup.Length); 5160Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 5165Assert.Equal(3, semanticInfo.MethodGroup.Length); 5206Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5208Assert.Equal(2, semanticInfo.MethodGroup.Length); 5246Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5248Assert.Equal(0, semanticInfo.MethodGroup.Length); 5285Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5287Assert.Equal(2, semanticInfo.MethodGroup.Length); 5327Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5329Assert.Equal(2, semanticInfo.MethodGroup.Length); 5409Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 5415Assert.Equal(1, semanticInfo.MethodGroup.Length); 5451Assert.Equal(3, semanticInfo.CandidateSymbols.Length); 5460Assert.Equal(0, semanticInfo.MethodGroup.Length); 5487Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5489Assert.Equal(0, semanticInfo.MethodGroup.Length); 5516Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5518Assert.Equal(0, semanticInfo.MethodGroup.Length); 5549Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5551Assert.Equal(0, semanticInfo.MethodGroup.Length); 5581Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5583Assert.Equal(0, semanticInfo.MethodGroup.Length); 5613Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5615Assert.Equal(0, semanticInfo.MethodGroup.Length); 5663Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5666Assert.Equal(1, lambdaSym.Parameters.Length); 5671Assert.Equal(0, semanticInfo.MethodGroup.Length); 5699Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5702Assert.Equal(1, lambdaSym.Parameters.Length); 5707Assert.Equal(0, semanticInfo.MethodGroup.Length); 5735Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5737Assert.Equal(0, semanticInfo.MethodGroup.Length); 5768Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5770Assert.Equal(0, semanticInfo.MethodGroup.Length); 5802Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5804Assert.Equal(0, semanticInfo.MethodGroup.Length); 5835Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5837Assert.Equal(0, semanticInfo.MethodGroup.Length); 5869Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5871Assert.Equal(0, semanticInfo.MethodGroup.Length); 5903Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5905Assert.Equal(0, semanticInfo.MethodGroup.Length); 5938Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5940Assert.Equal(0, semanticInfo.MethodGroup.Length); 5971Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 5973Assert.Equal(0, semanticInfo.MethodGroup.Length); 6005Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6007Assert.Equal(0, semanticInfo.MethodGroup.Length); 6038Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6040Assert.Equal(0, semanticInfo.MethodGroup.Length); 6066Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6068Assert.Equal(0, semanticInfo.MethodGroup.Length); 6098Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6100Assert.Equal(0, semanticInfo.MethodGroup.Length); 6124Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6126Assert.Equal(0, semanticInfo.MethodGroup.Length); 6151Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6153Assert.Equal(0, semanticInfo.MethodGroup.Length); 6184Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6186Assert.Equal(0, semanticInfo.MethodGroup.Length); 6336Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6338Assert.Equal(0, semanticInfo.MethodGroup.Length); 6376Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6378Assert.Equal(1, semanticInfo.MethodGroup.Length); 6403Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 6408Assert.Equal(1, semanticInfo.MethodGroup.Length); 6443Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6445Assert.Equal(2, semanticInfo.MethodGroup.Length); 6526Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6528Assert.Equal(0, semanticInfo.MethodGroup.Length); 6561Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6563Assert.Equal(0, semanticInfo.MethodGroup.Length); 6598Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6600Assert.Equal(0, semanticInfo.MethodGroup.Length); 6648Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6650Assert.Equal(0, semanticInfo.MethodGroup.Length); 6682Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 6687Assert.Equal(1, semanticInfo.MemberGroup.Length); 6813Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6815Assert.Equal(0, semanticInfo.MethodGroup.Length); 6882Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6884Assert.Equal(0, semanticInfo.MethodGroup.Length); 6927Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6929Assert.Equal(0, semanticInfo.MethodGroup.Length); 6972Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 6974Assert.Equal(0, semanticInfo.MethodGroup.Length); 7054Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7056Assert.Equal(0, semanticInfo.MethodGroup.Length); 7085Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7087Assert.Equal(1, semanticInfo.MethodGroup.Length); 7113Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7115Assert.Equal(1, semanticInfo.MethodGroup.Length); 7144Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7146Assert.Equal(1, semanticInfo.MethodGroup.Length); 7176Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7178Assert.Equal(0, semanticInfo.MethodGroup.Length); 7208Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7210Assert.Equal(0, semanticInfo.MethodGroup.Length); 7240Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7242Assert.Equal(0, semanticInfo.MethodGroup.Length); 7269Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7271Assert.Equal(0, semanticInfo.MethodGroup.Length); 7296Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7298Assert.Equal(0, semanticInfo.MethodGroup.Length); 7323Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7325Assert.Equal(0, semanticInfo.MethodGroup.Length); 7350Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7352Assert.Equal(0, semanticInfo.MethodGroup.Length); 7406Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7408Assert.Equal(0, semanticInfo.MethodGroup.Length); 7432Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7434Assert.Equal(0, semanticInfo.MethodGroup.Length); 7460Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7462Assert.Equal(0, semanticInfo.MethodGroup.Length); 7493Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7495Assert.Equal(0, semanticInfo.MethodGroup.Length); 7529Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7559Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7561Assert.Equal(0, semanticInfo.MethodGroup.Length); 7592Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 7599Assert.Equal(0, semanticInfo.MethodGroup.Length); 7630Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7632Assert.Equal(0, semanticInfo.MethodGroup.Length); 7667Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7669Assert.Equal(0, semanticInfo.MethodGroup.Length); 7825Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7827Assert.Equal(0, semanticInfo.MethodGroup.Length); 7858Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7860Assert.Equal(0, semanticInfo.MethodGroup.Length); 7890Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7892Assert.Equal(0, semanticInfo.MethodGroup.Length); 7924Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7926Assert.Equal(0, semanticInfo.MethodGroup.Length); 7956Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7958Assert.Equal(0, semanticInfo.MethodGroup.Length); 7990Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 7992Assert.Equal(0, semanticInfo.MethodGroup.Length); 8028Assert.Equal(1, semanticInfo.MethodGroup.Length); 8043Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 8045Assert.Equal(1, semanticInfo.MethodGroup.Length); 8081Assert.Equal(1, semanticInfo.MethodGroup.Length); 8096Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 8098Assert.Equal(1, semanticInfo.MethodGroup.Length); 8376Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 8381Assert.Equal(1, semanticInfo.MethodGroup.Length); 8410Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 8415Assert.Equal(1, semanticInfo.MethodGroup.Length); 8521Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8523Assert.Equal(0, semanticInfo.MethodGroup.Length); 8567Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8569Assert.Equal(0, semanticInfo.MethodGroup.Length); 8612Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8614Assert.Equal(0, semanticInfo.MethodGroup.Length); 8651Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8653Assert.Equal(0, semanticInfo.MethodGroup.Length); 8693Assert.Equal(1, semanticInfo.MethodGroup.Length); 8733Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8735Assert.Equal(0, semanticInfo.MethodGroup.Length); 8775Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8777Assert.Equal(0, semanticInfo.MethodGroup.Length); 8816Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8818Assert.Equal(0, semanticInfo.MethodGroup.Length); 8858Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8860Assert.Equal(0, semanticInfo.MethodGroup.Length); 8900Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8902Assert.Equal(0, semanticInfo.MethodGroup.Length); 8940Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 8942Assert.Equal(0, semanticInfo.MethodGroup.Length); 9071Assert.Equal(1, semanticInfo.MethodGroup.Length); 9130Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 9135Assert.Equal(0, semanticInfo.MethodGroup.Length); 9290Assert.Equal(1, a.GetMembers().Length); 9365Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9372Assert.Equal(0, semanticInfo.MethodGroup.Length); 9424Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9431Assert.Equal(0, semanticInfo.MethodGroup.Length); 9462Assert.Equal(3, semanticInfo.CandidateSymbols.Length); 9471Assert.Equal(3, semanticInfo.MethodGroup.Length); 9535Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9542Assert.Equal(0, semanticInfo.MethodGroup.Length); 9572Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9579Assert.Equal(0, semanticInfo.MethodGroup.Length); 9621Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9628Assert.Equal(0, semanticInfo.MethodGroup.Length); 9676Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 9678Assert.Equal(1, semanticInfo.MethodGroup.Length); 9727Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 9729Assert.Equal(1, semanticInfo.MethodGroup.Length); 9787Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9794Assert.Equal(0, semanticInfo.MethodGroup.Length); 9838Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 9843Assert.Equal(1, semanticInfo.MethodGroup.Length); 9893Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 9900Assert.Equal(0, semanticInfo.MethodGroup.Length); 9924Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 9926Assert.Equal(1, semanticInfo.MethodGroup.Length); 9958Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 9960Assert.Equal(3, semanticInfo.MethodGroup.Length); 9994Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 9996Assert.Equal(3, semanticInfo.MethodGroup.Length); 10030Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 10032Assert.Equal(3, semanticInfo.MethodGroup.Length); 10066Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 10068Assert.Equal(3, semanticInfo.MethodGroup.Length); 10110Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 10112Assert.Equal(0, semanticInfo.MethodGroup.Length); 10147Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 10149Assert.Equal(0, semanticInfo.MethodGroup.Length); 10184Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10189Assert.Equal(1, semanticInfo.MethodGroup.Length); 10223Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10228Assert.Equal(1, semanticInfo.MethodGroup.Length); 10254Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10259Assert.Equal(1, semanticInfo.MethodGroup.Length); 10289Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10294Assert.Equal(1, semanticInfo.MethodGroup.Length); 10324Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 10331Assert.Equal(0, semanticInfo.MethodGroup.Length); 10358Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 10365Assert.Equal(0, semanticInfo.MethodGroup.Length); 10392Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 10399Assert.Equal(0, semanticInfo.MethodGroup.Length); 10435Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 10442Assert.Equal(0, semanticInfo.MethodGroup.Length); 10477Assert.Equal(0, semanticInfo.MethodGroup.Length); 10505Assert.Equal(0, semanticInfo.MethodGroup.Length); 10535Assert.Equal(0, semanticInfo.MethodGroup.Length); 10569Assert.Equal(0, semanticInfo.MethodGroup.Length); 10607Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10612Assert.Equal(0, semanticInfo.MethodGroup.Length); 10644Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10649Assert.Equal(0, semanticInfo.MethodGroup.Length); 10681Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10686Assert.Equal(0, semanticInfo.MethodGroup.Length); 10720Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10725Assert.Equal(0, semanticInfo.MethodGroup.Length); 10763Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10768Assert.Equal(0, semanticInfo.MethodGroup.Length); 10805Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10810Assert.Equal(0, semanticInfo.MethodGroup.Length); 10842Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 10847Assert.Equal(1, semanticInfo.MethodGroup.Length); 10911Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 10913Assert.Equal(0, semanticInfo.MethodGroup.Length); 11151Assert.Equal(3, semanticInfo.CandidateSymbols.Length); 11160Assert.Equal(3, semanticInfo.MethodGroup.Length); 11195Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11197Assert.Equal(0, semanticInfo.MethodGroup.Length); 11229Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 11236Assert.Equal(2, semanticInfo.MethodGroup.Length); 11273Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11275Assert.Equal(0, semanticInfo.MethodGroup.Length); 11310Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11312Assert.Equal(0, semanticInfo.MethodGroup.Length); 11347Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11349Assert.Equal(0, semanticInfo.MethodGroup.Length); 11387Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11389Assert.Equal(0, semanticInfo.MethodGroup.Length); 11434Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11436Assert.Equal(0, semanticInfo.MethodGroup.Length); 11467Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11469Assert.Equal(0, semanticInfo.MethodGroup.Length); 11504Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11506Assert.Equal(0, semanticInfo.MethodGroup.Length); 11542Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 11547Assert.Equal(1, semanticInfo.MethodGroup.Length); 11579Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 11584Assert.Equal(0, semanticInfo.MethodGroup.Length); 11614Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11616Assert.Equal(1, semanticInfo.MethodGroup.Length); 11646Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11648Assert.Equal(0, semanticInfo.MethodGroup.Length); 11680Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11682Assert.Equal(0, semanticInfo.MethodGroup.Length); 11717Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11719Assert.Equal(0, semanticInfo.MethodGroup.Length); 11762Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11768Assert.Equal(0, semanticInfo.MethodGroup.Length); 11802Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11804Assert.Equal(0, semanticInfo.MethodGroup.Length); 11838Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11840Assert.Equal(0, semanticInfo.MethodGroup.Length); 11873Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11875Assert.Equal(0, semanticInfo.MethodGroup.Length); 11908Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11910Assert.Equal(0, semanticInfo.MethodGroup.Length); 11944Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11946Assert.Equal(0, semanticInfo.MethodGroup.Length); 11980Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 11982Assert.Equal(0, semanticInfo.MethodGroup.Length); 12015Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12017Assert.Equal(0, semanticInfo.MethodGroup.Length); 12050Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12052Assert.Equal(0, semanticInfo.MethodGroup.Length); 12086Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12088Assert.Equal(0, semanticInfo.MethodGroup.Length); 12130Assert.Equal(1, symbolInfo.CandidateSymbols.Length); 12159Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12163Assert.Equal(0, semanticInfo.MethodGroup.Length); 12193Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12196Assert.Equal(0, semanticInfo.MethodGroup.Length); 12226Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12231Assert.Equal(0, semanticInfo.MethodGroup.Length); 12263Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12266Assert.Equal(0, semanticInfo.MethodGroup.Length); 12294Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12299Assert.Equal(0, semanticInfo.MethodGroup.Length); 12329Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12332Assert.Equal(0, semanticInfo.MethodGroup.Length); 12362Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12367Assert.Equal(0, semanticInfo.MemberGroup.Length); 12398Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12403Assert.Equal(0, semanticInfo.MemberGroup.Length); 12433Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12435Assert.Equal(0, semanticInfo.MemberGroup.Length); 12460Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12462Assert.Equal(0, semanticInfo.MethodGroup.Length); 12491Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12493Assert.Equal(0, semanticInfo.MethodGroup.Length); 12534Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12536Assert.Equal(0, semanticInfo.MethodGroup.Length); 12575Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12576Assert.Equal(0, semanticInfo.MethodGroup.Length); 12617Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12619Assert.Equal(0, semanticInfo.MethodGroup.Length); 12651Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12653Assert.Equal(0, semanticInfo.MethodGroup.Length); 12683Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12685Assert.Equal(1, semanticInfo.MethodGroup.Length); 12714Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12716Assert.Equal(0, semanticInfo.MethodGroup.Length); 12746Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12748Assert.Equal(0, semanticInfo.MethodGroup.Length); 12778Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12780Assert.Equal(0, semanticInfo.MethodGroup.Length); 12810Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12812Assert.Equal(0, semanticInfo.MethodGroup.Length); 12853Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12855Assert.Equal(0, semanticInfo.MethodGroup.Length); 12890Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12892Assert.Equal(0, semanticInfo.MethodGroup.Length); 12929Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 12931Assert.Equal(0, semanticInfo.MethodGroup.Length); 12965Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 12970Assert.Equal(0, semanticInfo.MethodGroup.Length); 13003Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13008Assert.Equal(0, semanticInfo.MethodGroup.Length); 13044Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13049Assert.Equal(0, semanticInfo.MethodGroup.Length); 13075Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13077Assert.Equal(0, semanticInfo.MethodGroup.Length); 13105Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13107Assert.Equal(0, semanticInfo.MethodGroup.Length); 13136Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13141Assert.Equal(0, semanticInfo.MethodGroup.Length); 13170Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13175Assert.Equal(0, semanticInfo.MethodGroup.Length); 13204Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13209Assert.Equal(0, semanticInfo.MethodGroup.Length); 13235Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13240Assert.Equal(1, semanticInfo.MethodGroup.Length); 13270Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13272Assert.Equal(0, semanticInfo.MethodGroup.Length); 13330Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13332Assert.Equal(1, semanticInfo.MethodGroup.Length); 13389Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13391Assert.Equal(0, semanticInfo.MethodGroup.Length); 13449Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13451Assert.Equal(0, semanticInfo.MethodGroup.Length); 13510Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13512Assert.Equal(0, semanticInfo.MethodGroup.Length); 13568Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13570Assert.Equal(0, semanticInfo.MethodGroup.Length); 13598Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13600Assert.Equal(0, semanticInfo.MethodGroup.Length); 13663Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13665Assert.Equal(0, semanticInfo.MethodGroup.Length); 13692Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13694Assert.Equal(0, semanticInfo.MethodGroup.Length); 13748Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13750Assert.Equal(0, semanticInfo.MethodGroup.Length); 13781Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13783Assert.Equal(0, semanticInfo.MethodGroup.Length); 13812Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13814Assert.Equal(0, semanticInfo.MethodGroup.Length); 13846Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13848Assert.Equal(0, semanticInfo.MethodGroup.Length); 13880Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13885Assert.Equal(1, semanticInfo.MethodGroup.Length); 13919Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 13924Assert.Equal(1, semanticInfo.MethodGroup.Length); 13958Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13960Assert.Equal(0, semanticInfo.MethodGroup.Length); 13985Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 13987Assert.Equal(0, semanticInfo.MethodGroup.Length); 14012Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14014Assert.Equal(0, semanticInfo.MethodGroup.Length); 14049Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14051Assert.Equal(0, semanticInfo.MethodGroup.Length); 14088Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14090Assert.Equal(0, semanticInfo.MethodGroup.Length); 14126Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14128Assert.Equal(1, semanticInfo.MethodGroup.Length); 14166Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14168Assert.Equal(0, semanticInfo.MethodGroup.Length); 14208Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14210Assert.Equal(0, semanticInfo.MethodGroup.Length); 14252Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14254Assert.Equal(1, semanticInfo.MethodGroup.Length); 14298Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14300Assert.Equal(0, semanticInfo.MethodGroup.Length); 14344Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 14349Assert.Equal(1, semanticInfo.MethodGroup.Length); 14387Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 14390Assert.Equal(0, semanticInfo.MethodGroup.Length); 14425Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 14430Assert.Equal(0, semanticInfo.MethodGroup.Length); 14514Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 14519Assert.Equal(0, semanticInfo.MethodGroup.Length); 14548Assert.Equal(1, semanticInfo.CandidateSymbols.Length); 14551Assert.Equal(0, semanticInfo.MethodGroup.Length); 14633Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14635Assert.Equal(0, semanticInfo.MethodGroup.Length); 14672Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 14674Assert.Equal(1, semanticInfo.MethodGroup.Length); 14800Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 14803Assert.Equal(0, memberGroup.Length); 14815Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 14818Assert.Equal(1, memberGroup.Length); 14896Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 14899Assert.Equal(0, memberGroup.Length); 14911Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 14914Assert.Equal(1, memberGroup.Length); 15007Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 15010Assert.Equal(0, memberGroup.Length); 15021Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 15025Assert.Equal(0, memberGroup.Length); 15091Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15093Assert.Equal(0, semanticInfo.MethodGroup.Length); 15120Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 15127Assert.Equal(2, semanticInfo.MethodGroup.Length); 15159Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15161Assert.Equal(0, semanticInfo.MethodGroup.Length); 15190Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15192Assert.Equal(0, semanticInfo.MethodGroup.Length); 15221Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15223Assert.Equal(0, semanticInfo.MethodGroup.Length); 15252Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15254Assert.Equal(0, semanticInfo.MethodGroup.Length); 15283Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15285Assert.Equal(0, semanticInfo.MethodGroup.Length); 15310Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15312Assert.Equal(0, semanticInfo.MethodGroup.Length); 15345Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15347Assert.Equal(0, semanticInfo.MethodGroup.Length); 15412Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 15414Assert.Equal(0, semanticInfo.MethodGroup.Length);
Compilation\SemanticModelGetSemanticInfoTests_LateBound.cs (49)
43Assert.Equal(3, semanticInfo.CandidateSymbols.Length); 44Assert.Equal(3, semanticInfo.MethodGroup.Length); 89Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 90Assert.Equal(1, semanticInfo.MethodGroup.Length); 115Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 119Assert.Equal(2, semanticInfo.MethodGroup.Length); 146Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 147Assert.Equal(0, semanticInfo.MethodGroup.Length); 172Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 173Assert.Equal(0, semanticInfo.MethodGroup.Length); 207Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 208Assert.Equal(2, semanticInfo.MethodGroup.Length); 231Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 232Assert.Equal(1, semanticInfo.MethodGroup.Length); 248Assert.Equal(1, semanticInfo.MethodGroup.Length); 271Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 272Assert.Equal(2, semanticInfo.MethodGroup.Length); 294Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 295Assert.Equal(2, semanticInfo.MethodGroup.Length); 323Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 324Assert.Equal(3, semanticInfo.MethodGroup.Length); 352Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 353Assert.Equal(2, semanticInfo.MethodGroup.Length); 424Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 430Assert.Equal(2, semanticInfo.MethodGroup.Length); 519Assert.Equal(2, semanticInfo.CandidateSymbols.Length); 524Assert.Equal(0, semanticInfo.MethodGroup.Length); 556Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 559Assert.Equal(0, semanticInfo.MethodGroup.Length); 592Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 593Assert.Equal(0, semanticInfo.MethodGroup.Length); 620Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 621Assert.Equal(0, semanticInfo.MethodGroup.Length); 657Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 658Assert.Equal(0, semanticInfo.MethodGroup.Length); 684Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 685Assert.Equal(0, semanticInfo.MethodGroup.Length); 720Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 721Assert.Equal(0, semanticInfo.MethodGroup.Length); 750Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 751Assert.Equal(0, semanticInfo.MethodGroup.Length); 776Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 777Assert.Equal(0, semanticInfo.MethodGroup.Length); 803Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 804Assert.Equal(0, semanticInfo.MethodGroup.Length); 831Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 832Assert.Equal(0, semanticInfo.MethodGroup.Length); 862Assert.Equal(0, semanticInfo.CandidateSymbols.Length); 863Assert.Equal(0, semanticInfo.MethodGroup.Length);
Compilation\SymbolVisitorTests.cs (3)
128if (symbol.TypeArguments.Length > 0) 308if (symbol.TypeArguments.Length > 0) 430if (symbol.TypeArguments.Length > 0)
Compilation\UsedAssembliesTests.cs (2)
643Assert.Equal(1, used.Length); 2332Assert.Equal(1, used.Length);
DocumentationComments\CrefTests.cs (24)
1673Assert.Equal(2, actualCandidates.Length); 1711Assert.Equal(2, actualCandidates.Length); 2011Assert.Equal(2, actualCandidates.Length); 2057Assert.Equal(0, info.CandidateSymbols.Length); 2111Assert.Equal(0, info.CandidateSymbols.Length); 3160Assert.Equal(0, info.CandidateSymbols.Length); 3183Assert.Equal(2, info.CandidateSymbols.Length); 3206Assert.Equal(2, info.CandidateSymbols.Length); 3229Assert.Equal(2, info.CandidateSymbols.Length); 3253Assert.Equal(2, info.CandidateSymbols.Length); 3277Assert.Equal(2, info.CandidateSymbols.Length); 3301Assert.Equal(2, info.CandidateSymbols.Length); 3325Assert.Equal(2, info.CandidateSymbols.Length); 3348Assert.Equal(0, info.CandidateSymbols.Length); 5922InstanceConstructors.Single(ctor => ctor.Parameters.Length == 1 && ctor.GetParameterType(0).Kind == SymbolKind.ArrayType); 5954Assert.Equal(0, info.CandidateSymbols.Length); 6003Assert.Equal(0, info.CandidateSymbols.Length); 6054Assert.Equal(0, members.Length); 6078Assert.Equal(0, members.Length); 6433Assert.Equal(0, info.CandidateSymbols.Length); 6437Assert.Equal(0, model.LookupSymbols(syntax.SpanStart, derivedInterface).Length); 6471Assert.Equal(0, info.CandidateSymbols.Length); 6475Assert.Equal(0, model.LookupSymbols(syntax.SpanStart, symbol).Length); 6628Assert.InRange(references.Length, 0, 1); //Otherwise, call GetReferencedSymbols
Symbols\AnonymousTypesSemanticsTests.cs (2)
1992Assert.Equal(0, type.Interfaces.Length); 1994Assert.Equal(1, type.Locations.Length);
Symbols\CompilationCreationTests.cs (1)
41Assert.Equal(numTrees, actualSyntaxTrees.Length);
Symbols\CustomModifiersTests.cs (1)
141Assert.Equal(2, modifiers.Length);
Symbols\DefaultInterfaceImplementationTests.cs (1)
62583if (publicKeyToken.Length > 0)
Symbols\DestructorTests.cs (1)
421Assert.Equal(2, lookupSymbols.Length); // Also includes object.Finalize
Symbols\IndexerTests.cs (3)
213Assert.Equal(parameters.Length, expectedTypes.Length); 2620Assert.Equal(0, model.GetIndexerGroup(syntax).Length); 2707Assert.Equal(0, model.GetIndexerGroup(syntax).Length);
Symbols\LookupSymbolsInfoTests.cs (1)
98Assert.Equal(expectedSymbolCount, symbols.Length);
Symbols\Metadata\MetadataMemberTests.cs (2)
398Assert.Equal(1, classC.InstanceConstructors.Length); 399Assert.Equal(1, classC.GetMembers(WellKnownMemberNames.StaticConstructorName).Length);
Symbols\Retargeting\RetargetingTests.cs (6)
698Assert.Equal(source.Length, retargeting.Length); 699for (int i = 0; i < source.Length; i++) 1203Assert.Equal(a.Length, b.Length); 1204for (int i = 0; i < a.Length; i++)
Symbols\Source\BaseClassTests.cs (3)
276Assert.Equal(1, members.Length); 281Assert.Equal(0, members2.Length); 313Assert.Equal(0, members.Length);
Symbols\Source\DeclaringSyntaxNodeTests.cs (7)
28Assert.Equal(expectedNumber, declaringReferences.Length); 83Assert.Equal(expectedNumber, declaringReferences.Length); 116Assert.Equal(expectedNumber, declaringReferences.Length); 349Assert.Equal(1, localType.Locations.Length); 361Assert.Equal(1, members.Length); 371Assert.Equal(1, member.DeclaringSyntaxReferences.Length); 382Assert.Equal(1, member.Locations.Length);
Symbols\Source\DelegateTests.cs (17)
93Assert.Equal(2, d.Length); 136Assert.Equal(1, v.DelegateInvokeMethod.Parameters.Length); 342Assert.Equal(3, invokeParameters.Length); 349Assert.Equal(5, beginInvokeParameters.Length); 358Assert.Equal(3, endInvokeParameters.Length); 396Assert.Equal(1, invokeParameters.Length); 401Assert.Equal(3, beginInvokeParameters.Length); 408Assert.Equal(2, endInvokeParameters.Length); 427Assert.Equal(1, invokeParameters.Length); 432Assert.Equal(3, beginInvokeParameters.Length); 439Assert.Equal(2, endInvokeParameters.Length); 458Assert.Equal(2, invokeParameters.Length); 464Assert.Equal(4, beginInvokeParameters.Length); 472Assert.Equal(3, endInvokeParameters.Length); 492Assert.Equal(2, invokeParameters.Length); 498Assert.Equal(4, beginInvokeParameters.Length); 506Assert.Equal(1, endInvokeParameters.Length);
Symbols\Source\ExternAliasTests.cs (1)
491Assert.Equal(1, externAliasSymbol.DeclaringSyntaxReferences.Length);
Symbols\Source\FieldTests.cs (2)
96Assert.Equal(2, gs.Length); 121Assert.Equal(2, fs.Length);
Symbols\Source\FileModifierTests.cs (5)
3513Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 3562Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 4288Assert.Equal(2, types.Length); 4317Assert.Equal(1, types.Length); 4344Assert.Equal(1, types.Length);
Symbols\Source\MethodTests.cs (4)
72Assert.Equal(ctorCount, ctors.Length); 213Assert.Equal(1, m.Length); 214Assert.Equal(1, m.First().Locations.Length); 428Assert.Equal(2, members.Length);
Symbols\Source\NullablePublicAPITests.cs (1)
2705Assert.Equal(4, symbolInfo.CandidateSymbols.Length);
Symbols\Source\PropertyTests.cs (8)
1926Assert.Equal(2, xs.Length); 2613Assert.Equal(2, comp.ExternalReferences.Length); 2631Assert.Equal(2, comp.ExternalReferences.Length); 2649Assert.Equal(2, comp.ExternalReferences.Length); 2667Assert.Equal(2, comp.ExternalReferences.Length); 2681Assert.Equal(2, comp.ExternalReferences.Length); 2706Assert.Equal(2, comp.ExternalReferences.Length); 2724Assert.Equal(2, comp.ExternalReferences.Length);
Symbols\Source\UsingAliasTests.cs (8)
71Assert.Equal(0, info4.CandidateSymbols.Length); 131Assert.Equal(0, info4.CandidateSymbols.Length); 186Assert.Equal(0, info4.CandidateSymbols.Length); 244Assert.Equal(0, info4.CandidateSymbols.Length); 487Assert.Equal(1, symbols.Length); 508Assert.Equal(1, symbols.Length); 711Assert.Equal(0, symbolInfo.CandidateSymbols.Length); 754Assert.Equal(0, symbolInfo.CandidateSymbols.Length);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1033)
Diagnostics\DiagnosticTest.cs (2)
2437Assert.Equal(1, compilation.GetDiagnostics().Length); 2438Assert.Equal(1, compilation.GetDiagnostics().Length);
IncrementalParsing\IncrementalParsingTests.cs (38)
52Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 53Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 100Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 101Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 115Assert.InRange(diffs.Length, 0, kinds.Length); 120if (diffI < diffs.Length && diffs[diffI].IsKind(kind)) 127Assert.Equal(diffI, diffs.Length); 136Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 137Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 153Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 154Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 169Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 170Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 187Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 188Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 205Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 206Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 221Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 222Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 243Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 244Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 265Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 266Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 289Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 290Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 314Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 315Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 333Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 334Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length); 356Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 366Assert.Equal(2, errors.Length); 400Assert.Equal(2, errors.Length); 411Assert.Equal(0, errors.Length); 1191Assert.Equal(0, syntaxTree.GetCompilationUnitRoot().Errors().Length); 1211Assert.Equal(0, syntaxTree.GetCompilationUnitRoot().Errors().Length); 1230Assert.Equal(0, syntaxTree.GetCompilationUnitRoot().Errors().Length); 3121Assert.Equal(0, oldTree.GetCompilationUnitRoot().Errors().Length); 3122Assert.Equal(0, newTree.GetCompilationUnitRoot().Errors().Length);
LexicalAndXml\LexicalTests.cs (226)
112Assert.Equal(0, errors.Length); 131Assert.Equal(0, errors.Length); 150Assert.Equal(0, errors.Length); 169Assert.Equal(0, errors.Length); 176Assert.Equal(0, errors.Length); 190Assert.Equal(0, errors.Length); 212Assert.Equal(0, errors.Length); 234Assert.Equal(0, errors.Length); 252Assert.Equal(1, errors.Length); 258Assert.Equal(1, errors.Length); 600Assert.Equal(0, errors.Length); 618Assert.Equal(0, errors.Length); 633Assert.Equal(0, errors.Length); 648Assert.Equal(0, errors.Length); 663Assert.Equal(0, errors.Length); 678Assert.Equal(0, errors.Length); 693Assert.Equal(0, errors.Length); 708Assert.Equal(0, errors.Length); 723Assert.Equal(0, errors.Length); 740Assert.Equal(0, errors.Length); 757Assert.Equal(0, errors.Length); 774Assert.Equal(0, errors.Length); 791Assert.Equal(0, errors.Length); 808Assert.Equal(0, errors.Length); 825Assert.Equal(1, errors.Length); 847Assert.Equal(0, errors.Length); 867Assert.Equal(0, errors.Length); 888Assert.Equal(0, errors.Length); 967Assert.Equal(0, errors.Length); 982Assert.Equal(0, errors.Length); 997Assert.Equal(0, errors.Length); 1012Assert.Equal(0, errors.Length); 1027Assert.Equal(0, errors.Length); 1042Assert.Equal(1, errors.Length); 1058Assert.Equal(1, errors.Length); 1074Assert.Equal(1, errors.Length); 1091Assert.Equal(0, errors.Length); 1107Assert.Equal(0, errors.Length); 1123Assert.Equal(0, errors.Length); 1139Assert.Equal(1, errors.Length); 1158Assert.Equal(1, errors.Length); 1177Assert.Equal(0, errors.Length); 1195Assert.Equal(0, errors.Length); 1211Assert.Equal(0, errors.Length); 1227Assert.Equal(0, errors.Length); 1243Assert.Equal(0, errors.Length); 1259Assert.Equal(0, errors.Length); 1275Assert.Equal(0, errors.Length); 1291Assert.Equal(0, errors.Length); 1307Assert.Equal(0, errors.Length); 1323Assert.Equal(0, errors.Length); 1339Assert.Equal(1, errors.Length); 1356Assert.Equal(0, errors.Length); 1372Assert.Equal(0, errors.Length); 1388Assert.Equal(1, errors.Length); 1404Assert.Equal(0, errors.Length); 1420Assert.Equal(0, errors.Length); 1436Assert.Equal(0, errors.Length); 1452Assert.Equal(0, errors.Length); 1468Assert.Equal(0, errors.Length); 1484Assert.Equal(1, errors.Length); 1500Assert.Equal(1, errors.Length); 1517Assert.Equal(1, errors.Length); 1534Assert.Equal(1, errors.Length); 1550Assert.Equal(2, errors.Length); 1568Assert.Equal(2, errors.Length); 1588Assert.Equal(0, errors.Length); 1602Assert.Equal(1, errors.Length); 1617Assert.Equal(1, errors.Length); 1632Assert.Equal(1, errors.Length); 1647Assert.Equal(1, errors.Length); 1662Assert.Equal(1, errors.Length); 1678Assert.Equal(1, errors.Length); 1694Assert.Equal(1, errors.Length); 1710Assert.Equal(1, errors.Length); 1726Assert.Equal(1, errors.Length); 1743Assert.Equal(0, errors.Length); 1759Assert.Equal(0, errors.Length); 1775Assert.Equal(0, errors.Length); 1791Assert.Equal(0, errors.Length); 1807Assert.Equal(0, errors.Length); 1822Assert.Equal(0, errors.Length); 1836Assert.Equal(1, errors.Length); 1851Assert.Equal(1, errors.Length); 1866Assert.Equal(1, errors.Length); 1881Assert.Equal(1, errors.Length); 1896Assert.Equal(1, errors.Length); 1914Assert.Equal(0, errors.Length); 1918Assert.Equal(1, errors.Length); 1934Assert.Equal(1, errors.Length); 1949Assert.Equal(0, errors.Length); 1964Assert.Equal(1, errors.Length); 1979Assert.Equal(0, errors.Length); 1994Assert.Equal(0, errors.Length); 2010Assert.Equal(0, errors.Length); 2026Assert.Equal(0, errors.Length); 2042Assert.Equal(0, errors.Length); 2058Assert.Equal(0, errors.Length); 2074Assert.Equal(0, errors.Length); 2090Assert.Equal(0, errors.Length); 2106Assert.Equal(0, errors.Length); 2122Assert.Equal(0, errors.Length); 2138Assert.Equal(0, errors.Length); 2154Assert.Equal(0, errors.Length); 2170Assert.Equal(0, errors.Length); 2186Assert.Equal(0, errors.Length); 2202Assert.Equal(0, errors.Length); 2218Assert.Equal(0, errors.Length); 2234Assert.Equal(0, errors.Length); 2250Assert.Equal(0, errors.Length); 2266Assert.Equal(0, errors.Length); 2276Assert.Equal(0, errors.Length); 2292Assert.Equal(0, errors.Length); 2302Assert.Equal(0, errors.Length); 2318Assert.Equal(0, errors.Length); 2328Assert.Equal(0, errors.Length); 2344Assert.Equal(0, errors.Length); 2354Assert.Equal(0, errors.Length); 2370Assert.Equal(0, errors.Length); 2380Assert.Equal(0, errors.Length); 2396Assert.Equal(0, errors.Length); 2405Assert.Equal(0, errors.Length); 2421Assert.Equal(0, errors.Length); 2431Assert.Equal(0, errors.Length); 2447Assert.Equal(0, errors.Length); 2457Assert.Equal(0, errors.Length); 2471Assert.Equal(1, errors.Length); 2487Assert.Equal(0, errors.Length); 2497Assert.Equal(0, errors.Length); 2513Assert.Equal(0, errors.Length); 2522Assert.Equal(0, errors.Length); 2538Assert.Equal(0, errors.Length); 2548Assert.Equal(0, errors.Length); 2564Assert.Equal(0, errors.Length); 2574Assert.Equal(0, errors.Length); 2589Assert.Equal(0, errors.Length); 2604Assert.Equal(0, errors.Length); 2620Assert.Equal(0, errors.Length); 2636Assert.Equal(0, errors.Length); 2652Assert.Equal(0, errors.Length); 2667Assert.Equal(1, errors.Length); 2682Assert.Equal(0, errors.Length); 2697Assert.Equal(0, errors.Length); 2712Assert.Equal(0, errors.Length); 2727Assert.Equal(1, errors.Length); 2743Assert.Equal(0, errors.Length); 2759Assert.Equal(0, errors.Length); 2775Assert.Equal(0, errors.Length); 2791Assert.Equal(0, errors.Length); 2807Assert.Equal(0, errors.Length); 2823Assert.Equal(0, errors.Length); 2839Assert.Equal(0, errors.Length); 2855Assert.Equal(0, errors.Length); 2871Assert.Equal(0, errors.Length); 2887Assert.Equal(0, errors.Length); 2903Assert.Equal(0, errors.Length); 2919Assert.Equal(0, errors.Length); 2935Assert.Equal(0, errors.Length); 2951Assert.Equal(0, errors.Length); 2967Assert.Equal(0, errors.Length); 2983Assert.Equal(0, errors.Length); 2999Assert.Equal(0, errors.Length); 3015Assert.Equal(0, errors.Length); 3030Assert.Equal(1, errors.Length); 3046Assert.Equal(1, errors.Length); 3061Assert.Equal(0, token.Errors().Length); 3070Assert.Equal(0, token.Errors().Length); 3079Assert.Equal(0, token.Errors().Length); 3088Assert.Equal(0, token.Errors().Length); 3097Assert.Equal(0, token.Errors().Length); 3106Assert.Equal(0, token.Errors().Length); 3115Assert.Equal(0, token.Errors().Length); 3129Assert.Equal(1, errors.Length); 3143Assert.Equal(0, token.Errors().Length); 3152Assert.Equal(0, token.Errors().Length); 3161Assert.Equal(0, token.Errors().Length); 3170Assert.Equal(0, token.Errors().Length); 3184Assert.Equal(1, errors.Length); 3193Assert.Equal(1, errors.Length); 3202Assert.Equal(1, errors.Length); 3211Assert.Equal(2, errors.Length); 3226Assert.Equal(0, token.Errors().Length); 3234Assert.Equal(1, errors.Length); 3245Assert.Equal(1, errors.Length); 3260Assert.Equal(1, errors.Length); 3271Assert.Equal(1, errors.Length); 3282Assert.Equal(1, errors.Length); 3293Assert.Equal(1, errors.Length); 3304Assert.Equal(1, errors.Length); 3315Assert.Equal(1, errors.Length); 3326Assert.Equal(1, errors.Length); 3337Assert.Equal(1, errors.Length); 3348Assert.Equal(1, errors.Length); 3359Assert.Equal(1, errors.Length); 3370Assert.Equal(2, errors.Length); 3388Assert.Equal(0, errors.Length); 3404Assert.Equal(0, errors.Length); 3420Assert.Equal(0, errors.Length); 3436Assert.Equal(0, errors.Length); 3457Assert.Equal(0, errors.Length); 3467Assert.Equal(0, errors.Length); 3477Assert.Equal(0, errors.Length); 3559Assert.Equal(1, errors.Length); 3571Assert.Equal(1, errors.Length); 3581Assert.Equal(1, errors.Length); 3591Assert.Equal(1, errors.Length); 3602Assert.Equal(0, errors.Length); 3785Assert.Equal(0, token.Errors().Length); 3792Assert.Equal(0, errors.Length); 3798Assert.Equal(1, errors.Length); 3855Assert.Equal(1, errors.Length); 3883Assert.Equal(1, errors.Length); 3962Assert.Equal(1, errors.Length); 3975Assert.Equal(1, errors.Length); 3999Assert.Equal(1, errors.Length); 4020Assert.Equal(1, errors.Length); 4040Assert.Equal(1, errors.Length); 4053Assert.Equal(1, errors.Length); 4068Assert.Equal(1, errors.Length); 4266Assert.Equal(1, errors.Length); 4281Assert.Equal(1, errors.Length); 4304Assert.Equal(1, errors.Length); 4326Assert.Equal(1, errors.Length); 4340Assert.Equal(1, errors.Length); 4355Assert.Equal(1, errors.Length); 4366Assert.Equal(1, errors.Length);
LexicalAndXml\PreprocessorTests.cs (1)
415Assert.Equal(1, diags.Length);
LexicalAndXml\XmlDocCommentTests.cs (116)
79Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 99Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 116Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 131Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 147Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 169Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 193Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 216Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 239Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 262Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 289Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 317Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 341Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 366Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 392Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 419Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 446Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 474Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 503Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 533Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 562Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 592Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 623Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 646Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 668Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 690Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 712Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 734Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 741Assert.NotEqual(0, doc.ErrorsAndWarnings().Length); 754Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 788Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 821Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 852Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 880Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 892Assert.Equal(1, cdata.ErrorsAndWarnings().Length); 905Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 917Assert.Equal(1, cdata.ErrorsAndWarnings().Length); 931Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 943Assert.Equal(1, cdata.ErrorsAndWarnings().Length); 956Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 968Assert.Equal(1, cdata.ErrorsAndWarnings().Length); 983Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1014Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1042Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1054Assert.Equal(1, comment.ErrorsAndWarnings().Length); 1067Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1079Assert.Equal(1, comment.ErrorsAndWarnings().Length); 1092Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1104Assert.Equal(1, comment.ErrorsAndWarnings().Length); 1119Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1152Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1183Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1197Assert.Equal(1, ProcessingInstruction.ErrorsAndWarnings().Length); 1209Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1223Assert.Equal(1, ProcessingInstruction.ErrorsAndWarnings().Length); 1236Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1250Assert.Equal(1, ProcessingInstruction.ErrorsAndWarnings().Length); 1264Assert.Equal(1, tree.GetCompilationUnitRoot().Errors().Length); 1297Assert.NotEqual(0, node.ErrorsAndWarnings().Length); 1309Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1333Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1358Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1382Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1407Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1431Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1456Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1480Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1505Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1516Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1527Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1538Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1549Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1560Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1588Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1616Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 1628Assert.NotEqual(0, element.Attributes[0].ErrorsAndWarnings().Length); 1642Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1675Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 1692Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 1709Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1748Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1790Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 1829Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1864Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1899Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1934Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 1969Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2006Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2044Assert.Equal(1, tree.GetCompilationUnitRoot().Errors().Length); // 4 errors because of the incomplete class decl 2057Assert.Equal(0, trivias[0].Errors().Length); 2080Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2111Assert.Equal(1, tree.GetCompilationUnitRoot().Errors().Length); // error because of the incomplete class decl 2123Assert.Equal(0, trivias[0].Errors().Length); 2144Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); // 4 errors because of the incomplete class decl 2154Assert.Equal(0, trivias[0].Errors().Length); 2174Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); // 4 errors because of the incomplete class decl 2184Assert.Equal(0, trivias[0].Errors().Length); 2205Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2214Assert.Equal(0, trivias[0].Errors().Length); 2242Assert.Equal(1, tree.GetCompilationUnitRoot().Errors().Length); 2255Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2283Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2325Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2359Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 2381Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 2411Assert.Equal(1, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 2465Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 2492Assert.Equal(2, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 2517Assert.Equal(2, tree.GetCompilationUnitRoot().Warnings().Length); 2594Assert.Equal(2, tree.GetCompilationUnitRoot().Warnings().Length); 2609Assert.Equal(1, tree.GetCompilationUnitRoot().Warnings().Length); 2623Assert.Equal(2, tree.GetCompilationUnitRoot().Warnings().Length); 2677Assert.Equal(0, tree.GetCompilationUnitRoot().Errors().Length); 2695Assert.Equal(4, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 2721Assert.Equal(4, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 2749Assert.Equal(2, doc.ErrorsAndWarnings().Length);
Parsing\DeclarationParsingTests.cs (151)
37Assert.Equal(0, file.Errors().Length); 60Assert.Equal(0, file.Errors().Length); 82Assert.Equal(0, file.Errors().Length); 106Assert.True(errors.Length > 0); 121Assert.True(errors.Length > 0); 136Assert.True(errors.Length > 0); 149Assert.Equal(0, file.Errors().Length); 171Assert.Equal(0, file.Errors().Length); 193Assert.Equal(0, file.Errors().Length); 215Assert.Equal(0, file.Errors().Length); 239Assert.Equal(0, file.Errors().Length); 263Assert.Equal(0, file.Errors().Length); 289Assert.Equal(0, file.Errors().Length); 318Assert.Equal(0, file.Errors().Length); 347Assert.Equal(0, file.Errors().Length); 374Assert.Equal(0, file.Errors().Length); 402Assert.Equal(0, file.Errors().Length); 432Assert.Equal(0, file.Errors().Length); 463Assert.Equal(0, file.Errors().Length); 499Assert.Equal(0, file.Errors().Length); 531Assert.Equal(0, file.Errors().Length); 568Assert.Equal(0, file.Errors().Length); 590Assert.Equal(0, file.Errors().Length); 611Assert.Equal(0, file.Errors().Length); 633Assert.Equal(0, file.Errors().Length); 656Assert.Equal(0, file.Errors().Length); 678Assert.Equal(0, file.Errors().Length); 701Assert.Equal(0, file.Errors().Length); 723Assert.Equal(1, file.Errors().Length); 747Assert.Equal(0, file.Errors().Length); 778Assert.Equal(0, file.Errors().Length); 804Assert.Equal(0, file.Errors().Length); 831Assert.Equal(0, file.Errors().Length); 858Assert.Equal(0, file.Errors().Length); 885Assert.Equal(0, file.Errors().Length); 912Assert.Equal(0, file.Errors().Length); 939Assert.Equal(0, file.Errors().Length); 966Assert.Equal(0, file.Errors().Length); 993Assert.Equal(0, file.Errors().Length); 1021Assert.Equal(0, file.Errors().Length); 1048Assert.Equal(0, file.Errors().Length); 1079Assert.Equal(0, file.Errors().Length); 1111Assert.Equal(0, file.Errors().Length); 1153Assert.Equal(0, errors.Length); 1214Assert.Equal(0, file.Errors().Length); 1258Assert.Equal(0, file.Errors().Length); 1299Assert.Equal(0, file.Errors().Length); 1340Assert.Equal(0, file.Errors().Length); 1396Assert.Equal(0, file.Errors().Length); 1451Assert.Equal(2, file.Errors().Length); 1497Assert.Equal(3, file.Errors().Length); 1541Assert.Equal(0, file.Errors().Length); 1601Assert.Equal(0, file.Errors().Length); 1626Assert.Equal(0, file.Errors().Length); 1656Assert.Equal(0, file.Errors().Length); 1688Assert.Equal(0, file.Errors().Length); 1713Assert.Equal(0, file.Errors().Length); 1753Assert.Equal(0, file.Errors().Length); 1794Assert.Equal(0, file.Errors().Length); 1835Assert.Equal(0, file.Errors().Length); 1877Assert.Equal(0, file.Errors().Length); 1919Assert.Equal(0, file.Errors().Length); 1960Assert.Equal(0, file.Errors().Length); 2001Assert.Equal(0, file.Errors().Length); 2028Assert.Equal(0, file.Errors().Length); 2056Assert.Equal(0, file.Errors().Length); 2103Assert.Equal(0, file.Errors().Length); 2149Assert.Equal(0, file.Errors().Length); 2184Assert.Equal(0, file.Errors().Length); 2219Assert.Equal(0, file.Errors().Length); 2261Assert.Equal(0, file.Errors().Length); 2297Assert.Equal(0, file.Errors().Length); 2333Assert.Equal(0, file.Errors().Length); 2370Assert.Equal(0, errors.Length); 2403Assert.Equal(0, file.Errors().Length); 2439Assert.Equal(0, file.Errors().Length); 2481Assert.Equal(0, file.Errors().Length); 2527Assert.Equal(0, file.Errors().Length); 2573Assert.Equal(0, file.Errors().Length); 2618Assert.Equal(1, file.Errors().Length); 2648Assert.Equal(1, file.Errors().Length); 2676Assert.Equal(0, file.Errors().Length); 2744Assert.Equal(0, file.Errors().Length); 2791Assert.Equal(0, file.Errors().Length); 2838Assert.Equal(0, file.Errors().Length); 2888Assert.Equal(0, file.Errors().Length); 2929Assert.Equal(0, file.Errors().Length); 2975Assert.Equal(3, file.Errors().Length); 2990Assert.Equal(0, file.Errors().Length); 3042Assert.Equal(0, file.Errors().Length); 3103Assert.Equal(0, file.Errors().Length); 3168Assert.Equal(0, file.Errors().Length); 3242Assert.Equal(0, file.Errors().Length); 3307Assert.Equal(0, file.Errors().Length); 3359Assert.Equal(0, file.Errors().Length); 3405Assert.Equal(0, file.Errors().Length); 3474Assert.Equal(0, file.Errors().Length); 3486Assert.Equal(0, file.Errors().Length); 3521Assert.Equal(0, file.Errors().Length); 3568Assert.Equal(0, file.Errors().Length); 3605Assert.Equal(0, file.Errors().Length); 3665Assert.Equal(0, file.Errors().Length); 3705Assert.Equal(0, file.Errors().Length); 3759Assert.Equal(0, file.Errors().Length); 3815Assert.Equal(0, file.Errors().Length); 3860Assert.Equal(0, file.Errors().Length); 3904Assert.Equal(0, file.Errors().Length); 3949Assert.Equal(0, file.Errors().Length); 4003Assert.Equal(0, file.Errors().Length); 4066Assert.Equal(0, file.Errors().Length); 4112Assert.Equal(0, file.Errors().Length); 4166Assert.Equal(0, file.Errors().Length); 4221Assert.Equal(0, file.Errors().Length); 4294Assert.Equal(0, file.Errors().Length); 4348Assert.Equal(0, file.Errors().Length); 4402Assert.Equal(0, file.Errors().Length); 4456Assert.Equal(0, file.Errors().Length); 4465Assert.Equal(0, ps.Errors().Length); 4486Assert.Equal(0, file.Errors().Length); 4542Assert.Equal(0, file.Errors().Length); 4598Assert.Equal(0, file.Errors().Length); 4682Assert.Equal(0, file.Errors().Length); 4738Assert.Equal(0, file.Errors().Length); 4792Assert.Equal(0, file.Errors().Length); 4875Assert.Equal(0, file.Errors().Length); 4932Assert.Equal(0, file.Errors().Length); 4999Assert.Equal(0, file.Errors().Length); 5067Assert.Equal(0, file.Errors().Length); 5134Assert.Equal(0, file.Errors().Length); 5210Assert.Equal(0, file.Errors().Length); 5278Assert.Equal(0, file.Errors().Length); 5358Assert.Equal(0, file.Errors().Length); 5472Assert.Equal(0, file.Errors().Length); 5535Assert.Equal(0, file.Errors().Length); 5583Assert.Equal(0, file.Errors().Length); 5630Assert.Equal(0, file.Errors().Length); 5634Assert.Equal(0, ns.Errors().Length); 5642Assert.Equal(0, file.Errors().Length); 5646Assert.Equal(0, ns.Errors().Length); 5654Assert.Equal(0, file.Errors().Length); 5658Assert.Equal(0, ns.Errors().Length); 5706Assert.Equal(1, file.Errors().Length); 5778Assert.Equal(0, file.Errors().Length); 5796Assert.Equal(0, file.Errors().Length); 5881Assert.Equal(0, file.Errors().Length); 5936Assert.Equal(0, file.Errors().Length); 5949Assert.Equal(0, file.Errors().Length); 5964Assert.Equal(0, file.Errors().Length); 5990Assert.Equal(0, file.Errors().Length); 6366Assert.Equal(0, file.Errors().Length); 6387Assert.Equal(0, file.Errors().Length);
Parsing\ExpressionParsingTests.cs (76)
40Assert.Equal(1, expr.Errors().Length); 435Assert.Equal(0, expr.Errors().Length); 447Assert.Equal(0, expr.Errors().Length); 458Assert.Equal(0, expr.Errors().Length); 481Assert.Equal(0, expr.Errors().Length); 513Assert.Equal(0, expr.Errors().Length); 528Assert.Equal(0, expr.Errors().Length); 543Assert.Equal(0, expr.Errors().Length); 557Assert.Equal(0, expr.Errors().Length); 572Assert.Equal(0, expr.Errors().Length); 603Assert.Equal(0, expr.Errors().Length); 629Assert.Equal(0, expr.Errors().Length); 675Assert.Equal(0, expr.Errors().Length); 710Assert.Equal(0, expr.Errors().Length); 735Assert.Equal(0, expr.Errors().Length); 768Assert.Equal(0, expr.Errors().Length); 819Assert.Equal(0, expr.Errors().Length); 882Assert.Equal(0, expr.Errors().Length); 903Assert.Equal(0, expr.Errors().Length); 933Assert.Equal(0, expr.Errors().Length); 954Assert.Equal(0, expr.Errors().Length); 975Assert.Equal(0, expr.Errors().Length); 1000Assert.Equal(0, expr.Errors().Length); 1025Assert.Equal(0, expr.Errors().Length); 1050Assert.Equal(0, expr.Errors().Length); 1071Assert.Equal(0, expr.Errors().Length); 1096Assert.Equal(0, expr.Errors().Length); 1121Assert.Equal(0, expr.Errors().Length); 1142Assert.Equal(0, expr.Errors().Length); 1164Assert.Equal(0, expr.Errors().Length); 1187Assert.Equal(0, expr.Errors().Length); 1210Assert.Equal(0, expr.Errors().Length); 1238Assert.Equal(0, expr.Errors().Length); 1261Assert.Equal(0, expr.Errors().Length); 1285Assert.Equal(0, expr.Errors().Length); 1311Assert.Equal(0, expr.Errors().Length); 1335Assert.Equal(0, expr.Errors().Length); 1363Assert.Equal(0, expr.Errors().Length); 1841Assert.Equal(0, expr.Errors().Length); 1863Assert.Equal(0, expr.Errors().Length); 1887Assert.Equal(0, expr.Errors().Length); 1909Assert.Equal(0, expr.Errors().Length); 1929Assert.Equal(0, expr.Errors().Length); 1950Assert.Equal(0, expr.Errors().Length); 1981Assert.Equal(0, expr.Errors().Length); 2011Assert.Equal(0, expr.Errors().Length); 2036Assert.Equal(0, expr.Errors().Length); 2054Assert.Equal(0, expr.Errors().Length); 2072Assert.Equal(0, expr.Errors().Length); 2092Assert.Equal(0, expr.Errors().Length); 2112Assert.Equal(0, expr.Errors().Length); 2132Assert.Equal(0, expr.Errors().Length); 2154Assert.Equal(0, expr.Errors().Length); 2178Assert.Equal(0, expr.Errors().Length); 2205Assert.Equal(0, expr.Errors().Length); 2230Assert.Equal(0, expr.Errors().Length); 2257Assert.Equal(0, expr.Errors().Length); 2277Assert.Equal(0, expr.Errors().Length); 2298Assert.Equal(0, expr.Errors().Length); 2331Assert.Equal(0, expr.Errors().Length); 2364Assert.Equal(0, expr.Errors().Length); 2415Assert.Equal(0, expr.Errors().Length); 2455Assert.Equal(0, expr.Errors().Length); 2498Assert.Equal(0, expr.Errors().Length); 2543Assert.Equal(0, expr.Errors().Length); 2588Assert.Equal(0, expr.Errors().Length); 2637Assert.Equal(0, expr.Errors().Length); 2685Assert.Equal(0, expr.Errors().Length); 2733Assert.Equal(0, expr.Errors().Length); 2772Assert.Equal(0, expr.Errors().Length); 2825Assert.Equal(0, expr.Errors().Length); 2881Assert.Equal(0, expr.Errors().Length); 2936Assert.Equal(0, expr.Errors().Length); 2993Assert.Equal(0, expr.Errors().Length); 3044Assert.NotEqual(0, expr.Errors().Length); 4766Assert.Equal(0, expr.Errors().Length);
Parsing\NameParsingTests.cs (36)
38Assert.Equal(0, name.Errors().Length); 51Assert.Equal(1, name.Errors().Length); 64Assert.Equal(1, name.Errors().Length); 78Assert.Equal(2, name.Errors().Length); 93Assert.Equal(2, name.Errors().Length); 108Assert.Equal(2, name.Errors().Length); 123Assert.Equal(0, name.Errors().Length); 138Assert.Equal(0, name.Errors().Length); 151Assert.Equal(0, name.Errors().Length); 164Assert.Equal(0, name.Errors().Length); 170Assert.Equal(0, name.Errors().Length); 193Assert.Equal(1, name.Errors().Length); 199Assert.Equal(0, name.Errors().Length); 211Assert.Equal(0, name.Errors().Length); 227Assert.Equal(0, name.Errors().Length); 243Assert.Equal(0, name.Errors().Length); 303Assert.Equal(0, name.Errors().Length); 320Assert.Equal(0, name.Errors().Length); 338Assert.Equal(0, name.Errors().Length); 352Assert.Equal(0, name.Errors().Length); 366Assert.Equal(0, name.Errors().Length); 383Assert.Equal(0, name.Errors().Length); 444Assert.Equal(0, name.Errors().Length); 495Assert.Equal(0, name.Errors().Length); 510Assert.Equal(0, name.Errors().Length); 536Assert.Equal(0, name.Errors().Length); 558Assert.Equal(0, name.Errors().Length); 580Assert.Equal(0, name.Errors().Length); 611Assert.Equal(0, name.Errors().Length); 633Assert.Equal(1, arg.Errors().Length); 658Assert.Equal(1, arg.Errors().Length); 684Assert.Equal(1, arg.Errors().Length); 711Assert.Equal(1, arg.Errors().Length); 717Assert.Equal(0, arg2.Errors().Length); 742Assert.Equal(1, arg.Errors().Length); 767Assert.Equal(2, arg.Errors().Length);
Parsing\ParsingErrorRecoveryTests.cs (287)
243Assert.Equal(3, file.Errors().Length); 259Assert.Equal(3, file.Errors().Length); 275Assert.Equal(3, file.Errors().Length); 292Assert.Equal(2, file.Errors().Length); 308Assert.Equal(2, file.Errors().Length); 323Assert.Equal(2, file.Errors().Length); 338Assert.Equal(2, file.Errors().Length); 353Assert.Equal(2, file.Errors().Length); 368Assert.Equal(3, file.Errors().Length); 384Assert.Equal(3, file.Errors().Length); 400Assert.Equal(2, file.Errors().Length); 415Assert.Equal(3, file.Errors().Length); 431Assert.Equal(3, file.Errors().Length); 452Assert.Equal(3, file.Errors().Length); 468Assert.Equal(3, file.Errors().Length); 485Assert.Equal(2, file.Errors().Length); 501Assert.Equal(2, file.Errors().Length); 516Assert.Equal(1, file.Errors().Length); 530Assert.Equal(1, file.Errors().Length); 544Assert.Equal(1, file.Errors().Length); 558Assert.Equal(2, file.Errors().Length); 573Assert.Equal(1, file.Errors().Length); 611Assert.Equal(3, file.Errors().Length); 627Assert.Equal(2, file.Errors().Length); 642Assert.Equal(2, file.Errors().Length); 657Assert.Equal(1, file.Errors().Length); 671Assert.Equal(2, file.Errors().Length); 686Assert.Equal(2, file.Errors().Length); 701Assert.Equal(3, file.Errors().Length); 717Assert.Equal(4, file.Errors().Length); 734Assert.Equal(5, file.Errors().Length); 752Assert.Equal(3, file.Errors().Length); 768Assert.Equal(1, file.Errors().Length); 782Assert.Equal(1, file.Errors().Length); 796Assert.Equal(1, file.Errors().Length); 810Assert.Equal(1, file.Errors().Length); 824Assert.Equal(1, file.Errors().Length); 848Assert.Equal(0, file.Errors().Length); 862Assert.Equal(3, file.Errors().Length); 879Assert.Equal(2, file.Errors().Length); 895Assert.Equal(3, file.Errors().Length); 912Assert.Equal(3, file.Errors().Length); 928Assert.Equal(2, file.Errors().Length); 943Assert.Equal(1, file.Errors().Length); 957Assert.Equal(2, file.Errors().Length); 972Assert.Equal(2, file.Errors().Length); 987Assert.Equal(1, file.Errors().Length); 1001Assert.Equal(0, file.Errors().Length); 1014Assert.Equal(1, file.Errors().Length); 1028Assert.Equal(0, file.Errors().Length); 1041Assert.Equal(1, file.Errors().Length); 1055Assert.Equal(1, file.Errors().Length); 1069Assert.Equal(0, file.Errors().Length); 1082Assert.Equal(1, file.Errors().Length); 1096Assert.Equal(0, file.Errors().Length); 1109Assert.Equal(1, file.Errors().Length); 1123Assert.Equal(3, file.Errors().Length); 1139Assert.Equal(2, file.Errors().Length); 1154Assert.Equal(1, file.Errors().Length); 1168Assert.Equal(1, file.Errors().Length); 1182Assert.Equal(3, file.Errors().Length); 1198Assert.Equal(2, file.Errors().Length); 1213Assert.Equal(1, file.Errors().Length); 1227Assert.Equal(1, file.Errors().Length); 1241Assert.Equal(4, file.Errors().Length); 1258Assert.Equal(3, file.Errors().Length); 1274Assert.Equal(2, file.Errors().Length); 1289Assert.Equal(1, file.Errors().Length); 1303Assert.Equal(2, file.Errors().Length); 1318Assert.Equal(2, file.Errors().Length); 1333Assert.Equal(1, file.Errors().Length); 1347Assert.Equal(2, file.Errors().Length); 1362Assert.Equal(2, file.Errors().Length); 1377Assert.Equal(1, file.Errors().Length); 1392Assert.Equal(4, file.Errors().Length); 1410Assert.Equal(3, file.Errors().Length); 1427Assert.Equal(4, file.Errors().Length); 1444Assert.Equal(2, file.Errors().Length); 1459Assert.Equal(1, file.Errors().Length); 1473Assert.Equal(2, file.Errors().Length); 1488Assert.Equal(2, file.Errors().Length); 1503Assert.Equal(1, file.Errors().Length); 1517Assert.Equal(2, file.Errors().Length); 1536Assert.Equal(1, file.Errors().Length); 1554Assert.Equal(1, file.Errors().Length); 1572Assert.Equal(2, file.Errors().Length); 1591Assert.Equal(3, file.Errors().Length); 1611Assert.Equal(2, file.Errors().Length); 1630Assert.Equal(3, file.Errors().Length); 1649Assert.Equal(1, file.Errors().Length); 1666Assert.Equal(1, file.Errors().Length); 1683Assert.Equal(2, file.Errors().Length); 1701Assert.Equal(2, file.Errors().Length); 1719Assert.Equal(3, file.Errors().Length); 1738Assert.Equal(2, file.Errors().Length); 1756Assert.Equal(4, file.Errors().Length); 1776Assert.Equal(1, file.Errors().Length); 1793Assert.Equal(1, file.Errors().Length); 1810Assert.Equal(2, file.Errors().Length); 1828Assert.Equal(1, file.Errors().Length); 1845Assert.Equal(3, file.Errors().Length); 1865Assert.Equal(2, file.Errors().Length); 1884Assert.Equal(3, file.Errors().Length); 1904Assert.Equal(2, file.Errors().Length); 1923Assert.Equal(4, file.Errors().Length); 1944Assert.Equal(1, file.Errors().Length); 1961Assert.Equal(1, file.Errors().Length); 1978Assert.Equal(1, file.Errors().Length); 1995Assert.Equal(1, file.Errors().Length); 2010Assert.Equal(1, file.Errors().Length); 2027Assert.Equal(3, file.Errors().Length); 2066Assert.Equal(4, file.Errors().Length); 2086Assert.Equal(3, file.Errors().Length); 2105Assert.Equal(5, file.Errors().Length); 2126Assert.Equal(2, file.Errors().Length); 2144Assert.Equal(1, file.Errors().Length); 2175Assert.Equal(2, file.Errors().Length); 2193Assert.Equal(1, file.Errors().Length); 2210Assert.Equal(3, file.Errors().Length); 2230Assert.Equal(3, file.Errors().Length); 2270Assert.Equal(4, file.Errors().Length); 2291Assert.Equal(3, file.Errors().Length); 2311Assert.Equal(5, file.Errors().Length); 2333Assert.Equal(2, file.Errors().Length); 2348Assert.Equal(5, file.Errors().Length); 2366Assert.Equal(4, file.Errors().Length); 2383Assert.Equal(3, file.Errors().Length); 2399Assert.Equal(2, file.Errors().Length); 2414Assert.Equal(3, file.Errors().Length); 2430Assert.Equal(2, file.Errors().Length); 2445Assert.Equal(1, file.Errors().Length); 2459Assert.Equal(4, file.Errors().Length); 2477Assert.Equal(5, file.Errors().Length); 2496Assert.Equal(4, file.Errors().Length); 2514Assert.Equal(3, file.Errors().Length); 2531Assert.Equal(2, file.Errors().Length); 2547Assert.Equal(3, file.Errors().Length); 2564Assert.Equal(2, file.Errors().Length); 2580Assert.Equal(1, file.Errors().Length); 2595Assert.Equal(4, file.Errors().Length); 2612Assert.Equal(1, file.Errors().Length); 2626Assert.Equal(2, file.Errors().Length); 2641Assert.Equal(1, file.Errors().Length); 2655Assert.Equal(3, file.Errors().Length); 2671Assert.Equal(1, file.Errors().Length); 2685Assert.Equal(1, file.Errors().Length); 2699Assert.Equal(1, file.Errors().Length); 2713Assert.Equal(1, file.Errors().Length); 2727Assert.Equal(1, file.Errors().Length); 2741Assert.Equal(1, file.Errors().Length); 2755Assert.Equal(2, file.Errors().Length); 2770Assert.Equal(2, file.Errors().Length); 2785Assert.Equal(1, file.Errors().Length); 2799Assert.Equal(1, file.Errors().Length); 2813Assert.Equal(1, file.Errors().Length); 2828Assert.Equal(1, file.Errors().Length); 2843Assert.Equal(1, file.Errors().Length); 2858Assert.Equal(1, file.Errors().Length); 2874Assert.Equal(2, file.Errors().Length); 2891Assert.Equal(1, file.Errors().Length); 2907Assert.Equal(3, file.Errors().Length); 2925Assert.Equal(1, file.Errors().Length); 2941Assert.Equal(1, file.Errors().Length); 2957Assert.Equal(1, file.Errors().Length); 2973Assert.Equal(1, file.Errors().Length); 2989Assert.Equal(1, file.Errors().Length); 3007Assert.Equal(1, file.Errors().Length); 3025Assert.Equal(1, file.Errors().Length); 3047Assert.Equal(2, file.Errors().Length); 3070Assert.Equal(3, file.Errors().Length); 3094Assert.Equal(3, file.Errors().Length); 3118Assert.Equal(1, file.Errors().Length); 3140Assert.Equal(2, file.Errors().Length); 3163Assert.Equal(2, file.Errors().Length); 3186Assert.Equal(2, file.Errors().Length); 3209Assert.Equal(2, file.Errors().Length); 3232Assert.Equal(2, file.Errors().Length); 3254Assert.Equal(1, file.Errors().Length); 3275Assert.Equal(1, file.Errors().Length); 3296Assert.Equal(1, file.Errors().Length); 3317Assert.Equal(1, file.Errors().Length); 3338Assert.Equal(1, file.Errors().Length); 3359Assert.Equal(1, file.Errors().Length); 3380Assert.Equal(2, file.Errors().Length); 3404Assert.Equal(1, file.Errors().Length); 3427Assert.Equal(1, file.Errors().Length); 3450Assert.Equal(1, file.Errors().Length); 3473Assert.Equal(2, file.Errors().Length); 3497Assert.Equal(1, file.Errors().Length); 3520Assert.Equal(1, file.Errors().Length); 3543Assert.Equal(2, file.Errors().Length); 3561Assert.Equal(3, file.Errors().Length); 3587Assert.Equal(2, file.Errors().Length); 3612Assert.Equal(2, file.Errors().Length); 3637Assert.Equal(3, file.Errors().Length); 3662Assert.Equal(2, file.Errors().Length); 3686Assert.Equal(2, file.Errors().Length); 3710Assert.Equal(3, file.Errors().Length); 3736Assert.Equal(1, file.Errors().Length); 3760Assert.Equal(1, file.Errors().Length); 3784Assert.Equal(1, file.Errors().Length); 3808Assert.Equal(2, file.Errors().Length); 3833Assert.Equal(1, file.Errors().Length); 3857Assert.Equal(1, file.Errors().Length); 3881Assert.Equal(2, file.Errors().Length); 3907Assert.Equal(2, file.Errors().Length); 3933Assert.Equal(2, file.Errors().Length); 3959Assert.Equal(3, file.Errors().Length); 3985Assert.Equal(2, file.Errors().Length); 4010Assert.Equal(2, file.Errors().Length); 4035Assert.Equal(3, file.Errors().Length); 4058Assert.Equal(1, file.Errors().Length); 4080Assert.Equal(1, diags.Length); 4124Assert.Equal(1, file.Errors().Length); 4145Assert.Equal(1, file.Errors().Length); 4166Assert.Equal(1, file.Errors().Length); 4187Assert.Equal(2, file.Errors().Length); 4209Assert.Equal(2, file.Errors().Length); 4231Assert.Equal(3, file.Errors().Length); 4254Assert.Equal(3, file.Errors().Length); 4277Assert.Equal(1, file.Errors().Length); 4298Assert.Equal(2, file.Errors().Length); 4321Assert.Equal(2, file.Errors().Length); 4370Assert.Equal(1, file.Errors().Length); 4392Assert.Equal(5, file.Errors().Length); 4418Assert.Equal(7, file.Errors().Length); 4445Assert.Equal(1, file.Errors().Length); 4466Assert.Equal(3, file.Errors().Length); 4489Assert.Equal(5, file.Errors().Length); 4539Assert.Equal(2, file.Errors().Length); 4561Assert.Equal(4, file.Errors().Length); 4592Assert.Equal(0, file.Errors().Length); 4618Assert.Equal(1, file.Errors().Length); 4645Assert.Equal(1, file.Errors().Length); 4672Assert.Equal(2, file.Errors().Length); 4700Assert.Equal(1, file.Errors().Length); 4727Assert.Equal(1, file.Errors().Length); 4755Assert.Equal(2, file.Errors().Length); 4784Assert.Equal(2, file.Errors().Length); 4813Assert.Equal(3, file.Errors().Length); 4843Assert.Equal(2, file.Errors().Length); 4872Assert.Equal(2, file.Errors().Length); 4900Assert.Equal(1, file.Errors().Length); 4927Assert.Equal(1, file.Errors().Length); 4954Assert.Equal(1, file.Errors().Length); 4981Assert.Equal(2, file.Errors().Length); 5009Assert.Equal(1, file.Errors().Length); 5036Assert.Equal(1, file.Errors().Length); 5064Assert.Equal(0, file.Errors().Length); 5090Assert.Equal(4, file.Errors().Length); 5120Assert.Equal(3, file.Errors().Length); 5149Assert.Equal(4, file.Errors().Length); 5179Assert.Equal(3, file.Errors().Length); 5872Assert.Equal(2, file.Errors().Length); 5901Assert.Equal(2, file.Errors().Length); 5930Assert.Equal(3, file.Errors().Length); 5960Assert.Equal(2, file.Errors().Length); 6022Assert.Equal(1, file.Errors().Length); 6049Assert.Equal(1, file.Errors().Length); 6076Assert.Equal(1, file.Errors().Length); 6103Assert.Equal(2, file.Errors().Length); 6131Assert.Equal(1, file.Errors().Length); 6219Assert.Equal(2, file.Errors().Length); 6329Assert.Equal(3, file.Errors().Length); 6413Assert.Equal(0, file.Errors().Length); 6438Assert.Equal(1, file.Errors().Length); 6472Assert.Equal(2, file.Errors().Length); 6511Assert.Equal(2, file.Errors().Length); 6550Assert.Equal(2, file.Errors().Length); 6583Assert.Equal(1, file.Errors().Length); 6613Assert.Equal(2, file.Errors().Length); 6658Assert.Equal(2, file.Errors().Length); 6703Assert.Equal(1, file.Errors().Length); 6751Assert.Equal(2, file.Errors().Length); 6797Assert.Equal(4, file.Errors().Length); 6845Assert.Equal(3, file.Errors().Length); 6896Assert.Equal(4, file.Errors().Length); 6932Assert.Equal(3, subitem1.Errors().Length); 6943Assert.Equal(3, subitem2.Errors().Length); 7069Assert.Equal(1, file.Errors().Length); 7084Assert.Equal(1, file.Errors().Length); 7099Assert.Equal(3, file.Errors().Length); 7151Assert.Equal(1, file.Errors().Length); 7253Assert.Equal(1, file.Errors().Length); 7273Assert.Equal(0, file.Errors().Length); 7333Assert.Equal(3, file.Errors().Length); 7358Assert.Equal(2, file.Errors().Length);
Parsing\ParsingTests.cs (2)
351for (int skip = 0; skip < tokens.Length; skip++) 355for (int i = 0; i < tokens.Length; i++)
Parsing\RoundTrippingTests.cs (2)
37Assert.NotEqual(0, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length); 41Assert.Equal(errorCount, tree.GetCompilationUnitRoot().ErrorsAndWarnings().Length);
Parsing\StatementParsingTests.cs (95)
61Assert.Equal(0, statement.Errors().Length); 81Assert.Equal(0, statement.Errors().Length); 101Assert.Equal(0, statement.Errors().Length); 120Assert.Equal(0, statement.Errors().Length); 140Assert.Equal(0, statement.Errors().Length); 159Assert.Equal(0, statement.Errors().Length); 190Assert.Equal(0, statement.Errors().Length); 218Assert.Equal(0, statement.Errors().Length); 248Assert.Equal(0, statement.Errors().Length); 282Assert.Equal(0, statement.Errors().Length); 323Assert.Equal(0, statement.Errors().Length); 351Assert.Equal(0, statement.Errors().Length); 377Assert.Equal(0, statement.Errors().Length); 403Assert.Equal(0, statement.Errors().Length); 429Assert.Equal(0, statement.Errors().Length); 455Assert.Equal(0, statement.Errors().Length); 481Assert.Equal(0, statement.Errors().Length); 507Assert.Equal(0, statement.Errors().Length); 542Assert.Equal(0, statement.Errors().Length); 572Assert.Equal(0, statement.Errors().Length); 617Assert.Equal(0, statement.Errors().Length); 648Assert.Equal(0, statement.Errors().Length); 679Assert.Equal(1, statement.Errors().Length); 711Assert.Equal(1, statement.Errors().Length); 743Assert.Equal(1, statement.Errors().Length); 775Assert.Equal(0, statement.Errors().Length); 801Assert.Equal(0, statement.Errors().Length); 832Assert.Equal(0, statement.Errors().Length); 873Assert.Equal(0, statement.Errors().Length); 900Assert.Equal(0, statement.Errors().Length); 930Assert.Equal(0, statement.Errors().Length); 958Assert.Equal(0, statement.Errors().Length); 974Assert.Equal(0, statement.Errors().Length); 995Assert.Equal(0, statement.Errors().Length); 1014Assert.Equal(0, statement.Errors().Length); 1033Assert.Equal(0, statement.Errors().Length); 1055Assert.Equal(0, statement.Errors().Length); 1079Assert.Equal(0, statement.Errors().Length); 1102Assert.Equal(0, statement.Errors().Length); 1122Assert.Equal(0, statement.Errors().Length); 1143Assert.Equal(0, statement.Errors().Length); 1167Assert.Equal(0, statement.Errors().Length); 1190Assert.Equal(0, statement.Errors().Length); 1210Assert.Equal(0, statement.Errors().Length); 1231Assert.Equal(0, statement.Errors().Length); 1261Assert.Equal(0, statement.Errors().Length); 1290Assert.Equal(0, statement.Errors().Length); 1314Assert.Equal(0, statement.Errors().Length); 1357Assert.Equal(0, statement.Errors().Length); 1380Assert.Equal(0, statement.Errors().Length); 1425Assert.Equal(0, statement.Errors().Length); 1442Assert.Equal(0, statement.Errors().Length); 1459Assert.Equal(0, statement.Errors().Length); 1476Assert.Equal(0, statement.Errors().Length); 1498Assert.Equal(0, statement.Errors().Length); 1523Assert.Equal(0, statement.Errors().Length); 1549Assert.Equal(0, statement.Errors().Length); 1586Assert.Equal(0, statement.Errors().Length); 1625Assert.Equal(0, statement.Errors().Length); 1734Assert.Equal(0, statement.Errors().Length); 1763Assert.Equal(0, statement.Errors().Length); 1793Assert.Equal(0, statement.Errors().Length); 1823Assert.Equal(0, statement.Errors().Length); 1853Assert.Equal(0, statement.Errors().Length); 1884Assert.Equal(0, statement.Errors().Length); 1927Assert.Equal(0, statement.Errors().Length); 1956Assert.Equal(1, statement.Errors().Length); 1989Assert.Equal(0, statement.Errors().Length); 2020Assert.Equal(0, statement.Errors().Length); 2043Assert.Equal(0, statement.Errors().Length); 2069Assert.Equal(0, statement.Errors().Length); 2103Assert.Equal(0, statement.Errors().Length); 2124Assert.Equal(0, statement.Errors().Length); 2126Assert.Equal(0, diags.Length); 2149Assert.Equal(0, statement.Errors().Length); 2184Assert.Equal(0, statement.Errors().Length); 2231Assert.Equal(0, statement.Errors().Length); 2264Assert.Equal(0, statement.Errors().Length); 2306Assert.Equal(0, statement.Errors().Length); 2342Assert.Equal(0, statement.Errors().Length); 2364Assert.Equal(0, statement.Errors().Length); 2398Assert.Equal(0, statement.Errors().Length); 2457Assert.Equal(0, statement.Errors().Length); 2493Assert.Equal(0, statement.Errors().Length); 2625Assert.Equal(0, statement.Errors().Length); 2797Assert.Equal(0, statement.Errors().Length); 2841Assert.Equal(0, statement.Errors().Length); 2922Assert.Equal(0, statement.Errors().Length); 2944Assert.Equal(0, statement.Errors().Length); 3005Assert.Equal(0, statement.Errors().Length); 3027Assert.Equal(0, statement.Errors().Length); 3077Assert.Equal(0, statement.Errors().Length); 3099Assert.Equal(0, statement.Errors().Length); 3375Assert.Equal(0, statement.Errors().Length); 3555Assert.Equal(1, statement.Errors().Length);
Syntax\SyntaxFactoryTests.cs (1)
63Assert.Equal(0, n.Errors().Length);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (20)
CompilationTestUtils.cs (3)
32Assert.Equal(descriptions.Length, symbols.Length); 47Assert.Equal(descriptions.Length, symbols.Length); 62Assert.Equal(descriptions.Length, symbols.Length);
CSharpTestBase.cs (4)
1368if (resolvedReferences.Count() > used.Length) 1670Assert.True(compilation.SyntaxTrees.Length > treeIndex, "Compilation has enough trees"); 1691Assert.True(compilation.SyntaxTrees.Length > treeIndex, "Compilation has enough trees"); 1965var result = new ILVisualizer.LocalInfo[localInfos.Length];
Extensions.cs (11)
215m => m.Parameters.Length == primaryConstructor.Parameters.Length && 239for (int i = 0; i < parts.Length - 1; i++) 254return lastContainer.GetMembers(parts[parts.Length - 1]); 262for (int i = 0; i < parts.Length - 1; i++) 277return lastContainer.GetMembers(parts[parts.Length - 1]); 284if (members.Length == 0) 288else if (members.Length > 1) 300if (members.Length == 0) 304else if (members.Length > 1) 500if (!(expArgs.Count() == actArgs.Length))
TestAttributesVisitor.cs (2)
165if (arguments.Length > 0) 177for (int i = 0; i < values.Length; i++)
Microsoft.CodeAnalysis.CSharp.Workspaces (60)
Formatting\CSharpSyntaxFormattingService.cs (1)
124if (changes.Length > 0)
Recommendations\CSharpRecommendationServiceRunner_Conversions.cs (1)
168if (method.Parameters.Length != 1)
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (3)
73return symbol.Parameters.Length == 1 && symbol.ReturnType.IsValueType; 87return symbol.Parameters.Length == 2 && symbol.ReturnType.IsValueType; 96return symbol.Parameters.Length == 2 && symbol.ReturnType.SpecialType == SpecialType.System_Boolean;
Rename\CSharpRenameRewriterLanguageService.cs (2)
355if (symbols.Length == 1) 754if (locals.Length > 0)
Simplification\CSharpSimplificationService.Expander.cs (2)
745if (((IMethodSymbol)symbol).TypeArguments.Length != 0) 844if (namedTypedSymbol.TypeArguments.Length != 0)
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
227return scopes.Any(static s => s.Aliases.Length > 0); 299if (boundSymbols.Length == 1)
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
423if (rightSymbol.ContainingType is { TypeArguments.Length: 0 } containingType &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (2)
46if (tupleType.TupleElements.Length != tuple.Arguments.Count) 157containingType.TypeArguments.Length == 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
56if (leadingDirectives.Length == 0) 59return closeBraceLeadingDirectives.Length == 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
30if (results.Length > 0) 443if (semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken).Symbol is IMethodSymbol member && index < member.Parameters.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
571if (directives.Length > 0) 825method.Parameters.Length > 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (8)
633if (namedCastedType.TypeArguments.Length != 1 && originalNamedConvertedType.TypeArguments.Length != 1) 1157if (oldInterpolationOperation.Parts.Length != newInterpolationOperation.Parts.Length) 1160for (int i = 0, n = oldInterpolationOperation.Parts.Length; i < n; i++) 1454if (originalParameters.Length != rewrittenParameters.Length) 1457for (var i = 0; i < originalParameters.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
226if (memberGroup.Length != 1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
84if (attribute.ConstructorArguments.Length == 0 && attribute.NamedArguments.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (2)
63var isExplicit = method.ExplicitInterfaceImplementations.Length > 0; 110if (method.ExplicitInterfaceImplementations.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
273if (info.Context.ReuseSyntax && symbol.DeclaringSyntaxReferences.Length == 1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
151if (attributes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
129if (members.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (2)
92var isExplicit = method.ExplicitInterfaceImplementations.Length > 0; 114if (method.ExplicitInterfaceImplementations.Length == 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (2)
50var result = new FixedSizeArrayBuilder<ParameterSyntax>(parameterDefinitions.Length); 124if (attributes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (2)
27=> property.IsIndexer || property.Parameters.Length == 0; 150if (attributes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\TypeParameterGenerator.cs (1)
21return typeParameters.Length == 0
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1027if (symbols.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (3)
193if (symbol.TypeParameters.Length == 0) 204? Enumerable.Repeat((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length) 231if (symbol.IsTupleType && symbol.TupleElements.Length >= 2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
78if (typeSymbol.DeclaringSyntaxReferences.Length >= 2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (11)
452var constructors = type.InstanceConstructors.Where(m => m.Parameters.Length > index); 464var constructors = type.InstanceConstructors.Where(m => m.Parameters.Length > index); 570.Where(p => p.IsIndexer && p.Parameters.Length > index); 619if (method.TypeArguments.Length == 0) 706if (inferredNamedType.TypeArguments.Length == returnNamedType.TypeArguments.Length) 708for (int i = 0, n = inferredNamedType.TypeArguments.Length; i < n; i++) 754var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length; 791if (index < parameterSet.Length) 1994return memberType is INamedTypeSymbol namedType && namedType.TypeArguments.Length == 1 2255return inferredFutureUsage.Length > 0 ? inferredFutureUsage[0].InferredType : Compilation.ObjectType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\CSharpInitializeParameterService.cs (1)
84for (int i = 0, n = tupleLeft.Elements.Length; i < n; i++)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (22)
CodeGeneration\SymbolEditorTests.cs (22)
83Assert.Equal(1, newSymbol.GetMembers("m").Length); 115Assert.Equal(1, newSymbol.GetMembers("m").Length); 116Assert.Equal(0, newSymbol.GetMembers("m2").Length); 119Assert.Equal(1, newSymbol.GetMembers("m").Length); 120Assert.Equal(1, newSymbol.GetMembers("m2").Length); 152Assert.Equal(1, newSymbol.GetMembers("m").Length); 153Assert.Equal(0, newSymbol.GetMembers("m2").Length); 156Assert.Equal(1, newSymbol.GetMembers("m").Length); 157Assert.Equal(1, newSymbol.GetMembers("m2").Length); 199Assert.Equal(1, newSymbolA.GetMembers("ma").Length); 202Assert.Equal(1, newSymbolB.GetMembers("mb").Length); 245Assert.Equal(1, newSymbolA.GetMembers("ma").Length); 248Assert.Equal(1, newSymbolB.GetMembers("mb").Length); 360Assert.Equal(1, newSymbol.GetMembers("m").Length); 397Assert.Equal(1, newSymbol.GetMembers("m").Length); 438Assert.Equal(1, newSymbol.GetMembers("m").Length); 442Assert.Equal(1, newSymbol2.GetMembers("m").Length); 443Assert.Equal(1, newSymbol2.GetMembers("m2").Length); 484Assert.Equal(1, newSymbol.GetMembers("m").Length); 489Assert.Equal(1, newSymbol2.GetMembers("m").Length); 490Assert.Equal(1, newSymbol2.GetMembers("m2").Length); 534Assert.Equal(1, newSymbol.GetMembers("m").Length);
Microsoft.CodeAnalysis.Debugging.Package (10)
CustomDebugInfoEncoder.cs (2)
122builder.WriteInt32(s.Length); 187builder.WriteInt32(info.Names.Length);
CustomDebugInfoReader.cs (8)
218while (offset < bytes.Length) 422var resultBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(groupSizes.Length); 430if (pos >= importStrings.Length) 453for (; pos < importStrings.Length; pos++) 470if (pos < importStrings.Length) 521if (i + sizeof(int) > bytes.Length) 533if (i + sizeof(short) > bytes.Length) 545if (i + sizeof(byte) > bytes.Length)
Microsoft.CodeAnalysis.EditorFeatures (32)
CodeActions\CodeActionEditHandlerService.cs (8)
189Debug.Assert(operationsList.Length > 0); 190if (operationsList.Length > 1) 206if (projectChanges.Length != 1) 232if (changedAdditionalDocuments.Length + changedDocuments.Length + changedAnalyzerConfigDocuments.Length != 1) 244if (changedDocuments.Length == 1) 248else if (changedAdditionalDocuments.Length == 1)
CodeDefinitionWindow\DefinitionContextTracker.cs (1)
147if (navigableItems.Length > 0)
EditAndContinue\ActiveStatementTrackingService.cs (6)
197if (openDocumentIds.Length == 0) 212Debug.Assert(openDocumentIds.Length == baseActiveStatementSpans.Length); 265Debug.Assert(oldSpans.Length == newSpans.Length); 269for (var i = 0; i < oldSpans.Length; i++) 282lazyBuilder = ArrayBuilder<ActiveStatementTrackingSpan>.GetInstance(oldSpans.Length);
GoToDefinition\AbstractGoToCommandHandler`2.cs (1)
186if (definitions.Length > 0)
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
159if (RenameSymbol.Locations.Length > 1)
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (6)
361var bufferContainsLinkedDocuments = documentReplacements.Length > 1 && firstDocumentReplacements.document != null; 383if (replacements.Length != firstDocumentReplacements.Item2.Length) 389for (var i = 0; i < replacements.Length; i++) 420for (var i = 0; i < replacements.Length; i++) 611var result = new FixedSizeArrayBuilder<InlineRenameReplacement>(relevantReplacements.Length);
IntelliSense\AsyncCompletion\CompletionSource.cs (2)
484if (elements.Length == 0) 487if (elements.Length == 1)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (5)
338=> i - _snapshotData.Defaults.Length; 957_needToFilter = _selectedNonExpanderFilters.Length > 0 && _selectedNonExpanderFilters.Length < _nonExpanderFilterStates.Length; 960_needToFilterExpanded = _unselectedExpanders.Length > 0;
IntelliSense\AsyncCompletion\RecentItemsManager.cs (1)
38if (items.Length == MaxMRUSize)
ReferenceHighlighting\NavigateToHighlightReferenceCommandHandler.cs (1)
105var length = orderedTagSpans.Length;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (11)
AbstractCommandHandlerTestState.cs (1)
94_textView.Selection.Mode = selectionSpanList.Length > 1
Completion\AbstractArgumentProviderTests`1.cs (3)
88if (arguments.Length < GetMinimumArgumentCount(parameters)) 91if (arguments.Length > GetMaximumArgumentCount(parameters)) 116=> parameters.Any(parameter => parameter.IsParams) ? int.MaxValue : parameters.Length;
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
31for (var i = 0; i < documents.Length; i++)
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
30for (var i = 0; i < documents.Length; i++)
RefactoringHelpers\RefactoringHelpersTestBase.cs (3)
76!spans.TryGetValue(string.Empty, out var selections) || selections.Length != 1) 90!spans.TryGetValue(string.Empty, out var selections) || selections.Length != 1 || 91!spans.TryGetValue("result", out var results) || results.Length != 1)
Structure\AbstractSyntaxStructureProviderTests.cs (2)
89Assert.True(spans.ContainsKey(textSpanName) && spans[textSpanName].Length == 1, $"Test did not specify '{textSpanName}' span."); 90Assert.True(spans.ContainsKey(hintSpanName) && spans[hintSpanName].Length == 1, $"Test did not specify '{hintSpanName}' span.");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (27)
CodeFixes\CodeFixServiceTests.cs (1)
432ContextDiagnosticsCount = context.Diagnostics.Length;
CodeFixes\ExtensionOrderingTests.cs (1)
145for (var i = 1; i < actualOrder.Length; i++)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
461for (var i = 0; i < analyzers.Length; i++)
InheritanceMargin\InheritanceMarginTests.cs (3)
116Assert.Equal(sortedExpectedItems.Length, sortedActualItems.Length); 129Assert.Equal(expectedItem.Targets.Length, actualItem.TargetItems.Length); 135for (var i = 0; i < expectedTargets.Length; i++)
StackTraceExplorer\StackTraceExplorerTests.cs (1)
67Assert.Equal(contents.Length, frames.Length);
Structure\BlockStructureServiceTests.cs (4)
43Assert.Equal(4, spans.Length); 67Assert.Equal(4, spans.Length); 91Assert.Equal(4, spans.Length); 107Assert.Equal(1, spans.Length);
Utilities\StackFrameUtils.cs (3)
131Assert.True(expected.Length == actual.Length, diffMessage); 133for (var i = 0; i < expected.Length; i++)
ValueTracking\AbstractBaseValueTrackingTests.cs (3)
45Assert.True(itemInfo.Length == items.Length, $"GetTrackedItemsAsync\n\texpected: [{string.Join(",", itemInfo.Select(p => p.text))}]\n\t actual: [{string.Join(",", items)}]"); 47for (var i = 0; i < items.Length; i++) 58Assert.True(childInfo.Length == children.Length, $"GetTrackedItemsAsync on [{item}]\n\texpected: [{string.Join(",", childInfo.Select(p => p.text))}]\n\t actual: [{string.Join(",", children)}]");
ValueTracking\CSharpValueTrackingTests.cs (7)
187Assert.Equal(2, initialItems.Length); 215Assert.Equal(2, initialItems.Length); 250Assert.Equal(1, initialItems.Length); 393Assert.Equal(1, initialItems.Length); 534Assert.Equal(1, initialItems.Length); 665Assert.Equal(1, initialItems.Length); 746Assert.Equal(1, initialItems.Length);
ValueTracking\VisualBasicValueTrackingTests.cs (3)
54Assert.Equal(2, initialItems.Length); 167Assert.Equal(2, initialItems.Length); 193Assert.Equal(2, initialItems.Length);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (8)
InlineHints\InlineHintsTag.cs (3)
209if (taggedTexts.Length == 1) 219else if (taggedTexts.Length >= 2) 226for (var i = 1; i < taggedTexts.Length - 1; i++)
InlineRename\UI\Dashboard\RenameDashboardViewModel.cs (1)
68var totalSpansCount = renameLocations.Length;
StringIndentation\StringIndentationTag.cs (3)
53if (this.OrderedHoleSpans.Length != other.OrderedHoleSpans.Length) 56for (int i = 0, n = this.OrderedHoleSpans.Length; i < n; i++)
Suggestions\SuggestedActions\SuggestedAction.cs (1)
259if (tags.Length > 0)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
FindReferences\FindReferencesTests.vb (1)
554Assert.Equal(expectedLinkedSymbolCount, linkedSymbols.Length)
IntelliSense\CompletionRulesTests.vb (1)
71Assert.Equal(1, highlightedSpans.Length)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (14)
DkmUtilities.cs (2)
194if (!previousMetadataBlocks.IsDefault && index < previousMetadataBlocks.Length) 351$"EE: AppDomain {appDomain.Id}, blocks {context.MetadataBlocks.Length}, contexts {context.AssemblyContexts.Count}" + Environment.NewLine,
ExpressionCompiler.cs (1)
241if (newReferences.Length > 0)
ImmutableArrayExtensions.cs (1)
14for (int i = 0; i < array.Length; i++)
InstructionDecoder.cs (2)
75var includeArgumentValues = argumentValues != null && parameters.Length == argumentValues.Count; 79for (int i = 0; i < parameters.Length; i++)
PDB\MethodDebugInfo.Native.cs (8)
304importRecordGroupBuilder = ArrayBuilder<ImmutableArray<ImportRecord>>.GetInstance(importStringGroups.Length); 307var groupBuilder = ArrayBuilder<ImportRecord>.GetInstance(importStringGroup.Length); 324externAliasRecordBuilder = ArrayBuilder<ExternAliasRecord>.GetInstance(externAliasStrings.Length); 699if (localInfo.Length == 0) 710Debug.Assert(localInfo.Length >= names.Length); 712for (int i = 0; i < localInfo.Length; i++) 714string? name = (i < names.Length) ? names[i] : null;
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (3)
MetadataDecoder.cs (1)
163if (typeArgumentOffset != typeArguments.Length)
MetadataResolver.cs (2)
242if (propertyParameters.Length == 0) 372return typeArguments.Length == typeParameters.Count - offset;
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (2)
FunctionResolverTestBase.cs (2)
105if (typeParameters.Length > 0) 172if (typeArguments.Length > 0)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmInspectionSession.cs (1)
88if (index == _implementations.Length)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (3)
InlineHints\FSharpInlineHint.cs (1)
27if (displayParts.Length == 0)
Internal\NavigateTo\FSharpNavigateToSearchService.cs (2)
43if (results.Length > 0) 64if (results.Length > 0)
Microsoft.CodeAnalysis.ExternalAccess.Razor (2)
RazorSpanMappingServiceWrapper.cs (2)
53var roslynSpans = new MappedSpanResult[razorSpans.Length]; 54for (var i = 0; i < razorSpans.Length; i++)
Microsoft.CodeAnalysis.Features (412)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
75for (var i = 0; i < _missingParameters.Length; ++i)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (1)
143=> parameters.Length == 0 || !parameters.Last().IsOptional;
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (2)
102if (constructorParams.Length == 2) 119=> constructorParams.Length != 0 &&
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
164Debug.Assert(banner.Length > 0);
AddFileBanner\AddFileBannerHelpers.cs (1)
59var result = new FixedSizeArrayBuilder<SyntaxTrivia>(banner.Length);
AddImport\AbstractAddImportFeatureService.cs (2)
153if (exactReferences.Length > 0) 522var result = new FixedSizeArrayBuilder<(Diagnostic, ImmutableArray<AddImportFixData>)>(diagnostics.Length);
BraceMatching\AbstractDirectiveTriviaBraceMatcher.cs (2)
48if (matchingDirectives.Length > 0) 49matchingDirective = matchingDirectives[(matchingDirectives.IndexOf(directive) + 1) % matchingDirectives.Length];
ChangeSignature\AbstractChangeSignatureService.cs (13)
262var declaredSymbolParametersCount = GetParameters(declaredSymbol).Length; 325if (methodSymbol.Parameters.Length != declaredSymbolParametersCount) 479var argumentsToPermute = arguments.Take(declarationParametersToPermute.Length).ToList(); 485for (var i = 0; i < declarationParametersToPermute.Length; i++) 560for (var i = declarationParametersToPermute.Length; i < arguments.Length; i++) 584if (realParameters.Length > updatedSignature.OriginalConfiguration.ToListOfParameters().Length) 632if (position >= originalParameters.Length) 840if (indexInListOfPreexistingArguments == parameters.Length - 1 && 1005if (index < permutedParamNodes.Length) 1023while (index < permutedParamNodes.Length) 1047if (argumentCount > methodSymbol.Parameters.Length) 1052if (argumentCount == methodSymbol.Parameters.Length)
ChangeSignature\SignatureChange.cs (1)
110for (var i = 0; i < originalListWithoutRemovedOrAdded.Length; i++)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
352var builder = new FixedSizeArrayBuilder<(string optionName, string currentOptionValue, bool isPerLanguage)>(codeStyleOptions.Length);
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
78var hasMultipleOptions = codeStyleOptions.Length > 1;
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (6)
59if (diagnosticsAndCodeActions.Length > 0) 64FixAllLogger.LogFixesToMergeStats(functionId, fixAllState.CorrelationId, diagnosticsAndCodeActions.Length); 160if (result.Length > 0) 165FixAllLogger.LogFixesToMergeStats(functionId, fixAllState.CorrelationId, result.Length); 309if (orderedDocuments.Length == 1) 319Debug.Assert(orderedDocuments.Length > 1);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
57for (var i = 0; i < pragmaActions.Length; i++)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (4)
78var index = isStartToken ? triviaList.Length - 1 : 0; 79while (index >= 0 && index < triviaList.Length) 95triviaAtIndex = index >= 0 && index < triviaList.Length 177if (index < trivia.Length)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (1)
161var builder = new FixedSizeArrayBuilder<SyntaxNode>(attributeRemoveFixes.Length);
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (1)
203using var _ = ArrayBuilder<CodeActionOperation>.GetInstance(operations.Length, out var result);
CodeLens\CodeLensReferencesService.cs (2)
296for (var index = 0; index < parts.Length; index++) 301index < parts.Length - 1)
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
46for (var i = expressions.Length - 1; i >= 0; i--)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
226if (operations.Length == 0)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (2)
102var result = new FixedSizeArrayBuilder<SyntaxNode>(syntaxNodes.Length); 103for (int i = 0, n = syntaxNodes.Length; i < n; i++)
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (11)
127if (originalNamespaceDeclarations.Length == 0) 139for (var i = 0; i < originalNamespaceDeclarations.Length; i++) 155Debug.Assert(namespaces.Length == originalNamespaceDeclarations.Length); 279using var _1 = ArrayBuilder<(DocumentId, SyntaxNode)>.GetInstance(ids.Length, out var containers); 335&& typeSymbol.DeclaringSyntaxReferences.Length > 1 390for (var i = 1; i <= parts.Length; ++i) 403var builder = new FixedSizeArrayBuilder<SyntaxNode>(names.Length); 404for (var i = 0; i < names.Length; ++i) 604Debug.Assert(containersToAddImports.Length > 0); 823if (containers.Length > 1)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (4)
32=> _newfolders.Length > 0 91var candidates = Enumerable.Range(1, parts.Length) 102var newParts = index >= parts.Length 104: ImmutableArray.Create(parts, index, parts.Length - index);
Common\GlyphExtensions.cs (1)
16var builder = ImmutableArray.CreateBuilder<Glyph>(initialCapacity: tags.Length);
Completion\CommonCompletionItem.cs (1)
45if (!description.IsDefault && description.Length > 0)
Completion\CommonCompletionUtilities.cs (1)
157return CreateDescriptionAsync(workspaceServices, semanticModel, position, symbol, overloadCount: symbols.Length - 1, options, supportedPlatforms, cancellationToken);
Completion\CompletionItem.cs (1)
201if (_properties.Length > 10)
Completion\CompletionService_GetCompletions.cs (1)
156var additionalAugmentingProviders = ArrayBuilder<CompletionProvider>.GetInstance(triggeredProviders.Length);
Completion\FileSystemCompletionHelper.cs (1)
239if (_allowableExtensions.Length != 0 &&
Completion\Providers\AbstractCrefCompletionProvider.cs (1)
34if (symbols.Length == 0)
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
47methodSymbol.Parameters.Length == 0)
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (1)
108return overridableMembers.Length > 0;
Completion\Providers\AbstractSymbolCompletionProvider.cs (3)
112capacity: symbols.Length, 186for (index = 0; index < symbolList.Length; ++index) 194return index < symbolList.Length;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
167bestSymbol = currentValue.bestSymbol.Parameters.Length > symbol.Parameters.Length ? symbol : currentValue.bestSymbol;
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
101var builder = new FixedSizeArrayBuilder<KeyValuePair<string, string>>(attributeItems.Length + 1);
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (1)
79builder.EnsureCapacity(ItemInfos.Length);
Completion\Providers\SymbolCompletionItem.cs (5)
110if (symbols.Length > 1) 114else if (symbols.Length == 1) 146if (linkedIds.Length > 0) 194if (symbols.Length == 0) 363if (symbols.Length != 0)
Completion\Providers\UnionCompletionItemComparer.cs (1)
24=> Hash.Combine(obj.DisplayText.GetHashCode(), obj.Tags.Length);
Completion\Utilities.cs (2)
20if (changes.Length == 0) 24else if (changes.Length == 1)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (2)
232var classNameNode = classSymbol.TypeParameters.Length == 0 330for (var i = 0; i < originalProperties.Length; i++)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
153if (model.GetOperation(foreachStatement, cancellationToken) is not IForEachLoopOperation operation || operation.Locals.Length != 1)
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
88if (semanticModel.GetOperation(forStatement, cancellationToken) is not ILoopOperation { Locals.Length: 1 })
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
146case IBlockOperation { Operations: { Length: 1 } statements }:
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
75if (Destinations.Length == 1)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
145using var _ = ArrayBuilder<SyntaxNode>.GetInstance(pieces.Length, out var content);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
262var namedAndUnnamedArguments = afterPlaceholderArguments.Skip(unnamedArguments.Length).ToImmutableArray(); 313index >= 0 && index < expressions.Length)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (5)
94if (recordChildActions.Length > 0) 106if (childActions.Length > 0) 673if (fields1.Length != fields2.Length) 678for (var i = 0; i < fields1.Length; i++)
Debugging\AbstractBreakpointResolver.cs (3)
166(nameAndArity.Arity == 0 || nameAndArity.Arity == typeSymbol.TypeArguments.Length); 287IMethodSymbol method => method.Parameters.Length != parameterCount, 288IPropertySymbol property => property.Parameters.Length != parameterCount,
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
73if (info.Symbol == null && info.CandidateSymbols.Length == 0)
Diagnostics\DiagnosticArguments.cs (2)
101Debug.Assert(projectAnalyzerIds.Length > 0 || hostAnalyzerIds.Length > 0);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
216symbol.Locations.Length > 0)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (17)
746var map = new Dictionary<SyntaxNode, EditKind>(editScript.Edits.Length); 792Debug.Assert(oldActiveStatements.Length == newActiveStatements.Count); 793Debug.Assert(oldActiveStatements.Length == newExceptionRegions.Count); 951Debug.Assert(newActiveStatementSpans.IsEmpty || oldActiveStatements.Length == newActiveStatementSpans.Length); 952Debug.Assert(oldActiveStatements.IsEmpty || oldActiveStatements.Length == newActiveStatements.Count); 2455oldMethod.TypeParameters.Length == newMethod.TypeParameters.Length && 2515if (editScript.Edits.Length == 0 && triviaEdits.Count == 0) 4602for (var i = 0; i < newAttributes.Length; i++) 5667using var _1 = ArrayBuilder<int>.GetInstance(newInLambdaCaptures.Length, fillWithValue: 0, out var reverseCapturesMap); 5670using var _2 = ArrayBuilder<SyntaxNode?>.GetInstance(newInLambdaCaptures.Length, fillWithValue: null, out var newCapturesToClosureScopes); 5674using var _3 = ArrayBuilder<SyntaxNode?>.GetInstance(oldInLambdaCaptures.Length, fillWithValue: null, out var oldCapturesToClosureScopes); 5990var result = BitVector.Create(captures.Length); 6015for (var i = 0; i < array.Length; i++) 6170for (var oldCaptureIndex = 0; oldCaptureIndex < oldCaptures.Length; oldCaptureIndex++) 6189for (var newCaptureIndex = 0; newCaptureIndex < newCaptures.Length; newCaptureIndex++)
EditAndContinue\ActiveStatementsMap.cs (2)
307if (start == spans.Length) 325while (end < spans.Length && startPositionComparer(spans[end], spanStart) == 0)
EditAndContinue\DebuggingSession.cs (3)
648for (var i = 0; i < documentIds.Length; i++) 741spans.AddMany([], documentIds.Length); 775Debug.Assert(spans.Count == documentIds.Length);
EditAndContinue\DocumentActiveStatementChanges.cs (6)
22Contract.ThrowIfFalse(oldSpans.Length == newStatements.Length); 23Contract.ThrowIfFalse(oldSpans.Length == newExceptionRegions.Length); 26for (var i = 0; i < oldSpans.Length; i++) 29Debug.Assert(oldSpans[i].ExceptionRegions.Spans.Length == newExceptionRegions[i].Length);
EditAndContinue\DocumentAnalysisResults.cs (3)
153Debug.Assert(lineEditsOpt.Select(edit => edit.FileName).Distinct().Count() == lineEditsOpt.Length); 159Debug.Assert(exceptionRegionsOpt.Length == activeStatementsOpt.Length);
EditAndContinue\EditSession.cs (7)
124if (emitResult.ChangedTypes.Length == 0) 644if (analysis.ActiveStatements.Length > 0) 1201Debug.Assert(oldActiveStatements.Length == newExceptionRegions.Length); 1202Debug.Assert(newActiveStatements.Length == newExceptionRegions.Length); 1204for (var i = 0; i < newActiveStatements.Length; i++)
EditAndContinue\Utilities\Extensions.cs (3)
179=> method.Parameters.Length > 0 && 180method.Parameters.Length == constructor.Parameters.Length &&
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (1)
174var parameter = argIndex < parameters.Length ? parameters[argIndex.Value] : null;
EmbeddedLanguages\EmbeddedLanguageDetector.cs (2)
196if (impl is not IMethodSymbol { Parameters.Length: >= 1 } method) 464if (attribute.ConstructorArguments.Length == 0)
EmbeddedLanguages\Json\JsonNodes.cs (6)
34internal override int ChildCount => Sequence.Length + 1; 38if (index == Sequence.Length) 145internal override int ChildCount => 2 + Sequence.Length; 152if (index == Sequence.Length + 1) 298internal override int ChildCount => Sequence.Length + 4; 311if (index == Sequence.Length + 3)
EmbeddedLanguages\Json\JsonParser.cs (1)
180else if (sequence.Length >= 2)
EmbeddedLanguages\Json\JsonParser.JsonNetSyntaxChecks.cs (1)
163for (int i = 0, n = sequence.Length - 1; i < n; i++)
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (3)
131for (int i = 0, n = sequence.Length; i < n; i++) 146if (!allowTrailingComma && sequence.Length != 0 && sequence.Length % 2 == 0)
EmbeddedLanguages\StackFrame\StackFrameNodeDefinitions.cs (2)
330internal override int ChildCount => 1 + ArrayRankSpecifiers.Length; 362internal override int ChildCount => 2 + CommaTokens.Length;
EncapsulateField\AbstractEncapsulateFieldService.cs (2)
64if (fields.Length == 1) 142Contract.ThrowIfTrue(fields.Length == 0);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (1)
107m[AnalyzerCount] = reordered.Length;
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
145using var _2 = ArrayBuilder<ExtractClassMemberAnalysisResult>.GetInstance(memberAnalysisResults.Length, out var remainingResults);
ExtractMethod\MethodExtractor.Analyzer.cs (2)
423var result = new FixedSizeArrayBuilder<VariableInfo>(variableInfo.Length); 455for (var i = 0; i < variableInfo.Length; i++)
ExtractMethod\MethodExtractor.VariableSymbol.cs (3)
221Contract.ThrowIfFalse(_localSymbol.Locations.Length == 1); 222Contract.ThrowIfFalse(other._localSymbol.Locations.Length == 1); 243Contract.ThrowIfFalse(_localSymbol.Locations.Length == 1);
ExtractMethod\UniqueNameGenerator.cs (1)
28n => _semanticModel.LookupSymbols(contextNode.SpanStart, container: null, n).Length == 0);
FindUsages\DefinitionItem.cs (2)
137Contract.ThrowIfFalse(classifiedSpans.IsEmpty || sourceSpans.Length == classifiedSpans.Length);
FindUsages\DefinitionsAndReferences.cs (1)
39for (int i = 0, n = references.Length; i < n; i++)
FullyQualify\AbstractFullyQualifyService.cs (1)
241if (looksGeneric && searchResult.TypeArguments.Length == 0)
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
246method.Parameters.Length >= 2 &&
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (5)
105orderby c.Parameters.Length descending 106where c.Parameters.Length > 0 && c.Parameters.Length < parameters.Length 109let symbolTypes = parameters.Take(c.Parameters.Length).Select(p => p.Type)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (3)
131m.Parameters.Length == 2 && 162.Any(m => m.Parameters.Length == 1 && !m.IsStatic); 166.Any(m => m.Parameters.Length == 0 && !m.IsStatic);
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (2)
54if (result.IsCanceled || result.Members.Length == 0) 62var afterThisLocation = result.Members.Length == 1
GenerateType\AbstractGenerateTypeService.cs (1)
80if (actions.Length > 1)
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
630property.Parameters.Length == 0 &&
GoToBase\AbstractGoToBaseService.cs (1)
45if (bases.Length == 0 && symbol is IMethodSymbol { MethodKind: MethodKind.Constructor } constructor)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
564var projectState = definition.SourceSpans.Length > 0 709if (locations.Length > 1)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (2)
297invocation.Arguments.Length == 1 && 431for (var i = parameterIndex + 1; i < methodSymbol.Parameters.Length; i++)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (6)
167if (parameters.Length < 2) 364Debug.Assert(parameters.Length >= 2); 365Debug.Assert(fieldsOrProperties.Length > 0); 366Debug.Assert(parameters.Length == fieldsOrProperties.Length); 379for (var i = 0; i < parameters.Length; i++)
InlineHints\InlineHint.cs (1)
46if (displayParts.Length == 0)
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
488return parametersWithVariableDeclarationArgument.Length == 1
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (2)
110if (operation?.Declarations.Length != 1) 114if (localDeclaration.Declarators.Length != 1)
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (3)
286=> subsequentStatementRanges.Length == 1 && IsSingleStatementStatementRange(subsequentStatementRanges[0]); 350singleExitPoint = flow.ExitPoints.Length == 1 ? flow.ExitPoints[0] : null; 357return subsequentStatementRanges.Length == 1 &&
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (3)
67if (directStructuralTypeReferences.Length == 0) 79if (transitiveStructuralTypeReferences.Length > 0) 85for (var i = 0; i < transitiveStructuralTypeReferences.Length; i++)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (3)
284Contract.ThrowIfFalse(symbolGroup.Length > 0); 293Contract.ThrowIfFalse(symbolGroup.Length > 0); 734var count = typeParameters.Length;
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (2)
36if (symbols.Length == 0) 48if (symbols.Length == 0)
MetadataAsSource\AbstractMetadataAsSourceService.DocCommentFormatter.cs (7)
45if (parameterNames.Length > 0) 50for (var i = 0; i < parameterNames.Length; i++) 69if (typeParameterNames.Length > 0) 74for (var i = 0; i < typeParameterNames.Length; i++) 103if (exceptionTypes.Length > 0) 108for (var i = 0; i < exceptionTypes.Length; i++) 112for (var j = 0; j < rawExceptionTexts.Length; j++)
NameTupleElement\AbstractNameTupleElementCodeRefactoringProvider.cs (1)
67if (elements.IsDefaultOrEmpty || argumentIndex >= elements.Length)
NavigateTo\AbstractNavigateToSearchService.cs (1)
40using var _1 = ArrayBuilder<INavigateToSearchResult>.GetInstance(items.Length, out var results);
NavigateTo\AbstractNavigateToSearchService.InProcess.cs (2)
230for (var i = s_kindPairs.Length - 1; i >= 0; i--) 320return (int)item < _lookupTable.Length
NavigateTo\NavigateToSearcher.cs (2)
240var projectCount = orderedProjects.Sum(g => g.Length); 388using var _ = ArrayBuilder<INavigateToSearchResult>.GetInstance(results.Length, out var nonDuplicates);
NavigationBar\AbstractNavigationBarItemService.cs (1)
54if (allReferences.Length == 0)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
204if (sourceDocuments.Length == 0)
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
134=> symbols.Length > 0
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
128if (quickInfoItem.RelatedSpans.Length > 0)
QuickInfo\QuickInfoSection.cs (1)
51if (TaggedParts.Length == 0)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (5)
115getMethod.Parameters.Length == 0 && 117getMethod.DeclaringSyntaxReferences.Length == 1 && 148setMethod.DeclaringSyntaxReferences.Length == 1; 440Debug.Assert(method.DeclaringSyntaxReferences.Length == 1); 456if (definition?.DeclaringSyntaxReferences.Length > 0)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (4)
139.Any(m => m.Parameters.Length == 0); 149.Any(m => m.Parameters.Length == 1 && 322if (definition?.DeclaringSyntaxReferences.Length > 0) 417Debug.Assert(property.DeclaringSyntaxReferences.Length == 1);
RQName\RQNodeBuilder.cs (5)
81typeInfos.Insert(0, new RQUnconstructedTypeInfo(currentType.Name, currentType.TypeParameters.Length)); 107if (symbol.ExplicitInterfaceImplementations.Length > 1) 182if (symbol.ExplicitInterfaceImplementations.Length > 1) 227if (symbol.ExplicitInterfaceImplementations.Length > 1) 247var typeParamCount = symbol.TypeParameters.Length;
Shared\Extensions\ISymbolExtensions_2.cs (1)
213if (symbolName == WellKnownMemberNames.DelegateBeginInvokeName && parameter.Ordinal >= (methodSymbol.Parameters.Length - 2))
Shared\Extensions\ISymbolExtensions_Sorting.cs (3)
66var diff = xParameters.Length - yParameters.Length; 72var paramCount = xParameters.Length;
Shared\Utilities\ExtractTypeHelpers.cs (1)
119if (type.TypeParameters.Length == 0)
SignatureHelp\AbstractSignatureHelpProvider.cs (2)
62preferredParameterIndex >= items[selectedItemIndex.Value].Parameters.Length; 323if (platformParts.Length == 0)
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
35var argumentCount = argumentNames.Length;
Snippets\RoslynLSPSnippetConverter.cs (2)
87for (var i = 0; i < placeholders.Length; i++) 132if (placeholders.Length > 0)
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
197if (!ifGenerator.IsIfOrElseIf(firstStatement) || ifGenerator.GetElseIfAndElseClauses(firstStatement).Length > 0)
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
131if (ifGenerator.GetElseIfAndElseClauses(ifOrElseIf).Length > 0)
src\Analyzers\Core\Analyzers\ConvertTypeofToNameof\AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
79return typeofOperation.TypeOperand is INamedTypeSymbol namedType && namedType.TypeArguments.Length == 0;
src\Analyzers\Core\Analyzers\Helpers\DeserializationConstructorCheck.cs (1)
20methodSymbol.Parameters.Length == 2 &&
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (4)
120.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length)); 191.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length));
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (8)
67if (method.Locations.Length != 1 || method.DeclaringSyntaxReferences.Length != 1) 93if (statements.Length != 1) 125if (statements.Length < 3) 139if (variables.Length != 1 || 140varDeclStatement.Declarations.Length != 1) 146if (declaration.Declarators.Length != 1) 196for (var i = 1; i < statements.Length - 1; i++)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
80invocation.Arguments.Length == 1)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
165Locations.Length: 1,
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
182if (symbol is ITypeSymbol typeSymbol && typeSymbol.DeclaringSyntaxReferences.Length > 1)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
20for (var index = switchStatement.Cases.Length - 1; index >= 0; index--)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
70return namedAttributeArguments.Length > 0;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
776if (methodSymbol.Parameters.Length == 0) 784methodSymbol.Parameters.Length == 1 &&
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (4)
87if (invocation.Arguments.Length == 1 88|| (invocation.Arguments.Length == 2 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 1))) 105|| (invocation.Arguments.Length == 1 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 0))) 202var argCount = invocation.Arguments.Length;
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (2)
104if (method.Parameters.Length != 1) 161if (members.Length > 0)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (6)
144DeclaringSyntaxReferences.Length: 1, 350if (property.DeclaringSyntaxReferences.Length != 1) 367if (property.Parameters.Length > 0) 374if (!CanExplicitInterfaceImplementationsBeFixed && property.ExplicitInterfaceImplementations.Length != 0) 439if (attributes.Length > 0 && !@this.SupportsFieldAttributesOnProperties) 528Field.DeclaringSyntaxReferences.Length: 1,
src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
25public int Count => (TrivialField != null ? 1 : 0) + NonTrivialFields.Length;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
171collectionExpressionMatches.Value.matches.Length >= collectionInitializerMatches.Value.matches.Length
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
240if (method.Parameters.Length != 1)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
156operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.IncrementOperatorName).Length > 0) 176operation.OperatorMethod.ContainingType.GetMembers(WellKnownMemberNames.DecrementOperatorName).Length > 0)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
103if (symbolInfo.CandidateSymbols.Length > 0 ||
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
56if (ifIndex + 1 >= parentBlock.Operations.Length)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
40m.Parameters.Length == 2);
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
98.FirstOrDefault(m => m is { DeclaredAccessibility: Accessibility.Public, Parameters.Length: 2 });
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
185ExplicitInterfaceImplementations.Length: > 0,
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (4)
42if (context.OperationBlocks.Length != 1) 52var elementCount = (accessesBase ? 1 : 0) + (hashedMembers.IsDefaultOrEmpty ? 0 : hashedMembers.Length); 66if (elementCount == 1 && statements.Length < 2) 70Debug.Assert(elementCount >= 2 || statements.Length >= 2);
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
176for (var i = ifOperationIndex + 1; i < containingBlock.Operations.Length; i++) 278if (block.Operations.Length != 1)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
133if (parameters.Length == 0) 236if (parameterWithMatchingName.IsParams && parameters.Length != arguments.Count)
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
89var annotation = diagnostics.Length == 1 ? RenameAnnotation.Create() : null;
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (4)
83if (potentialConversionTypes.Length == 1) 87else if (potentialConversionTypes.Length > 1) 200for (var j = 0; j < parameters.Length; j++) 231if (potentialConversionTypes.Length == 1)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (2)
121if (parameters.Length == 0) 134var parameterIndex = Math.Min(i, parameters.Length - 1);
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (1)
68if (derivedType.Interfaces.Length != 0)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (7)
202foreach (var method in methodCandidates.OrderBy(m => m.Parameters.Length)) 236=> method.IsParams() ? method.Parameters.Length - 1 : method.Parameters.Length; 248var fixes = codeFixData.Length <= 2 257var builder = new FixedSizeArrayBuilder<CodeAction>(codeFixData.Length); 334var builder = new FixedSizeArrayBuilder<CodeFixData>(methodsAndArgumentsToAdd.Length); 460if (i >= method.Parameters.Length)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
47if (method.ExplicitInterfaceImplementations.Length > 0)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (4)
90for (int i = 0, n = Math.Min(t1NameSegments.Length, t2NameSegments.Length); i < n; i++) 105return t1NameSegments.Length - t2NameSegments.Length;
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
66for (var index = 0; index < parameterNames.Length; index++)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
64var constructorsCount = delegatedConstructor.ContainingType.InstanceConstructors.Length;
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (6)
165var argumentCount = delegatedConstructor.Parameters.Length; 196for (var i = allParameters.Length; i > 0; i--) 257if (ctor.Parameters.Length != ParameterTypes.Length) 260for (var i = 0; i < ParameterTypes.Length; i++) 282=> _arguments.IsDefault || index >= _arguments.Length ? string.Empty : _arguments[index].Name;
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (7)
44return constructor.Parameters.Length == parameters.Length && 87Debug.Assert(constructor.Parameters.Length == expressions.Length); 112for (var i = 0; i < constructorInCompilation.Parameters.Length; i++) 157for (var i = 0; i < parameterNames.Length; i++) 361else if (symbol is IPropertySymbol { Parameters.Length: 0 } property)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (2)
45m => m.Parameters.Length == 0); 61if (state.UnimplementedConstructors.Length > 1)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (3)
86return UnimplementedConstructors.Length > 0; 94if (classType.Constructors.Any(static c => c.Parameters.Length == 0 && c.IsImplicitlyDeclared)) 96var baseNoArgConstructor = baseType.Constructors.FirstOrDefault(c => c.Parameters.Length == 0);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
55var baseConstructorArguments = baseConstructor.Parameters.Length != 0
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (3)
185for (var i = 0; i < typeArguments.Length; i++) 214var result = new FixedSizeArrayBuilder<IParameterSymbol>(modifiers.Length); 215for (var i = 0; i < modifiers.Length; i++)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
64switch (symbol.ConstraintTypes.Length) 96for (var i = 1; i < symbol.ConstraintTypes.Length; i++)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
204var parameterIndex = containingMethod.Parameters.Length; 206if (containingMethod.Parameters.Length > 0) 211for (var i = containingMethod.Parameters.Length - 1; i >= 0; i--)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (3)
34.Where(p => !p.IsImplicitlyDeclared && p.Parameters.Length == 0 && p.GetMethod != null) 49.FirstOrDefault(c => c.Parameters.Length > 0 && c.Parameters[0].IsPrimaryConstructor(cancellationToken)); 256if (member is IMethodSymbol { IsStatic: false, ReturnsVoid: true, Arity: 0, Parameters.Length: 0 } disposeMethod)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
372method1.TypeParameters.Length == method2.TypeParameters.Length &&
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (2)
81if (method.Parameters.Length != conflictingMethod.Parameters.Length)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
54if (property is { IsIndexer: false, Parameters.Length: > 0 } &&
src\Analyzers\Core\CodeFixes\MakeMemberStatic\AbstractMakeMemberStaticCodeFixProvider.cs (2)
23if (context.Diagnostics.Length == 1 && 35for (var i = 0; i < diagnostics.Length; i++)
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
35for (var i = 0; i < diagnostics.Length; i++)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
132diagnostics.Length == 1, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (3)
61return arms.Length > 0 && PopulateSwitchExpressionHelpers.IsDefault(arms[^1]) 62? arms.Length - 1 63: arms.Length;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (3)
86if (cases.Length > 0) 91return cases.Length - 1; 95return cases.Length;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
44if (definition is not null && definition.DeclaringSyntaxReferences.Length > 0)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (2)
209if (localDeclaration.Declarations.Length != 1) 216if (declarators.Length != 1)
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (2)
54if (declaredSymbol is INamespaceSymbol namespaceSymbol && namespaceSymbol.ConstituentNamespaces.Length > 1) 60Debug.Assert(assemblyScopedNamespaceSymbol.ConstituentNamespaces.Length == 1);
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (9)
76if (docIdResults.Length > 0) 111if (candidateMembers.Length == 0) 507var count = methodContext.TypeParameters.Length; 550for (int i = 0; i < methodContext.TypeParameters.Length; ++i) 562for (int i = 0; i < containingType.TypeParameters.Length; ++i) 584if (candidateMembers.Length == 0) 777if (symbolParameters.Length != expectedParameters.Length) 846if (index < typeParameters.Length) 861return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
122builder.WriteInt32(s.Length); 187builder.WriteInt32(info.Names.Length);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (8)
218while (offset < bytes.Length) 422var resultBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(groupSizes.Length); 430if (pos >= importStrings.Length) 453for (; pos < importStrings.Length; pos++) 470if (pos < importStrings.Length) 521if (i + sizeof(int) > bytes.Length) 533if (i + sizeof(short) > bytes.Length) 545if (i + sizeof(byte) > bytes.Length)
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (3)
36return typeArguments.Length == stackFrameTypeArguments.Length; 62if (currentArrayType.Rank != arrayExpression.CommaTokens.Length + 1) 85if (parameters.Length != stackFrameParameters.Parameters.Length)
Wrapping\BinaryExpression\AbstractBinaryExpressionWrapper.cs (3)
74Debug.Assert(exprsAndOperators.Length >= 3); 75Debug.Assert(exprsAndOperators.Length % 2 == 1, "Should have odd number of exprs and operators"); 76for (var i = 0; i < exprsAndOperators.Length; i++)
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (2)
93for (var i = 1; i < _exprsAndOperators.Length; i += 2) 126var count = _exprsAndOperators.Length - 1;
Wrapping\ChainedExpression\AbstractChainedExpressionWrapper.cs (1)
96if (chunks.Length <= 1)
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (2)
146for (var i = 1; i < _chunks.Length; i++) 192for (var i = 1; i < chunk.Length; i++)
Microsoft.CodeAnalysis.Features.Test.Utilities (13)
EditAndContinue\ActiveStatementsDescription.cs (4)
53var activeStatementCount = Math.Max(OldStatements.Length, (newActiveStatementMarkers.Length == 0) ? -1 : newActiveStatementMarkers.Max(m => m.Id)); 63for (var i = 0; i < OldStatements.Length; i++) 77newMappedRegions[ordinal] = (ordinal < newExceptionRegionMarkers.Length) 113var exceptionRegions = (ordinal < exceptionRegionMarkers.Length)
EditAndContinue\EditAndContinueTestVerifier.cs (6)
82Assert.Equal(actualNewActiveStatements.Length, actualNewExceptionRegions.Length); 83Assert.Equal(description.NewMappedRegions.Length, actualNewExceptionRegions.Length); 84for (var i = 0; i < actualNewActiveStatements.Length; i++) 299for (var i = 0; i < actualSemanticEdits.Length; i++)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
395var reader = new MetadataReader(ptr, delta.Length);
EditAndContinue\SyntaxMapDescription.cs (1)
23Debug.Assert(index < Spans.Length, $"Marker <N:{index}> not present in new source");
Snippets\AbstractSnippetProviderTests.cs (1)
97Assert.Equal(expectedSpans.Length, placeholderPositions.Length);
Microsoft.CodeAnalysis.InteractiveHost (6)
Interactive\Core\InteractiveHost.Service.cs (4)
536if (args.Errors.Length == 0) 777for (int i = 0, n = Math.Min(diagnostics.Length, MaxErrorCount); i < n; i++) 791if (diagnostics.Length > MaxErrorCount) 793int notShown = diagnostics.Length - MaxErrorCount;
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
600Debug.Assert(start + length <= items.Length);
Microsoft.CodeAnalysis.LanguageServer (8)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
35var watchedDirectoriesBuilder = ImmutableArray.CreateBuilder<WatchedDirectory>(watchedDirectories.Length); 36var watcherBuilder = ImmutableArray.CreateBuilder<FileSystemWatcher>(watchedDirectories.Length);
Testing\TestDiscoverer.cs (1)
107_logger.LogDebug($"Filtered {discoveredTests.Length} to {matchedTests.Count} tests");
Testing\TestRunner.cs (1)
40TotalTests = testCases.Length
Testing\TestRunner.TestRunHandler.cs (4)
158if (standardOutputMessages.Length > 0) 165if (standardErrorMessages.Length > 0) 172if (debugTraceMessages.Length > 0) 179if (additionalInfoMessages.Length > 0)
Microsoft.CodeAnalysis.LanguageServer.Protocol (54)
Extensions\Extensions.cs (2)
115return documents.Length == 0 126if (items.Length > 1)
Extensions\ProtocolConversions.cs (3)
416for (var i = 0; i < textChanges.Length; i++) 1006Contract.ThrowIfFalse(textSpans.Length == mappedSpanResult.Length, 1007$"The number of input spans {textSpans.Length} should match the number of mapped spans returned {mappedSpanResult.Length}");
Features\CodeCleanup\AbstractCodeCleanupService.cs (2)
49progressTracker.AddItems(thirdPartyDiagnosticIdsAndTitles.Length); 68progressTracker.AddItems(enabledDiagnostics.Diagnostics.Length);
Features\CodeFixes\CodeFixService.cs (1)
691return newApplicableDiagnostics.Count == applicableDiagnostics.Length
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
408var builder = new FixedSizeArrayBuilder<DiagnosticData>(diagnostics.Length);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
58if (e.Removed.Length == 0)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (4)
142var compilationWithReducedAnalyzers = (projectAnalyzersToRun.Length == 0 && hostAnalyzersToRun.Length == 0) ? null : 224if (projectAnalyzers.Length == compilationWithAnalyzers.ProjectAnalyzers.Length 225&& hostAnalyzers.Length == compilationWithAnalyzers.HostAnalyzers.Length)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (4)
305if (diagnostics.Length == 0 && memberDiagnostics.Length == 0) 312if (diagnostics.Length == 0 && memberDiagnostics.Length > 0)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (2)
149if (addedStates.Length == 0 && removedStates.Length == 0)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
359using var _ = ArrayBuilder<AnalyzerWithState>.GetInstance(analyzersWithState.Length, out var filteredAnalyzersWithStateBuilder);
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (4)
147if (action.NestedActions.Length > 0) 149var unifiedNestedActions = new FixedSizeArrayBuilder<IUnifiedSuggestedAction>(action.NestedActions.Length); 541if (codeAction.NestedActions.Length > 0) 543var nestedActions = new FixedSizeArrayBuilder<IUnifiedSuggestedAction>(codeAction.NestedActions.Length);
Handler\CodeActions\CodeActionResolveHandler.cs (1)
71if (data.NestedCodeActions.HasValue && data.NestedCodeActions.Value.Length > 0)
Handler\CodeLens\CodeLensHandler.cs (1)
92for (var i = 0; i < members.Length; i++)
Handler\Completion\CompletionResultFactory.cs (6)
183for (var i = 1; i < completionItemKinds.Length; i++) 211for (var i = 1; i < completionItemTags.Length; i++) 439for (var i = 0; i < x.Length; i++) 450if (xCharacters.Length != yCharacters.Length) 455for (var j = 0; j < xCharacters.Length; j++)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (4)
59RoslynDebug.Assert(_configurationItems.Length == _optionsAndLanguageNamesToRefresh.Length); 85RoslynDebug.Assert(configurationsFromClient.Length == SupportedOptions.Sum(option => option is IPerLanguageValuedOption ? 2 : 1)); 90for (var i = 0; i < configurationsFromClient.Length; i++)
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (2)
101if (sources.Length <= 1) 138if (result.Length > 1)
Handler\Diagnostics\DiagnosticsPullCache.cs (1)
43state.Context.TraceInformation($"Found {diagnostics.Length} diagnostics for {state.DiagnosticSource.ToDisplayString()}");
Handler\InlayHint\InlayHintHandler.cs (5)
60var inlayHints = new LSP.InlayHint[hints.Length]; 61for (var i = 0; i < hints.Length; i++) 117if (taggedTexts.Length == 1) 127else if (taggedTexts.Length >= 2) 134for (var i = 1; i < taggedTexts.Length - 1; i++)
Handler\SemanticTokens\SemanticTokensHelpers.cs (2)
97if (spans.Length == 0) 103var textSpansBuilder = new FixedSizeArrayBuilder<TextSpan>(spans.Length);
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (4)
89context.TraceInformation($"Processing {orderedDocuments.Length} documents"); 166if (spans.Length == 0) 176for (var batchStart = 0; batchStart < spans.Length; batchStart += chunkSize) 178var batchEnd = Math.Min(batchStart + chunkSize, spans.Length);
Handler\Symbols\DocumentSymbolsHandler.cs (1)
138using var _ = ArrayBuilder<RoslynDocumentSymbol>.GetInstance(items.Length, out var list);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (1)
34var builder = ImmutableArray.CreateBuilder<MethodHandlerDetails>(initialCapacity: allHandlerDetails.Length);
Workspaces\LspWorkspaceManager.cs (1)
337var solutions = new FixedSizeArrayBuilder<(Workspace, Solution, bool)>(registeredWorkspaces.Length);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
SpellCheck\SpellCheckTests.cs (1)
569var ranges = new int[allSpans.Length * 3];
Workspaces\LspWorkspaceManagerTests.cs (6)
673Assert.Equal(oldClassDeclarations.Length, newClassDeclarations.Length); 674Assert.Equal(3, oldClassDeclarations.Length); 683Assert.Equal(oldMethodDeclarations.Length, newMethodDeclarations.Length); 684Assert.Equal(3, oldMethodDeclarations.Length);
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
600Debug.Assert(start + length <= items.Length);
Microsoft.CodeAnalysis.Rebuild (1)
MetadataCompilationOptions.cs (1)
22public int Length => _options.Length;
Microsoft.CodeAnalysis.Remote.ServiceHub (9)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (6)
342if (projectAnalyzers.Length < compilationWithAnalyzers.ProjectAnalyzers.Length) 344Contract.ThrowIfFalse(projectAnalyzers.Length > 0 || compilationWithAnalyzers.HostCompilationWithAnalyzers is not null); 352if (hostAnalyzers.Length < compilationWithAnalyzers.HostAnalyzers.Length) 354Contract.ThrowIfFalse(hostAnalyzers.Length > 0 || compilationWithAnalyzers.ProjectCompilationWithAnalyzers is not null); 448if (projectAnalyzers.Length < (analysisResult?.ProjectAnalysisResult?.AnalyzerTelemetryInfo.Count ?? 0) 449|| hostAnalyzers.Length < (analysisResult?.HostAnalysisResult?.AnalyzerTelemetryInfo.Count ?? 0))
Services\SourceGeneration\RemoteSourceGenerationService.cs (2)
63var result = new FixedSizeArrayBuilder<string>(documentIds.Length); 96if (analyzerReferenceChecksums.Length == 0)
Services\SymbolFinder\RemoteSymbolFinderService.cs (1)
86var result = new FixedSizeArrayBuilder<SerializableSymbolAndProjectId>(items.Length);
Microsoft.CodeAnalysis.Scripting (8)
Hosting\CommandLine\CommandLineRunner.cs (2)
397if (diagnostics.Length > MaxDisplayCount) 399int notShown = diagnostics.Length - MaxDisplayCount;
ScriptExecutionState.cs (3)
87while (executorIndex < precedingExecutors.Length) 130while (executorIndex < precedingExecutors.Length) 141if (executorIndex == precedingExecutors.Length)
ScriptState.cs (1)
124for (int i = 0; i < Variables.Length; i++)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
122architectureFilter.Length > 0 &&
Utilities\ParameterValidationHelpers.cs (1)
24for (int i = 0; i < items.Length; i++)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (2)
MetadataShadowCopyProviderTests.cs (2)
146Assert.Equal(3, metadata1.GetModules().Length); 177for (int i = 0; i < metadata2.GetModules().Length; i++)
Microsoft.CodeAnalysis.Scripting.UnitTests (4)
ScriptOptionsTests.cs (4)
32Assert.Equal(GacFileResolver.IsAvailable ? 5 : 30, options.MetadataReferences.Length); 66Assert.Equal(2, options.MetadataReferences.Length); 69Assert.Equal(2, options.MetadataReferences.Length); 74Assert.Equal(2, options.MetadataReferences.Length);
Microsoft.CodeAnalysis.Test.Utilities (88)
Compilation\CompilationExtensions.cs (1)
237executableCodeBlocks = executableCodeBlocks.RemoveAt(executableCodeBlocks.Length - 1);
Compilation\ControlFlowGraphVerifier.cs (19)
92for (int i = 0; i < graph.Blocks.Length; i++) 122for (int i = 0; i < blocks.Length; i++) 132Assert.NotEqual(blocks.Length - 1, i); 156Assert.Equal(blocks.Length - 1, i); 190for (var predecessorIndex = 0; predecessorIndex < predecessors.Length; predecessorIndex++) 211if (predecessorIndex < predecessors.Length - 1 && predecessors[predecessorIndex + 1].Source == predecessor) 234appendLine($" Statements ({statements.Length})"); 318if (currentRegion.LastBlockOrdinal == block.Ordinal && i != blocks.Length - 1) 336Assert.Equal(graph.LocalFunctions.Length, localFunctionsMap.Count); 384var entryStates = ArrayBuilder<PooledHashSet<CaptureId>>.GetInstance(blocks.Length, fillWithValue: null); 387for (int i = 1; i < blocks.Length - 1; i++) 410for (var j = 0; j < block.Operations.Length; j++) 426assertCaptureReferences(currentState, block.BranchValue, block, block.Operations.Length, longLivedIds, referencedIds, finalGraph); 471if (block.ConditionalSuccessor != null && block.ConditionalSuccessor.LeavingRegions.Length > regions.Count) 477if (block.FallThroughSuccessor.LeavingRegions.Length > regions.Count) 910Arguments: { Length: >= 3 } arguments, 1308for (var j = blocks[i].Operations.Length - 1; j >= 0; j--) 1516for (var i = 0; i < region.LocalFunctions.Length; i++) 1605for (int j = branch.EnteringRegions.Length - 1; j >= 0; j--)
Compilation\MetadataReferenceExtensions.cs (1)
34if (assemblyMetadata.GetModules() is { Length: > 0 } modules)
Compilation\OperationTreeVerifier.cs (20)
444var statementsStr = $"{operation.Operations.Length} statements"; 445var localStr = !operation.Locals.IsEmpty ? $", {operation.Locals.Length} locals" : string.Empty; 460var variablesCountStr = $"{operation.Declarations.Length} declarations"; 504var variableCount = operation.Declarators.Length; 518var caseCountStr = $"{operation.Cases.Length} cases"; 542var caseClauseCountStr = $"{operation.Clauses.Length} case clauses"; 543var statementCountStr = $"{operation.Body.Length} statements"; 876Assert.Equal(length, argumentNames.Length); 903Assert.Equal(length, argumentRefKinds.Length); 1110if (operation.Arguments.Length > 0) 1524if (operation.InitializedFields.Length <= 1) 1526if (operation.InitializedFields.Length == 1) 1536LogString($" ({operation.InitializedFields.Length} initialized fields)"); 1567if (operation.InitializedProperties.Length <= 1) 1569if (operation.InitializedProperties.Length == 1) 1579LogString($" ({operation.InitializedProperties.Length} initialized properties)"); 1621LogString($" ({operation.ElementValues.Length} elements)"); 1631LogString($" ({operation.Elements.Length} elements"); 2126LogString($"{nameof(ISwitchExpressionOperation)} ({operation.Arms.Length} arms, IsExhaustive: {operation.IsExhaustive})"); 2134LogString($"{nameof(ISwitchExpressionArmOperation)} ({operation.Locals.Length} locals)");
Compilation\TestOperationVisitor.cs (3)
812switch (method.Parameters.Length) 962Assert.Equal(2, children.Length); 966Assert.Equal(1, children.Length);
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
796if (ns.ContainingAssembly != context.Compilation.Assembly || ns.ConstituentNamespaces.Length > 1)
Diagnostics\DiagnosticDescription.cs (1)
64return i < _originalFormatSpecifiers.Length ?
Diagnostics\DiagnosticExtensions.cs (1)
149Assert.Equal(expectedCount, c.GetAnalyzerDiagnostics(analyzers, null, onAnalyzerException).Length);
Diagnostics\EmptyArrayAnalyzer.cs (1)
74if (arrayCreation.DimensionSizes.Length == 1
Diagnostics\OperationTestAnalyzer.cs (6)
167if (forLoop.Before.Length == 1) 182if (forLoop.AtLoopBottom.Length == 1) 567if (initializer.ElementValues.Length > 10) 795if (initializer.ElementValues.Length > 5) 910if (!switchSection.HasErrors(operationContext.Compilation, operationContext.CancellationToken) && switchSection.Clauses.Length > 1) 1321if (block.Operations.Length > 3)
Diagnostics\OptionsDiagnosticAnalyzer.cs (3)
50if (actual.AdditionalFiles.Length != expected.AdditionalFiles.Length) 55for (int i = 0; i < actual.AdditionalFiles.Length; i++)
Diagnostics\SuppressMessageAttributeTests.cs (1)
1396Assert.True(spans.Length > 0, "Must specify a span within which to generate diagnostics on each token");
Diagnostics\ThrowingDiagnosticAnalyzer.cs (2)
73var handled = new bool?[AllAnalyzerMemberNames.Length]; 74for (int i = 0; i < AllAnalyzerMemberNames.Length; i++)
FX\ImmutableArrayTestExtensions.cs (3)
38var buffer = new byte[Math.Min(bufferSize, bytes.Length)]; 41while (offset < bytes.Length) 43int length = Math.Min(bufferSize, bytes.Length - offset);
InstrumentationChecker.cs (10)
45for (int method = 1; method <= reader.Methods.Length; method++) 48if (snippets.Length == 0) 53string methodTermination = GetTermination(0, snippets.Length); 63for (int index = 1; index < snippets.Length; index++) 65string termination = GetTermination(index, snippets.Length); 180for (int method = 1; method <= reader.Methods.Length; method++) 183if (snippets.Length == 0) 188var methodTermination = GetTermination(0, snippets.Length); 198for (int index = 1; index < snippets.Length; index++) 200string termination = GetTermination(index, snippets.Length);
MarkedSource\MarkupTestFile.cs (1)
249textSpan = spans.Length == 0 ? null : (TextSpan?)spans.Single();
Metadata\ILBuilderVisualizer.cs (1)
77if (regions.Length == 0)
Metadata\ILValidation.cs (7)
96byte[] publicKeyParams = new byte[publicKeyBlob.Length - CryptoBlobParser.s_publicKeyHeaderSize]; 137+ SectionHeaderSize * peHeaders.SectionHeaders.Length; 275while (offset < ilArray.Length && ilArray[offset] == 0) 280if (offset == ilArray.Length) 285var reader = new BlobReader(ilPtr + offset, ilArray.Length - offset); 316while (offset < ilArray.Length && ilArray[offset] == 0) 321var reader = new BlobReader(ilPtr + offset, ilArray.Length - offset);
Metadata\MetadataReaderUtils.cs (2)
241for (int i = 0; i < metadata.Length - bytes.Length; i++) 253for (int i = 0; i < bytes.Length; i++)
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
94Assert.Equal(references.Length + frameworkReferences.Length, count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
37var lastBlockOrdinal = blocks.Length - 1; 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++)
Microsoft.CodeAnalysis.UnitTests (31)
AnalyzerAssemblyLoaderTests.cs (4)
252Assert.Equal(1, analyzers.Length); 255Assert.Equal(0, analyzerDependencyReference.GetAnalyzersForAllLanguages().Length); 772Assert.Equal(1, analyzers.Length); 774Assert.Equal(0, analyzerDependencyReference.GetAnalyzersForAllLanguages().Length);
Analyzers\AnalyzerFileReferenceTests.cs (2)
126Assert.Equal(4, analyzers.Length); 135Assert.Equal(4, analyzers.Length);
AssemblyUtilitiesTests.cs (2)
116Assert.Equal(expected: 0, actual: results.Length); 124Assert.Equal(expected: 1, actual: results.Length);
Collections\ImmutableArrayExtensionsTests.cs (2)
26Assert.Equal(1, a.Length); 32Assert.Equal(2, a.Length);
Collections\TemporaryArrayTests.cs (4)
224Assert.Equal(inputArray.Length, sortedArray.Length); 229Assert.Equal(array.Count, sortedArray.Length); 231Assert.Equal(array.Count, sortedArray.Length);
Collections\TopologicalSortTests.cs (1)
216for (int i = sorted.Length - 1; i >= 0; i--)
CommonCommandLineParserTests.cs (3)
1016Assert.Equal(expected: 1, actual: includePaths.Length); 1053Assert.Equal(expected: 2, actual: includePaths.Length); 1105Assert.Equal(expected: 3, actual: includePaths.Length);
Diagnostics\AnalysisContextInfoTests.cs (1)
49Assert.Equal(1, diagnostics.Length);
Diagnostics\DiagnosticLocalizationTests.cs (1)
316Assert.Equal(1, descriptors.Length);
MetadataReferences\AssemblyIdentityExtensions.cs (1)
31if (identity.PublicKey.Length > 0)
MetadataReferences\AssemblyIdentityTests.cs (5)
150Assert.Equal(0, id.PublicKey.Length); 151Assert.Equal(0, id.PublicKeyToken.Length); 172Assert.Equal(0, id.PublicKey.Length); 275Assert.Equal(0, id.PublicKey.Length); 276Assert.Equal(0, id.PublicKeyToken.Length);
MetadataReferences\AssemblyMetadataTests.cs (2)
50Assert.Equal(1, a.GetModules().Length); 65Assert.Equal(3, a.GetModules().Length);
Text\StringTextTest.cs (1)
29for (int i = 0; i < checksum.Length; i++)
Text\TextChangeTests.cs (2)
584Assert.Equal(1, GetChunks(newText).Length); 627Assert.Equal(1, GetChunks(newText).Length);
Microsoft.CodeAnalysis.VisualBasic (956)
Analysis\FlowAnalysis\AbstractFlowPass.NestedTypes.vb (1)
38If count <= Me._path.Length Then
Analysis\FlowAnalysis\AbstractFlowPass.vb (6)
498If Me.PendingBranches.Length > 0 Then 575If Me.PendingBranches.Length > 0 Then 1258Dim n As Integer = Math.Min(parameters.Length, arguments.Length) 1808Dim caseBlockStateBuilder = ArrayBuilder(Of LocalState).GetInstance(caseBlocks.Length) 1812Dim lastIndex As Integer = caseBlocks.Length - 1
Analysis\FlowAnalysis\AbstractRegionDataFlowPass.vb (3)
57If declarations.Length = 1 Then 61Dim locals(declarations.Length - 1) As LocalSymbol 62For i = 0 To declarations.Length - 1
Analysis\FlowAnalysis\DataFlowPass.Symbols.vb (1)
49Debug.Assert(Not locals.IsDefault AndAlso locals.Length > 1)
Analysis\FlowAnalysis\DataFlowPass.vb (2)
2090For index = 1 To declarations.Length - 1 2112Debug.Assert(declarations.Length > 0)
Analysis\FlowAnalysis\ReadWriteWalker.vb (1)
202Debug.Assert(node.RangeVariables.Length = 1)
Analysis\FlowAnalysis\VariablesDeclaredWalker.vb (2)
65If Not node.WasCompilerGenerated AndAlso node.RangeVariables.Length > 0 AndAlso IsInside Then 66Debug.Assert(node.RangeVariables.Length = 1)
Analysis\InitializerRewriter.vb (4)
47Debug.Assert(processedInitializers.BoundInitializers.Length = processedInitializers.InitializerStatements.Length) 167For statementIndex = If(hasMyBaseConstructorCall, 1, 0) To blockStatements.Length - 1 201Dim boundStatements = ArrayBuilder(Of BoundStatement).GetInstance(boundInitializers.Length)
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (1)
265If TypeOf objCreation.Type Is LambdaFrame AndAlso objCreation.Arguments.Length = 1 Then
Binding\Binder_AnonymousTypes.vb (1)
51Debug.Assert(constructor.ParameterCount = initExpressions.Length)
Binding\Binder_Attributes.vb (10)
31Debug.Assert(binders.Length = attributesToBind.Length) 33Dim totalAttributesCount As Integer = attributesToBind.Length 62Debug.Assert(binders.Length = attributesToBind.Length) 64For index = 0 To attributesToBind.Length - 1 265If accessibleConstructors.Length = 0 Then 302If results.Candidates.Length = 0 Then 857If initializerOpt Is Nothing OrElse initializerOpt.Initializers.Length = 0 Then 858If node.Bounds.Length = 1 Then
Binding\Binder_Conversions.vb (6)
824For i As Integer = 0 To typeParameters.Length - 1 1650If Not targetType.IsTupleOrCompatibleWithTupleOfCardinality(arguments.Length) Then 1664Dim convertedArguments = ArrayBuilder(Of BoundExpression).GetInstance(arguments.Length) 1666Debug.Assert(targetElementTypes.Length = arguments.Length, "converting a tuple literal to incompatible type?") 1668For i As Integer = 0 To arguments.Length - 1
Binding\Binder_Delegates.vb (6)
530If resolutionResult.Candidates.Length = 0 Then 557Debug.Assert(bestCandidates.Count > 1 AndAlso bestSymbols.Length > 1) 566If bestSymbols.Length = 1 AndAlso 872For conversionIndex = 0 To bestResult.ConversionsOpt.Length - 1 883For conversionIndex = 0 To bestResult.ConversionsBackOpt.Length - 1 1148Debug.Assert(methodGroup.Methods.Length = 1)
Binding\Binder_Expressions.vb (10)
1457If address.MethodGroup.Methods.Length = 1 Then 1733Dim newArguments(invocation.ArgumentsOpt.Length - 1) As BoundExpression 3484If groupConstituents.Length > otherConstituents.Length Then 3918Dim convertedArguments = ArrayBuilder(Of BoundExpression).GetInstance(boundArguments.Length) 3932If Not argumentNames.IsDefault AndAlso argumentNames.Length > 0 Then 3938If boundArguments.Length <> arrayType.Rank Then 3940If boundArguments.Length > arrayType.Rank Then 3968For i As Integer = 0 To symbols.Length - 1 4094If boundArguments.Length = 0 Then
Binding\Binder_Initializers.vb (8)
100For i = 0 To initializers.Length - 1 107For j = 0 To siblingInitializers.Length - 1 131Dim isLast = (i = initializers.Length - 1 AndAlso j = siblingInitializers.Length - 1) 293fieldSymbols.Length = DirectCast(equalsValueOrAsNewSyntax.Parent, VariableDeclaratorSyntax).Names.Count) 309If(fieldSymbols.Length = 1, fieldAccess, Nothing), 352Debug.Assert(propertySymbols.Length = 1) 379If(propertySymbols.Length = 1, boundPropertyOrFieldAccess, Nothing),
Binding\Binder_Invocation.vb (31)
406boundArguments.Length > 0 AndAlso 595Debug.Assert(methodGroup.Methods.Length > 0) 649If additionalExtensionMethods.Length > 0 Then 650Debug.Assert(methodGroup.Methods.Length > 0) 662Return methodGroup.Methods.Length = 1 AndAlso methodGroup.TypeArgumentsOpt Is Nothing AndAlso 697Debug.Assert(propertyGroup.Properties.Length > 0) 715Debug.Assert(methodGroup.Methods.Length > 0) 799If results.Candidates.Length = 0 Then 1089If arguments.Length = 1 AndAlso arguments(0).IsConstant AndAlso Not arguments(0).ConstantValueOpt.IsBad Then 1357Debug.Assert(commonReturnType IsNot Nothing AndAlso bestSymbols.Length > 0 AndAlso bestCandidates.Count >= bestSymbols.Length) 1376If bestSymbols.Length = 1 AndAlso bestCandidates.Count < 3 Then 1459If singleCandidate.Arity < typeArguments.Length Then 1470Debug.Assert(singleCandidate.Arity > typeArguments.Length) 1503(Not queryMode OrElse singleCandidate.ParameterCount <= boundArguments.Length) Then 1526For i As Integer = 0 To boundArguments.Length - 1 Step 1 1769Dim diagnosticInfos = ArrayBuilder(Of DiagnosticInfo).GetInstance(bestSymbols.Length) 1776For i As Integer = 1 To bestSymbols.Length - 1 Step 1 1783For i As Integer = 0 To bestSymbols.Length - 1 Step 1 2000Debug.Assert(argumentNames.IsDefaultOrEmpty OrElse (argumentNames.Length > 0 AndAlso argumentNames.Length = arguments.Length)) 2014If Not argumentNames.IsDefault AndAlso argumentNames.Length = 0 Then 2039For i As Integer = 0 To arguments.Length - 1 Step 1 2080While i < arguments.Length 2115For i As Integer = positionalArguments To arguments.Length - 1 Step 1 2660For i As Integer = 0 To Math.Min(regularParamCount, arguments.Length) - 1 Step 1 2667For i As Integer = regularParamCount To arguments.Length - 1 Step 1 2674For i As Integer = 0 To argsToParams.Length - 1 Step 1 2927For i As Integer = 0 To args.Length - 1 3161Debug.Assert(argumentIndex < arguments.Length)
Binding\Binder_Lambda.vb (9)
89If source.Parameters.Length = 0 Then 94Dim parameters(unboundParams.Length - 1) As BoundLambdaParameterSymbol 95Dim minCount As Integer = Math.Min(parameters.Length, targetSignature.ParameterTypes.Length) 123If parameters.Length <> targetSignature.ParameterTypes.Length Then 795Dim parameterDescriptors(parameters.Length) As AnonymousTypeField 798For i = 0 To parameters.Length - 1 821Dim commonParameterTypes(source.Parameters.Length - 1) As TypeSymbol 826For i As Integer = 0 To Math.Min(target.ParameterTypes.Length, commonParameterTypes.Length) - 1 836For i As Integer = 0 To Math.Min(target.ParameterTypes.Length, commonParameterTypes.Length) - 1
Binding\Binder_Latebound.vb (4)
172For i As Integer = 0 To arguments.Length - 1 202builder = ArrayBuilder(Of BoundExpression).GetInstance(arguments.Length) 237If argumentNames.IsDefault OrElse argumentNames.Length = 0 Then 246For i As Integer = 0 To argumentNames.Length - 1
Binding\Binder_Lookup.vb (2)
1124Debug.Assert(symbols.Length > 1) 1129For i = 1 To symbols.Length - 1
Binding\Binder_ObjectInitializer.vb (3)
365If constructors.Length = 0 Then 370If constructors.Length > 0 Then 414If results.Candidates.Length = 0 Then
Binding\Binder_Operators.vb (3)
593Debug.Assert(userDefinedOperator.Candidates.Length > 0) 660Debug.Assert(bitwiseOperator.Candidates.Length > 0) 1244Debug.Assert(userDefinedOperator.Candidates.Length > 0)
Binding\Binder_Query.vb (59)
276Debug.Assert(Not source.Binders.IsDefault AndAlso source.Binders.Length = 1 AndAlso source.Binders(0) IsNot Nothing) 389Debug.Assert((sourceRangeVariablesPart1.Length = 0) = (sourceRangeVariablesPart2 = firstSelectSelectorBinder.RangeVariables)) 390Debug.Assert((sourceRangeVariablesPart2.Length = 0) = (sourceRangeVariablesPart1 = firstSelectSelectorBinder.RangeVariables)) 391Debug.Assert(firstSelectSelectorBinder.RangeVariables.Length = sourceRangeVariablesPart1.Length + sourceRangeVariablesPart2.Length) 399Debug.Assert(firstSelectDeclaredRangeVariables.Length <= 1) 410Debug.Assert(firstSelectDeclaredRangeVariables.Length = 1) 450If sourceRangeVariablesPart1.Length > 0 Then 469If sourceRangeVariablesPart2.Length > 0 Then 490ElseIf sourceRangeVariablesPart2.Length > 0 Then 566Debug.Assert(Not result.Binders.IsDefault AndAlso result.Binders.Length = 2 AndAlso 1008Debug.Assert(source.RangeVariables.Length = 1) 1030Debug.Assert(manySelector.RangeVariables.Length = 1) 1096If sourceRangeVariables.Length > 0 Then 1115Debug.Assert(sourceRangeVariables.Length = 0) 1286Debug.Assert(absorbingJoin.Binders.Length > 1) 1488Debug.Assert(outer.RangeVariables.Length > 0 AndAlso inner.RangeVariables.Length > 0) 1669Debug.Assert(outer.RangeVariables.Length > 0 AndAlso inner.RangeVariables.Length > 0) 1892Debug.Assert(itemsLambda IsNot Nothing OrElse itemsRangeVariables.Length = 0) 2108Debug.Assert(keysRangeVariables.Length > 0) 2170If rangeVariables.Length = 1 Then 2200Select Case rangeVariables.Length 2211Select Case rangeVariables.Length 2222Select Case rangeVariables.Length 2224Throw ExceptionUtilities.UnexpectedValue(rangeVariables.Length) 2947If _rangeVariables.Length > 0 Then 2967Debug.Assert(_rangeVariables.Length = 0) 2989Debug.Assert((rangeVariablesPart1.Length = 0) = (rangeVariablesPart2 = _rangeVariables)) 2990Debug.Assert((rangeVariablesPart2.Length = 0) = (rangeVariablesPart1 = _rangeVariables)) 2991Debug.Assert(_lambdaSymbol.ParameterCount = If(rangeVariablesPart2.Length = 0, 1, 2)) 2992Debug.Assert(_rangeVariables.Length = rangeVariablesPart1.Length + rangeVariablesPart2.Length) 3040If rangeVariablesPart1.Length > 0 Then 3045If rangeVariablesPart2.Length > 0 Then 3053ElseIf rangeVariablesPart2.Length > 0 Then 3091If _rangeVariables.Length = 0 Then 3181Debug.Assert(_rangeVariables.Length > 0) 3196Debug.Assert(sizeIncrease + _rangeVariables.Length > 1) 3206If _rangeVariables.Length = 1 OrElse mustProduceFlatCompoundVariable Then 3208lastIndex = _rangeVariables.Length + sizeIncrease - 1 3212For j As Integer = 0 To _rangeVariables.Length - 1 3219Debug.Assert(_rangeVariables.Length > 1) 3223lastIndex = parameters.Length + sizeIncrease - 1 3227For j As Integer = 0 To parameters.Length - 1 3596For i = 0 To rangeVariables.Length - 1 3606For i = i To rangeVariables.Length - 1 3778Debug.Assert((compoundKeyReferencePart1 Is Nothing) = (keysRangeVariablesPart1.Length = 0)) 3779Debug.Assert((compoundKeyReferencePart2 Is Nothing) = (keysRangeVariablesPart2.Length = 0)) 3781Debug.Assert(compoundKeyReferencePart1 Is Nothing OrElse keysRangeVariables.Length = keysRangeVariablesPart1.Length + keysRangeVariablesPart2.Length) 3783Dim keys As Integer = keysRangeVariables.Length 4656If results.Candidates.Length = 0 Then 4661If results.Candidates.Length > 0 Then 4673For i As Integer = 0 To arguments.Length - 1
Binding\Binder_Statements.vb (8)
273Dim children = ArrayBuilder(Of BoundNode).GetInstance(statement.CaseClauses.Length) 378If implicitLocals.Length > 0 Then 747If boundIndices.Length > 0 Then ' missing redim size error will be reported later 748arrayType = ArrayTypeSymbol.CreateVBArray(redimTargetType, Nothing, boundIndices.Length, Compilation) 758If boundIndices.Length = 0 Then 765If arrayType.Rank <> boundIndices.Length Then 775If Not redimClauseHasErrors AndAlso boundIndices.Length > ArrayRankLimit Then 4502For declarationIndex = 0 To boundAsNewDeclarations.LocalDeclarations.Length - 1
Binding\Binder_Symbols.vb (5)
110Debug.Assert(typeArguments.Length = syntaxArguments.Count) 120If genericType.Arity <> typeArguments.Length Then 124If i < typeArguments.Length Then 670If typesArray.Length < 2 Then 671Throw ExceptionUtilities.UnexpectedValue(typesArray.Length)
Binding\Binder_XmlLiterals.vb (2)
222If (childNodes.Length = 0) AndAlso 2016Dim n = originalParameters.Length
Binding\BlockBaseBinder.vb (2)
48Dim map = New Dictionary(Of String, T)(locals.Length, IdentifierComparison.Comparer) 70If locals.Length < 6 Then
Binding\DocumentationCommentCrefBinder.vb (2)
155If parameters.Length <> signatureParameterCount Then 876Debug.Assert(ambiguousSymbols.Length > 1)
Binding\DocumentationCommentCrefBinder_Compat.vb (1)
431Debug.Assert(symbols.Length > 1)
Binding\EarlyWellKnownAttributeBinder.vb (1)
179If boundMethodGroup IsNot Nothing AndAlso boundMethodGroup.Methods.Length <> 0 Then
Binding\ExecutableCodeBinder.vb (1)
89Dim map = New MultiDictionary(Of String, SourceLabelSymbol)(labels.Length, IdentifierComparison.Comparer)
Binding\LookupResult.vb (3)
122Debug.Assert(syms.Length > 1) 418If syms.Length = 0 Then 421ElseIf syms.Length > 1 Then
Binding\MemberSemanticModel.vb (22)
160If boundNodes.Length = 0 Then 174If boundNodes.Length = 0 Then 177Return boundNodes(boundNodes.Length - 1) 1039For i = 0 To boundNodes.Length - 1 1430Debug.Assert(binders.IsDefault OrElse (binders.Length > 0 AndAlso binders.Length < 3)) 1451Debug.Assert(binders.IsDefault OrElse (binders.Length > 0 AndAlso binders.Length < 3 AndAlso binders(0) IsNot Nothing)) 1453If Not binders.IsDefault AndAlso binders.Length = 2 Then 1472Debug.Assert(binders.IsDefault OrElse binders.Length = 3) 1474If Not binders.IsDefault AndAlso binders.Length = 3 Then 1499Debug.Assert(binders.IsDefault OrElse (binders.Length > 1 AndAlso binders.Length < 4 AndAlso binders(0) IsNot Nothing)) 1540Debug.Assert(binders.IsDefault OrElse (binders.Length > 0 AndAlso binders.Length < 3 AndAlso binders(0) IsNot Nothing)) 1565Debug.Assert(binders.IsDefault OrElse (binders.Length = 1 AndAlso binders(0) IsNot Nothing)) 1588Debug.Assert(binders.IsDefault OrElse (binders.Length = 2 OrElse binders.Length = 3)) 1593If binders.Length <= 2 Then 1626Debug.Assert(binders.IsDefault OrElse (binders.Length = 1 AndAlso binders(0) IsNot Nothing)) 1645Debug.Assert(binders.IsDefault OrElse (binders.Length = 1 AndAlso binders(0) IsNot Nothing)) 2150Debug.Assert(existing.Length = added.Length)
Binding\MethodTypeParametersBinder.vb (1)
49For i = 0 To _typeParameters.Length - 1
Binding\SubOrFunctionBodyBinder.vb (1)
27Dim count As Integer = parameters.Length
Binding\SyntheticBoundTrees\AnonymousTypeSyntheticMethods.vb (4)
28Debug.Assert(anonymousType.Properties.Length = Me.ParameterCount) 112Dim names(properties.Length - 1) As String 113For i = 0 To properties.Length - 1 338Dim numberOfFields As Integer = AnonymousType.Properties.Length
BoundTree\BoundArrayLiteral.vb (1)
16Return InferredType.Rank = 1 AndAlso Initializer.Initializers.Length = 0
BoundTree\BoundCall.vb (2)
79Debug.Assert(Arguments.Length = Method.ParameterCount) 83For i As Integer = 0 To Arguments.Length - 1
BoundTree\BoundConvertedTupleElements.vb (2)
15Debug.Assert(ElementPlaceholders.Length = ConvertedElements.Length)
BoundTree\BoundExpressionExtensions.vb (2)
550Return DirectCast(node, BoundBadExpression).Symbols.Length > 0 562targetArity = methodGroup.TypeArgumentsOpt.Arguments.Length
BoundTree\BoundInterpolatedStringExpression.vb (1)
34Return Contents.Length = 0
BoundTree\BoundMethodGroup.vb (1)
70If(group.TypeArgumentsOpt Is Nothing, 0, group.TypeArgumentsOpt.Arguments.Length),
BoundTree\BoundNodeExtensions.vb (1)
25For i As Integer = 0 To nodeArray.Length - 1
BoundTree\BoundQueryableSource.vb (1)
14Debug.Assert(RangeVariables.Length = 1)
BoundTree\BoundTreeRewriter.vb (1)
22Dim n As Integer = If(list.IsDefault, 0, list.Length)
BoundTree\BoundUserDefinedBinaryOperator.vb (2)
44For i As Integer = 0 To underlyingCall.Arguments.Length - 1 58For i As Integer = 0 To underlyingCall.Arguments.Length - 1
BoundTree\GroupTypeInferenceLambda.vb (1)
18If delegateParams.Length <> 2 Then
BoundTree\UnboundLambda.vb (6)
153If params.Length = 0 Then 156Dim types(params.Length - 1) As TypeSymbol 159For i = 0 To params.Length - 1 197If other Is Nothing OrElse other.ParameterTypes.Length <> Me.ParameterTypes.Length Then 201For i As Integer = 0 To ParameterTypes.Length - 1
CodeGen\EmitArrayInitializer.vb (5)
67For i As Integer = 0 To inits.Length - 1 116For i As Integer = 0 To inits.Length - 1 233If inits.Length = 0 Then 270If inits.Length <> 0 Then 291Return inits.Length <> 0 AndAlso inits(0).Kind = BoundKind.ArrayInitialization
CodeGen\EmitExpression.vb (6)
545While i < expressions.Length 553Debug.Assert(arguments.Length = parameters.Length) 554For i = 0 To arguments.Length - 1 982Dim stackBehavior = (If(method.IsSub, 0, 1)) - arguments.Length 1672_builder.EmitOpCode(ILOpCode.Newobj, ILOpCode.Newobj.StackPushCount() - arguments.Length)
CodeGen\EmitStatement.vb (9)
37Dim n As Integer = list.Statements.Length 125Dim emitNestedScopes As Boolean = (Not emitCatchesOnly AndAlso (statement.CatchBlocks.Length > 0) AndAlso (statement.FinallyBlockOpt IsNot Nothing)) 955Dim caseBlockLabels = ArrayBuilder(Of GeneratedLabelSymbol).GetInstance(caseBlocks.Length) 977Debug.Assert(caseBlocks.Length = caseBlockLabels.Length) 1187Debug.Assert(caseBlocks.Length = caseBlockLabels.Length) 1412Dim labels(jumps.Length - 1) As Object 1414For i As Integer = 0 To jumps.Length - 1
CodeGen\Optimizer\StackScheduler.Analyzer.vb (9)
363For i = 0 To sideeffects.Length - 1 706Debug.Assert(arguments.Length = parameters.Length OrElse arguments.Length = parameters.Length + 1) 709For i = 0 To arguments.Length - 1 712Dim context As ExprContext = If(i = parameters.Length OrElse Not parameters(i).IsByRef, ExprContext.Value, ExprContext.Address) 732Debug.Assert(constructor IsNot Nothing OrElse node.Arguments.Length = 0) 1127For i = 0 To initializers.Length - 1
CommandLine\VisualBasicCompiler.vb (4)
30Debug.Assert(Arguments.OutputFileName IsNot Nothing OrElse Arguments.Errors.Length > 0 OrElse parser.IsScriptCommandLineParser) 100Dim trees(sourceFiles.Length - 1) As SyntaxTree 105sourceFiles.Length, 119For i = 0 To sourceFiles.Length - 1
Compilation\ClsComplianceChecker.vb (5)
778Debug.Assert(args.Length = 1, "We already checked the signature and HasErrors.") 880Dim numParams As Integer = xParameterTypes.Length 881If yParameterTypes.Length <> numParams Then 934Dim builder = ArrayBuilder(Of TypeSymbol).GetInstance(parameters.Length) 956Dim builder = ArrayBuilder(Of RefKind).GetInstance(parameters.Length)
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (2)
430If Not bindResult.IsDefault AndAlso bindResult.Length = 1 Then 467If allowedSymbols.Length > 10 Then
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
714If errorLocations.Length = 0 Then
Compilation\DocumentationComments\DocumentationCommentWalker.vb (3)
169ElseIf result.Length > 1 AndAlso reference.Signature IsNot Nothing Then 280If errorLocations.Length = 0 Then 287ElseIf errorLocations.Length = 0 AndAlso useSiteInfo.Diagnostics IsNot Nothing Then
Compilation\SemanticModel.vb (6)
1190If highestBoundNodeExpr.Kind = BoundKind.BadExpression AndAlso bindingSymbols.Length = 0 Then 1436If unwrappedSymbols.Length = 1 AndAlso TypeOf unwrappedSymbols(0) Is TypeSymbol Then 1502ElseIf candidateConstructors.Length <> 0 Then 3504If aliases.Length = 0 AndAlso [imports].Length = 0 AndAlso xmlNamespaces.Length = 0 Then
Compilation\SymbolInfo.vb (1)
28If symbols.Length = 1 AndAlso (reason = CandidateReason.None OrElse reason = CandidateReason.LateBound) Then
Compilation\SyntaxTreeSemanticModel.vb (5)
486If result.Length = 1 Then 500If symbols.Length = 0 Then 504Return SymbolInfoFactory.Create(symbols, If(symbols.Length = 1, LookupResultKind.Good, LookupResultKind.Ambiguous)) 519If result.Length > 1 Then 615For i = 0 To symbols.Length - 1
Compilation\VisualBasicCompilation.vb (11)
767If Options.GlobalImports.Length > 0 Then 936Dim oldTreeCount = _syntaxTrees.Length 1714Dim numClauseSpans = clauseSpans.Length 1802If _lazyCompilationUnitCompletedTrees.Count = SyntaxTrees.Length Then 2158SyntaxTrees.Length, 2195If EventQueue IsNot Nothing AndAlso SyntaxTrees.Length = 0 Then 2576For i As Integer = 1 To modules.Length - 1 2668If bytesText.Length <> bytes.Length * 2 Then 2859Dim typesBuilder = ArrayBuilder(Of TypeSymbol).GetInstance(elementTypes.Length) 2860For i As Integer = 0 To elementTypes.Length - 1 2930For i = 0 To memberTypes.Length - 1
Declarations\DeclarationTreeBuilder.vb (3)
207If _rootNamespace.Length = 0 Then 295Debug.Assert(_rootNamespace.Length > 0) 311For i = _rootNamespace.Length - 1 To 0 Step -1
Declarations\MergedNamespaceDeclaration.vb (2)
50For i = 1 To _declarations.Length - 1 58If _declarations.Length = 1 Then
Declarations\MergedTypeDeclaration.vb (3)
113For i = 1 To _declarations.Length - 1 121If Declarations.Length = 1 Then 147If Declarations.Length = 1 Then
Declarations\SingleNamespaceDeclaration.vb (1)
88For declarationIndex = 1 To singleDeclarations.Length - 1
Declarations\SingleNamespaceOrTypeDeclaration.vb (1)
53For declarationIndex = 1 To singleDeclarations.Length - 1
Emit\ArrayTypeSymbolAdapter.vb (1)
24If customModifiers.Length = 0 Then
Emit\AttributeDataAdapter.vb (5)
44Return CommonConstructorArguments.Length 50Return CType(CommonNamedArguments.Length, UShort) 87If values.Length = 0 Then 93Dim metadataExprs = New Cci.IMetadataExpression(values.Length - 1) {} 94For i = 0 To values.Length - 1
Emit\EditAndContinue\VisualBasicDefinitionMap.vb (4)
139If slotIndex >= localSlotDebugInfo.Length Then 163Debug.Assert(result.Length = localInfos.Length) 176Dim result(slotMetadata.Length - 1) As EncLocalInfo 183Dim slotCount = Math.Min(localSlots.Length, slotMetadata.Length)
Emit\FieldSymbolAdapter.vb (1)
34If customModifiers.Length = 0 Then
Emit\NamedTypeSymbolAdapter.vb (3)
464Debug.Assert(AdaptedNamedTypeSymbol.SharedConstructors.Length = 1) 668If nestedTypes.Length = 0 Then 839For i As Integer = 0 To arguments.Length - 1
Emit\PEAssemblyBuilder.vb (1)
100If ImmutableInterlocked.InterlockedInitialize(lazyFiles, builder.ToImmutable()) AndAlso lazyFiles.Length > 0 Then
Emit\PEModuleBuilder.vb (4)
132For i As Integer = 1 To modules.Length - 1 375For i As Integer = members.Length - 1 To 0 Step -1 391If initialized AndAlso _lazyExportedTypes.Length > 0 Then 571For i As Integer = nested.Length - 1 To 0 Step -1
Emit\SymbolAdapter.vb (1)
117For i = 0 To userDefined.Length - 1
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Expressions.vb (1)
858Dim partCount As Integer = parts.Length
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (7)
143Debug.Assert(expressions.Length = newArgs.Length) 156Dim newArgs(arguments.Length - 1) As BoundExpression 157For index = arguments.Length - 1 To 0 Step -1 267Dim spilledIndices(indices.Length - 1) As BoundExpression 268For i = 0 To indices.Length - 1 448For i = 0 To fields.Length - 1
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.vb (1)
227If rootScopeHoistedLocals.Length > 0 Then
Lowering\AsyncRewriter\AsyncRewriter.CapturedSymbolOrExpression.vb (1)
184Dim indicesCount As Integer = origIndices.Length
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
449Dim indicesCount As Integer = indices.Length
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (5)
23If initializer.Type.IsValueType AndAlso node.ConstructorOpt IsNot Nothing AndAlso node.Arguments.Length > 0 Then 212If block.Statements.Length = 1 OrElse 213(block.Statements.Length = 2 AndAlso 216(block.Statements.Length = 3 AndAlso 235If innerBlock.Locals.IsEmpty AndAlso innerBlock.Statements.Length = 1 Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (17)
138Debug.Assert(block.Statements.Length = 1 OrElse 139(block.Statements.Length = 2 AndAlso 142(block.Statements.Length = 3 AndAlso 148(block.Locals.Length = 1 AndAlso block.Locals(0).IsFunctionValue)) 168If innerBlock.Locals.IsEmpty AndAlso innerBlock.Statements.Length = 1 Then 529If node.Indices.Length = 1 Then 540Dim count As Integer = expressions.Length 589Dim initializerCount As Integer = initializers.Length 638Dim initializerCount As Integer = initializers.Length 670(node.Arguments.Length = 0 AndAlso Not node.Type.IsStructureType() OrElse 680If node.Type.IsAnonymousType AndAlso node.Arguments.Length <> 0 Then 683Debug.Assert(properties.Length = node.Arguments.Length) 685Dim methodInfos(properties.Length - 1) As BoundExpression 686For i = 0 To properties.Length - 1 747Dim newArgs(exprs.Length - 1) As BoundExpression 748For i = 0 To exprs.Length - 1
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (6)
730If objCreation.Arguments.Length = 1 Then 759Debug.Assert(parameters.Length > 0) 762Debug.Assert(parameters.Length = oldArgs.Length) 764Dim newArgs(oldArgs.Length - 1) As BoundExpression 765For i = 0 To oldArgs.Length - 1
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (1)
146If objCreation.Arguments.Length = 1 Then
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
231methodBodyFactory.Literal(dynamicAnalysisSpans.Length)))
Lowering\Instrumentation\DebugInfoInjector.vb (1)
397If Not original.ResourceList.IsDefault AndAlso original.ResourceList.Length > 1 Then
Lowering\LambdaRewriter\LambdaFrame.vb (1)
221Return Me._typeParameters.Length
Lowering\LambdaRewriter\SynthesizedLambdaMethod.vb (1)
163Return _typeParameters.Length
Lowering\LocalRewriter\LocalRewriter.vb (7)
190Dim count As Integer = fixups.Length 398Dim consequenceWithEnd(block.Statements.Length) As BoundStatement 399For i = 0 To block.Statements.Length - 1 403consequenceWithEnd(block.Statements.Length) = additionOpt 419Dim consequenceWithEnd(block.Statements.Length) As BoundStatement 420For i = 0 To block.Statements.Length - 1 424consequenceWithEnd(block.Statements.Length) = additionOpt
Lowering\LocalRewriter\LocalRewriter_AnonymousTypeCreationExpression.vb (1)
20Dim fieldsCount As Integer = node.Arguments.Length
Lowering\LocalRewriter\LocalRewriter_AsNewLocalDeclarations.vb (1)
19For declarationIndex = 0 To localDeclarations.Length - 1
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (2)
101If temps.Length > 0 Then 318If temps.Length > 0 Then
Lowering\LocalRewriter\LocalRewriter_Block.vb (3)
27For i = 0 To node.Locals.Length - 1 37For i = i + 1 To node.Locals.Length - 1 43Debug.Assert(builder.Count < node.Locals.Length)
Lowering\LocalRewriter\LocalRewriter_Call.vb (1)
138Dim array(arguments.Length) As BoundExpression
Lowering\LocalRewriter\LocalRewriter_Erase.vb (1)
10If node.Clauses.Length = 1 Then
Lowering\LocalRewriter\LocalRewriter_FieldOrPropertyInitializer.vb (3)
45Dim rewrittenStatements = ArrayBuilder(Of BoundStatement).GetInstance(initializedSymbols.Length) 58For symbolIndex = 0 To initializedSymbols.Length - 1 101If initializedSymbols.Length > 1 Then
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (19)
71Dim bounds As BoundExpression = New BoundLiteral(node, ConstantValue.Create(flags.Length), intType) 101regularArgNum = rewrittenArguments.Length - namedArgNum 111Dim bounds As BoundExpression = New BoundLiteral(node, ConstantValue.Create(rewrittenArguments.Length), intType) 124For i As Integer = 0 To rewrittenArguments.Length - 1 195regularArgNum = rewrittenArguments.Length - namedArgNum 200Dim bounds As BoundExpression = New BoundLiteral(node, ConstantValue.Create(rewrittenArguments.Length + 1), intType) 213For i As Integer = 0 To rewrittenArguments.Length - 1 238Dim valueElementAssignment = LateAssignToArrayElement(node, arrayTempRef, rewrittenArguments.Length, rewrittenValue, intType) 276Dim bounds As BoundExpression = New BoundLiteral(node, ConstantValue.Create(rewrittenArguments.Length), intType) 325Dim bounds As BoundExpression = New BoundLiteral(node, ConstantValue.Create(initializer.Initializers.Length), intType) 667(assignmentArguments.Length = argExpressions.Length), 670Debug.Assert(argNames.IsDefaultOrEmpty OrElse argNames.Length = argExpressions.Length, 727regularArgNum = assignmentArguments.Length - namedArgNum 740For i As Integer = 0 To assignmentArguments.Length - 1 758copyBackBuilder = ArrayBuilder(Of BoundExpression).GetInstance(assignmentArguments.Length) 759copyBackFlagValues = (New Boolean(assignmentArguments.Length - 1) {}) 949Dim bounds As BoundExpression = New BoundLiteral(node, ConstantValue.Create(types.Length), intType)
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (4)
162If objectCreation.Arguments.Length = 1 Then 358Return objCreation.Arguments.Length = 0 376Return objCreation.Arguments.Length <> 0 572If args.Length = 0 Then
Lowering\LocalRewriter\LocalRewriter_ObjectCreation.vb (2)
223Dim initializerCount = node.Initializers.Length 300Dim initializerCount = node.Initializers.Length
Lowering\LocalRewriter\LocalRewriter_Query.vb (2)
83If nodeRangeVariables.Length > 0 Then 121Debug.Assert(firstUnmappedRangeVariable = nodeRangeVariables.Length)
Lowering\LocalRewriter\LocalRewriter_Redim.vb (3)
24If node.Clauses.Length = 1 Then 28Dim statements = New BoundStatement(node.Clauses.Length - 1) {} 29For i = 0 To node.Clauses.Length - 1
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (4)
260Debug.Assert(startFrom <= caseBlocks.Length) 262If startFrom = caseBlocks.Length Then 276If generateUnstructuredExceptionHandlingResumeCode AndAlso startFrom < caseBlocks.Length - 1 Then 289Debug.Assert(startFrom = caseBlocks.Length - 1)
Lowering\LocalRewriter\LocalRewriter_Using.vb (3)
90For declarationIndex = node.ResourceList.Length - 1 To 0 Step -1 107Dim variableCount = localAsNewDeclaration.LocalDeclarations.Length 111For initializedVariableIndex = localAsNewDeclaration.LocalDeclarations.Length - 1 To 0 Step -1
Lowering\LocalRewriter\LocalRewriter_XmlLiterals.vb (10)
86If rewriterInfo.SideEffects.Length = 0 Then 172If origSideEffects.Length = 0 Then 185If objCreation.Arguments.Length = 1 Then 189constructor = DirectCast(Me.Compilation.GetWellKnownTypeMember(If(origSideEffects.Length = 1, 199Debug.Assert(objCreation.Arguments.Length = 2) 230Dim rewrittenCallArguments(origSideEffects.Length - 1) As BoundExpression 231For i = 0 To origSideEffects.Length - 1 234Debug.Assert([call].Arguments.Length = 1) 347If items.Length = 0 Then 350Dim size = (New BoundLiteral(syntax, ConstantValue.Create(items.Length), GetSpecialType(SpecialType.System_Int32))).MakeCompilerGenerated()
Lowering\MethodToClassRewriter\MethodToClassRewriter.MyBaseMyClassWrapper.vb (4)
184Dim typeArgs(Me._typeParameters.Length - 1) As TypeSymbol 185For ind = 0 To Me._typeParameters.Length - 1 286Return _typeParameters.Length 298Return Me._parameters.Length
Lowering\MethodToClassRewriter\MethodToClassRewriter.vb (4)
117Dim newArguments(arguments.Length - 1) As BoundExpression 118For i = 0 To arguments.Length - 1 383If nodeStatements.Length > 0 AndAlso nodeStatements(0).Syntax IsNot Nothing Then 415For i As Integer = start To nodeStatements.Length - 1
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (1)
302If rewrittenStatements.Length = 1 AndAlso rewrittenStatements(0).Kind = BoundKind.StateMachineScope Then
Lowering\StateMachineRewriter\SynthesizedContainer.vb (4)
57Dim typeArgs(Me._typeParameters.Length - 1) As TypeSymbol 58For ind = 0 To Me._typeParameters.Length - 1 82Return Me._typeParameters.Length > 0 114Return Me._typeParameters.Length
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.vb (1)
129Return Me._parameters.Length
Lowering\SyntheticBoundNodeFactory.vb (3)
594Debug.Assert(method.ParameterCount = args.Length) 694If sectionsArray.Length = 0 Then 1039Return New BoundArrayCreation(_syntax, ImmutableArray.Create(Of BoundExpression)(Literal(elements.Length)), boundArrayInit, arrayType)
Lowering\UseTwiceRewriter.vb (4)
230Dim n = node.Indices.Length 372Dim nArgs = node.Arguments.Length 433Dim nArgs = node.ArgumentsOpt.Length 528Dim initializerSize As Integer = initializer.Initializers.Length
Lowering\WithExpressionRewriter.vb (1)
137Dim n = value.Indices.Length
Operations\VisualBasicOperationFactory.vb (3)
332Dim builder = ArrayBuilder(Of TOperation).GetInstance(nodeArray.Length) 346Dim builder = ArrayBuilder(Of IOperation).GetInstance(boundNodeWithChildren.Children.Length) 1570Dim builder = ArrayBuilder(Of IInterpolatedStringContentOperation).GetInstance(parts.Length)
Operations\VisualBasicOperationFactory_Methods.vb (3)
195Dim argumentsLength As Integer = boundArguments.Length 196Debug.Assert(argumentsLength = parameters.Length) 226Dim lastParameterIndex = parameters.Length - 1
Semantics\Conversions.vb (14)
1264If Not destination.IsTupleOrCompatibleWithTupleOfCardinality(arguments.Length) Then 1269Debug.Assert(arguments.Length = targetElementTypes.Length) 1281For i As Integer = 0 To arguments.Length - 1 1393For i As Integer = 0 To lambdaParams.Length - 1 1552If invoke.ParameterCount <> lambdaParams.Length Then 1558For i As Integer = 0 To lambdaParams.Length - 1 2768For i As Integer = 0 To typeParameters.Length - 1 3582Debug.Assert(sourceElementTypes.Length = targetElementTypes.Length) 4192If parameters.Length = 0 AndAlso toMethodSignature.ParameterTypes.Length > 0 Then 4195ElseIf parameters.Length <> toMethodSignature.ParameterTypes.Length Then 4198For parameterIndex As Integer = 0 To parameters.Length - 1
Semantics\Operators.vb (4)
535If Not userDefinedOperator.BestResult.HasValue AndAlso userDefinedOperator.Candidates.Length = 0 Then 538If userDefinedOperator.Candidates.Length = 0 Then 905ElseIf Not userDefinedOperator.BestResult.HasValue AndAlso userDefinedOperator.Candidates.Length = 0 Then 908If userDefinedOperator.Candidates.Length = 0 Then
Semantics\OverloadResolution.vb (48)
359Debug.Assert(parameters.Length = method.ParameterCount) 366Return _parameters.Length 830While i < allResults.Length 1096Dim candidates = ArrayBuilder(Of Candidate).GetInstance(properties.Length - 1) 1098For i As Integer = 0 To properties.Length - 1 Step 1 1167Debug.Assert(argumentNames.IsDefault OrElse argumentNames.Length = arguments.Length) 1202ApplyTieBreakingRulesSkippedByCombineCandidates(candidates, applicableCandidates, applicableNarrowingCandidates, arguments.Length, argumentNames, useSiteInfo) 1439Debug.Assert(argumentNames.IsDefault OrElse argumentNames.Length > 0) 2154For k = 0 To arguments.Length - 1 Step 1 2294For i = 0 To arguments.Length - 1 Step 1 2598For k = 0 To arguments.Length - 1 Step 1 2627Return k >= arguments.Length 2757For j As Integer = 0 To arguments.Length - 1 3039Debug.Assert(argumentNames.IsDefault OrElse (argumentNames.Length > 0 AndAlso argumentNames.Length = arguments.Length)) 3048argsToParams = ArrayBuilder(Of Integer).GetInstance(arguments.Length, -1) 3068For i As Integer = 0 To arguments.Length - 1 Step 1 3128For i As Integer = positionalArguments To arguments.Length - 1 Step 1 3224Debug.Assert(argumentNames.IsDefault OrElse (argumentNames.Length > 0 AndAlso argumentNames.Length = arguments.Length)) 3344conversionKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3408conversionKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3492conversionKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3519conversionBackKinds = New KeyValuePair(Of ConversionKind, MethodSymbol)(arguments.Length - 1) {} 3863Debug.Assert(argumentNames.IsDefault OrElse (argumentNames.Length > 0 AndAlso argumentNames.Length = arguments.Length)) 4080If typeArguments.Length > 0 AndAlso candidate.Arity <> typeArguments.Length Then 4102If arguments.Length <> maxCount Then 4105ElseIf arguments.Length < requiredCount OrElse 4106(Not hasParamArray AndAlso arguments.Length > maxCount) Then 4130If Not hasParamArray OrElse (arguments.Length = maxCount AndAlso Not forceExpandedForm) Then 4189If typeArguments.Length > 0 Then 4218candidateAnalysis.ExpandedParamArrayArgumentsUsed = Math.Max(arguments.Length - candidate.Candidate.ParameterCount + 1, 0) 4254If typeArguments.Length = 0 AndAlso newCandidate.Candidate.Arity > 0 Then 4270CombineCandidates(results, newCandidate, arguments.Length, argumentNames, someCandidatesHaveOverloadResolutionPriority, useSiteInfo) 4291Debug.Assert(argumentNames.IsDefault OrElse argumentNames.Length > 0) 4653For i = 0 To arguments.Length - 1 Step 1 4833For i = 0 To arguments.Length - 1 Step 1 4954For i = 0 To leftTypeArguments.Length - 1 5299For i As Integer = 0 To typeArguments.Length - 1 Step 1 5332candidate.NotInferredTypeArguments = BitVector.Create(typeArguments.Length) 5334For i As Integer = 0 To typeArguments.Length - 1 Step 1 5359If typeArguments.Length > 0 Then
Semantics\TypeInference\TypeArgumentInference.vb (24)
454For i As Integer = 0 To Math.Min(lambdaParameters.Length, delegateParameters.Length) - 1 Step 1 1047AddTypeToGraph(node.ParameterType, node, isOutgoingEdge, BitVector.Create(_typeParameterNodes.Length)) 1053If ordinal < _typeParameterNodes.Length AndAlso 1129If parameterType.IsTupleOrCompatibleWithTupleOfCardinality(tupleArguments.Length) Then 1131For i As Integer = 0 To tupleArguments.Length - 1 1153AddTypeToGraph(parameterType, argNode, isOutgoingEdge:=True, haveSeenTypeParameters:=BitVector.Create(_typeParameterNodes.Length)) 1161Dim haveSeenTypeParameters = BitVector.Create(_typeParameterNodes.Length) 1187AddTypeToGraph(parameterType, argNode, isOutgoingEdge:=True, haveSeenTypeParameters:=BitVector.Create(_typeParameterNodes.Length)) 1209Dim haveSeenTypeParameters = BitVector.Create(_typeParameterNodes.Length) 1211For i As Integer = 0 To Math.Min(delegateParameters.Length, lambdaParameters.Length) - 1 Step 1 1400If parameterElementTypes.Length <> argumentElementTypes.Length Then 1404For typeArgumentIndex As Integer = 0 To parameterElementTypes.Length - 1 1688If parameterParams.Length <> argumentParams.Length AndAlso argumentParams.Length <> 0 Then 1696For i As Integer = 0 To argumentParams.Length - 1 2076If lambdaParams.Length > delegateParams.Length Then 2080For i As Integer = 0 To lambdaParams.Length - 1 Step 1 2252Dim typeArguments = ArrayBuilder(Of TypeWithModifiers).GetInstance(_typeParameterNodes.Length) 2254For i As Integer = 0 To _typeParameterNodes.Length - 1 Step 1
Semantics\TypeInference\TypeInferenceCollection.vb (2)
629Debug.Assert(names1.Length = names2.Length)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
106If symbol.Parameters.Length > 0 Then
SymbolDisplay\SymbolDisplayVisitor.Types.vb (3)
387For i As Integer = 0 To elements.Length - 1 488For i As Integer = 0 To typeArguments.Length - 1 534Dim constraintCount = TypeParameterSpecialConstraintCount(typeParam) + constraintTypes.Length
Symbols\AliasSymbol.vb (1)
253Return If(Me.Locations.Length > 0, Me.Locations(0).GetHashCode(), Me.Name.GetHashCode())
Symbols\AnonymousTypes\AnonymousTypeDescriptor.vb (2)
96Dim count As Integer = myFields.Length 120Dim fieldCount = Me.Fields.Length
Symbols\AnonymousTypes\PublicSymbols\AnonymousDelegate_TypePublicSymbol.vb (6)
27Debug.Assert(typeDescr.Parameters.Length > 0) 33Dim parameters = ArrayBuilder(Of ParameterSymbol).GetInstance(parameterDescriptors.Length + 1) 43For i = 0 To parameterDescriptors.Length - 2 81For i = 0 To parameterDescriptors.Length - 2 100For i = 0 To parameterDescriptors.Length - 2 165Return _members(_members.Length - 1)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_TypePublicSymbol.vb (2)
28Dim fieldsCount As Integer = typeDescr.Fields.Length 96Dim fieldsCount As Integer = Me._properties.Length
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousDelegate_TemplateSymbol.vb (6)
23Return If(parameters.Length = 1 AndAlso parameters.IsSubDescription(), 32Debug.Assert(typeDescr.Parameters.Length > 1 OrElse 40Dim parameters = ArrayBuilder(Of ParameterSymbol).GetInstance(parameterDescriptors.Length + 1) 50For i = 0 To parameterDescriptors.Length - 2 156Return _members(_members.Length - 1) 206Debug.Assert(typeDescr.Parameters.Length = 1)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_ConstructorSymbol.vb (2)
22Dim fieldsCount As Integer = container.Properties.Length 33Return Me._parameters.Length
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (4)
29Dim fieldsCount As Integer = typeDescr.Fields.Length 160Debug.Assert(Me.Properties.Length > 0) 164Dim displayCount As Integer = Math.Min(Me.Properties.Length, 4) 178If Me.Properties.Length > displayCount Then
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTemplateSymbol.vb (5)
58Dim arity As Integer = typeDescr.Fields.Length 68Debug.Assert(typeDescr.Parameters.Length = 1) 92Return _typeParameters.Length > 0 124Return _typeParameters.Length 369Debug.Assert(names.Names.Length > index)
Symbols\ArrayTypeSymbol.vb (4)
523If newInterfaces.Length > 0 Then 554Debug.Assert(interfaces.Length <= 2) 584If newInterfaces.Length > 0 Then 663Debug.Assert(lowerBounds.IsDefaultOrEmpty OrElse (Not lowerBounds.IsEmpty AndAlso (lowerBounds.Length <> rank OrElse Not lowerBounds.All(Function(b) b = 0))))
Symbols\AssemblySymbol.vb (1)
649For i As Integer = 0 To references.Length - 1 Step 1
Symbols\Attributes\AttributeData.vb (3)
379If namedArgs.Length = 1 Then 421If members.Length = 1 AndAlso members(0).Kind = SymbolKind.Property Then 625For i As Integer = 0 To attributes.Length - 1
Symbols\Attributes\SourceAttributeData.vb (2)
150If parameterCount <> parameters.Length Then 161If k >= parameters.Length Then
Symbols\ConstraintsHelper.vb (5)
101If constraints.Length > 0 Then 272If constraintsBuilder.Count <> constraints.Length Then 622Debug.Assert(typeParameters.Length = typeArguments.Length) 624Dim n = typeParameters.Length
Symbols\EmbeddedSymbols\Symbols\EmbeddedNamedTypeSymbol.vb (1)
27Debug.Assert(references.Length() = 1)
Symbols\ErrorTypeSymbol.vb (1)
343If candidates.Length = 1 Then ' Only return a guess if its unambiguous.
Symbols\EventSignatureComparer.vb (3)
135If event1.DelegateParameters.Length > 0 OrElse event2.DelegateParameters.Length > 0 Then 163_hash = Hash.Combine(_hash, [event].DelegateParameters.Length)
Symbols\ExtendedErrorTypeSymbol.vb (1)
56If candidateSymbols.Length = 1 AndAlso
Symbols\InstanceErrorTypeSymbol.vb (1)
85Debug.Assert(substitution.TargetGenericDefinition Is Me AndAlso substitution.Parent Is Nothing AndAlso substitution.Pairs.Length > 0)
Symbols\MergedNamespaceSymbol.vb (16)
80Debug.Assert(namespacesToMerge.Length <> 0) 82If namespacesToMerge.Length = 1 Then 183Debug.Assert(namespacesToMerge.Distinct().Length = namespacesToMerge.Length) 243childCount += nsSym.GetMembersUnordered().Length 410Debug.Assert(ns.ConstituentNamespaces.Length = 1) 414Debug.Assert(namespacesToMerge.Length > 0) 466Debug.Assert(ns.ConstituentNamespaces.Length = 1) 469Debug.Assert(namespacesToMerge.Length > 0) 598Dim name As String = If(namespacesToMerge.Length > 0, namespacesToMerge(0).Name, Nothing) 606Debug.Assert(containingNamespace Is Nothing OrElse namespacesToMerge.Length > 0) 611Return If(_namespacesToMerge.Length > 0, _namespacesToMerge(0).Name, "") 698Debug.Assert(namespaceArray.Length < _namespacesToMerge.Length) 699If namespaceArray.Length >= _namespacesToMerge.Length Then 708Dim parentsArray = ArrayBuilder(Of NamespaceSymbol).GetInstance(namespaceArray.Length)
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (2)
255Dim n = candidateReturnTypeCustomModifiers.Length 256If targetReturnTypeCustomModifiers.Length <> n Then
Symbols\Metadata\PE\MetadataDecoder.vb (3)
80If typeParameters.Length <= position Then 180For i = 0 To assemblies.Length - 1 208For i = 0 To assemblies.Length - 1 Step 1
Symbols\Metadata\PE\PEEventSymbol.vb (2)
274If Me.AddMethod.ExplicitInterfaceImplementations.Length = 0 AndAlso Me.RemoveMethod.ExplicitInterfaceImplementations.Length = 0 Then
Symbols\Metadata\PE\PEMethodSymbol.vb (7)
395If Parameters.Length = 0 Then 578For j = 0 To inputParams.Length - 1 584If j < inputParams.Length Then 794Return TypeParameters.Length 797Return Me._lazyTypeParameters.Length 955Return Parameters.Length 958Return Me._lazySignature.Parameters.Length
Symbols\Metadata\PE\PENamedTypeSymbol.vb (8)
530While index < members.Length 548If index >= members.Length OrElse members(index).Kind <> SymbolKind.Method Then 569If index = members.Length OrElse members(index).Kind <> SymbolKind.Method Then 703If weMembers.Length <> 1 Then 1396Dim n = containingTypeParameters.Length 1416IndexedTypeParameterSymbol.Take(nestedTypeParameters.Length).As(Of TypeSymbol)) 1547Dim n = members.Length 1564Dim n = members.Length
Symbols\Metadata\PE\PEParameterSymbol.vb (1)
630For i = 0 To parameters.Length - 1
Symbols\Metadata\PE\PEPropertyOrEventHelpers.vb (1)
32If implementedAccessors.Length = 0 Then
Symbols\Metadata\PE\PEPropertySymbol.vb (3)
364If (Me._getMethod Is Nothing OrElse Me._getMethod.ExplicitInterfaceImplementations.Length = 0) AndAlso (Me._setMethod Is Nothing OrElse Me._setMethod.ExplicitInterfaceImplementations.Length = 0) Then 552If index < parameters.Length Then
Symbols\Metadata\PE\PETypeParameterSymbol.vb (1)
252If Not modifiers.IsDefaultOrEmpty AndAlso modifiers.Length > 1 Then
Symbols\Metadata\PE\SymbolFactory.vb (4)
96Dim argumentIndex As Integer = refersToNoPiaLocalType.Length - 1 121Debug.Assert(genericParameters.Length > 0) 123If genericParameters.Length <> arguments.Length Then
Symbols\Metadata\PE\TupleTypeDecoder.vb (4)
70_namesIndex = If(elementNames.IsDefault, 0, elementNames.Length) 215Debug.Assert(elementNames.IsDefault OrElse elementNames.Length = tupleCardinality) 242Dim decodedArgs = ArrayBuilder(Of TypeSymbol).GetInstance(typeArgs.Length) 245For i As Integer = typeArgs.Length - 1 To 0 Step -1
Symbols\MetadataOrSourceAssemblySymbol.vb (1)
43Debug.Assert([module].GetReferencedAssemblies().Length = 0)
Symbols\MethodSignatureComparer.vb (14)
506If params1.Length > params2.Length Then 507commonParamCount = params2.Length 509ElseIf params1.Length < params2.Length Then 510commonParamCount = params1.Length 513commonParamCount = params1.Length 523For i As Integer = commonParamCount To longerParameters.Length - 1 720Dim numParams = params1.Length 722If numParams <> params2.Length Then 843Dim arity = typeParameters1.Length 847Debug.Assert(typeParameters2.Length = arity) 880If (constraintTypes1.Length = 0) AndAlso (constraintTypes2.Length = 0) Then
Symbols\MethodSymbol.vb (3)
187Return Me.Parameters.Length 574If Parameters.Length = 0 Then 578If Parameters.Length > 1 Then
Symbols\MethodSymbolExtensions.vb (1)
98Debug.Assert(method.IsGenericMethod() = (typeArguments.Length > 0))
Symbols\MissingAssemblySymbol.vb (1)
222Debug.Assert([module].GetReferencedAssemblies().Length = 0)
Symbols\MissingMetadataTypeSymbol.vb (2)
147For i = 0 To namespaces.Length - 1 Step 1 168While (i < namespaces.Length)
Symbols\ModuleSymbol.vb (1)
169If referencedAssemblyIndex < referencedAssemblies.Length Then
Symbols\NamedTypeSymbol.vb (2)
237If methods.Length <> 1 Then 1550tupleCardinality = (TupleTypeSymbol.RestPosition - 1) * levelsOfNesting + typeToCheck.TupleElementTypes.Length
Symbols\NonMissingModuleSymbol.vb (1)
73Return GetUnifiedAssemblies().Length > 0
Symbols\PropertySymbol.vb (2)
81Return Me.Parameters.Length 537For i As Integer = 0 To originalParameters.Length - 1
Symbols\PropertySymbolExtensions.vb (1)
57Return parameters(parameters.Length - 1).Type
Symbols\ReducedExtensionMethodSymbol.vb (9)
192Dim fixed = ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeSymbol)).GetInstance(typeParametersToFixArray.Length) 194For i As Integer = 0 To typeParametersToFixArray.Length - 1 226If fixedTypeParameters.Length < curriedFromMethod.Arity Then 227curriedTypeParameters = New ReducedTypeParameterSymbol(curriedFromMethod.Arity - fixedTypeParameters.Length - 1) {} 235For i = 0 To fixedTypeParameters.Length - 1 367Return _curriedTypeParameters.Length 410If fromParams.Length = 1 Then 413Dim newParams(fromParams.Length - 2) As ReducedParameterSymbol 415For i As Integer = 1 To fromParams.Length - 1
Symbols\ReferenceManager.vb (10)
346Debug.Assert(bindingResult.Length = allAssemblyData.Length) 360modules.Length, 361referencedAssemblies.Length, 401Dim totalReferencedAssemblyCount = allAssemblyData.Length - 1 554Dim moduleCount = modules.Length 575New AssemblyIdentity(referencedAssemblies.Length - linkedUnderlyingReferences - 1) {} 579For k As Integer = 0 To underlyingReferencedAssemblySymbols.Length - 1 Step 1 591Dim refsCount As Integer = referencedAssemblies.Length 621Dim moduleCount = modules.Length 658Debug.Assert(moduleSymbols.Length = 1 + modules.Length)
Symbols\Retargeting\RetargetingAssemblySymbol.vb (2)
98Dim modules(underlyingAssembly.Modules.Length - 1) As ModuleSymbol 102For i As Integer = 1 To underlyingAssembly.Modules.Length - 1 Step 1
Symbols\Retargeting\RetargetingEventSymbol.vb (1)
120For i = 0 To impls.Length - 1
Symbols\Retargeting\RetargetingMethodSymbol.vb (2)
204Dim count = list.Length 476For i = 0 To impls.Length - 1
Symbols\Retargeting\RetargetingModuleSymbol.vb (7)
176Debug.Assert(referencedAssemblySymbols.Length = referencedAssemblies.Length) 177Debug.Assert(referencedAssemblySymbols.Length <= underlyingBoundReferences.Length) ' Linked references are filtered out. 186If i >= referencedAssemblySymbols.Length Then 220While (j < underlyingBoundReferences.Length AndAlso underlyingBoundReferences(j).IsLinked) 224Debug.Assert(j = underlyingBoundReferences.Length)
Symbols\Retargeting\RetargetingPropertySymbol.vb (2)
221Dim count = list.Length 292For i = 0 To impls.Length - 1
Symbols\Retargeting\RetargetingSymbolTranslator.vb (12)
157If newUnderlyingType.IsTupleOrCompatibleWithTupleOfCardinality(type.TupleElementTypes.Length) Then 520If assembliesToEmbedTypesFrom.Length > 0 Then 609For i As Integer = 0 To oldModifiers.Length - 1 Step 1 614newModifiers = ArrayBuilder(Of CustomModifier).GetInstance(oldModifiers.Length) 626Debug.Assert(newModifiers Is Nothing OrElse newModifiers.Count = oldModifiers.Length) 706Dim newArguments = ArrayBuilder(Of TypedConstant).GetInstance(constructorArguments.Length) 760Dim newArguments = ArrayBuilder(Of KeyValuePair(Of String, TypedConstant)).GetInstance(namedArguments.Length) 834Dim symbols = ArrayBuilder(Of Symbol).GetInstance(arr.Length) 844Dim result = ArrayBuilder(Of NamedTypeSymbol).GetInstance(sequence.Length) 856Dim result = ArrayBuilder(Of TypeSymbol).GetInstance(sequence.Length) 868Dim parameters = ArrayBuilder(Of TypeParameterSymbol).GetInstance(list.Length) 962Dim targetParamsBuilder = ArrayBuilder(Of ParameterSymbol).GetInstance(method.Parameters.Length)
Symbols\SignatureOnlyMethodSymbol.vb (1)
72Return _typeParameters.Length
Symbols\Source\CustomEventAccessorSymbol.vb (1)
206If parameters.Length <> 1 Then
Symbols\Source\CustomModifierUtils.vb (3)
71Debug.Assert(overriddenMemberParameters.Length = parameters.Length) 77For i As Integer = 0 To parameters.Length - 1
Symbols\Source\ImplementsHelper.vb (3)
666If unsubstitutedImplementations.Length = 0 Then 669Dim substitutedImplementations(0 To unsubstitutedImplementations.Length - 1) As TSymbol 670For i As Integer = 0 To unsubstitutedImplementations.Length - 1
Symbols\Source\LambdaSymbol.vb (2)
371Dim hc As Integer = Hash.Combine(Me.Syntax.GetHashCode(), Me._parameters.Length) 373For i = 0 To Me._parameters.Length - 1
Symbols\Source\OverrideHidingHelper.vb (4)
847If overriddenMembers.Length = 0 Then 849If overriddenMembersResult.InaccessibleMembers.Length > 0 Then 855ElseIf overriddenMembers.Length > 1 Then 857Dim diagnosticInfos = ArrayBuilder(Of DiagnosticInfo).GetInstance(overriddenMembers.Length)
Symbols\Source\SourceAssemblySymbol.vb (15)
89Dim moduleBuilder As New ArrayBuilder(Of ModuleSymbol)(1 + netModules.Length) 128For i As Integer = 1 To _modules.Length - 1 213For i As Integer = 0 To appliedSourceAttributes.Length - 1 291For i As Integer = 1 To _modules.Length - 1 322Debug.Assert(attributesFromNetModules.Length = netModuleNames.Length) 328Dim netModuleAttributesCount As Integer = attributesFromNetModules.Length 398For i As Integer = _modules.Length - 1 To 1 Step -1 448Not attributeIndicesToSkip.Any(Function(index) index < 0 OrElse index >= Me.GetAttributes().Length)) 475Debug.Assert(index < Me.GetAttributes().Length) 1174Dim argCount As Integer = attrData.CommonConstructorArguments.Length 1368If _modules.Length > 1 AndAlso Not _compilation.Options.OutputKind.IsNetModule() Then 1373For i As Integer = 1 To Modules.Length - 1 1397For i As Integer = 1 To Modules.Length - 1 1783For i As Integer = _modules.Length - 1 To 1 Step -1
Symbols\Source\SourceEventSymbol.vb (1)
205For i As Integer = 1 To implementedEvents.Length - 1
Symbols\Source\SourceFile.vb (3)
68Debug.Assert(memberImports.Length = memberImportsSyntax.Length) 334For i = 0 To memberImports.Length - 1
Symbols\Source\SourceMemberContainerTypeSymbol.vb (24)
119For i As Integer = 1 To declarations.Length - 1 137For i = 0 To declaration.Declarations.Length - 1 1357Debug.Assert(Locations.Length > 0) 1751Debug.Assert(method.Locations.Length = 1) 1871For i = 0 To memberGroup.Length - 1 1913For index = 0 To declMethodParams.Length - 1 1920Debug.Assert(implParameter.Locations.Length = 1) 1932Debug.Assert(declTypeParams.Length = implTypeParams.Length) 1934For index = 0 To declTypeParams.Length - 1 1941Debug.Assert(implParameter.Locations.Length = 1) 2165Debug.Assert(symbolToReportErrorOn.Locations.Length > 0) 2254Debug.Assert(Me.Locations.Length > 0) 2364Debug.Assert(fieldOrPropertyArray.Length > 0) 2930If Me.Locations.Length > 1 AndAlso Not Me.IsPartial Then 2997If definedTypes.Length > 0 Then 3159If allMembers.Length >= 2 Then 3263If Me._declaration.Declarations.Length >= 1 AndAlso position = Me._declaration.Declarations(0).Location.SourceSpan.Start Then 3512If memberList.Length < 2 Then 3523For memberIndex = 0 To memberList.Length - 2 3548For nextMemberIndex = memberIndex + 1 To memberList.Length - 1 3589CheckForOperatorOverloadingErrors(memberList, memberList.Length - 1, structEnumerator, operatorsKnownToHavePair, diagnostics) Then 3736For nextMemberIndex = memberIndex To memberList.Length - 1 3843If (Me.Locations.Length > 1 AndAlso Not Me.IsPartial) Then
Symbols\Source\SourceMethodSymbol.vb (6)
1255Return TypeParameters.Length 1867Debug.Assert(boundAttributes.Length = allAttributeSyntaxNodes.Length) 2083Return Me._lazyParameters.Length 2146Dim fakeParamsBuilder = ArrayBuilder(Of ParameterSymbol).GetInstance(params.Length) 2189If param.Locations.Length > 0 Then
Symbols\Source\SourceModuleSymbol.vb (3)
271Return GetAssembliesToEmbedTypesFrom().Length > 0 500For i = 0 To memberImports.Length - 1 512For i = 0 To aliasImports.Length - 1
Symbols\Source\SourceNamedTypeSymbol.vb (9)
557container.Locations.Length = 1 OrElse 594If contenders.Length = 0 Then 864Dim n1 = constraints1.Length 865Dim n2 = constraints2.Length 956For i = 0 To typeParameters.Length - 1 1839Debug.Assert(result.Length = 0 OrElse (Not Me.IsScriptClass AndAlso Not Me.IsImplicitClass)) ' Should be handled by above test. 2385Debug.Assert(boundAttributes.Length = allAttributeSyntaxNodes.Length) 2434For i = 0 To members.Length - 1
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (9)
40If args.Length > 0 Then 47If args.Length > 1 Then 53If args.Length > 2 Then 76If _syntheticInterfaces.Length > 1 Then 208(InterfaceId IsNot Nothing AndAlso interfaces.Length > 0) OrElse 209(EventId IsNot Nothing AndAlso interfaces.Length > 1) Then 223If interfaces.Length > 1 Then 236If interfaces.Length > 0 Then 1346If attributes.Count = toClone.Length Then
Symbols\Source\SourceNamespaceSymbol.vb (4)
146Dim builder As New Dictionary(Of String, Object)(_declaration.Children.Length, IdentifierComparison.Comparer) 206If allMembers.Length >= 2 Then 295Dim builder As ArrayBuilder(Of SyntaxReference) = ArrayBuilder(Of SyntaxReference).GetInstance(declarations.Length) 458Debug.Assert(_declaration.Declarations.Length > 0)
Symbols\Source\SourceParameterSymbol.vb (2)
252For i = 0 To parameters.Length - 1 416Debug.Assert(attribute.CommonConstructorArguments.Length = 1)
Symbols\Source\SourcePropertyAccessorSymbol.vb (2)
262If param.Locations.Length > 0 Then 395Dim nPropertyParameters = propertyParameters.Length
Symbols\Source\SourcePropertySymbol.vb (2)
797Dim fakeParamsBuilder = ArrayBuilder(Of ParameterSymbol).GetInstance(params.Length) 857Return Me._lazyParameters.Length
Symbols\Source\SourceTypeParameterSymbol.vb (1)
213If locations.Length > 0 Then
Symbols\SpecialMembers.vb (1)
51Debug.Assert([module].GetReferencedAssemblies().Length = 0)
Symbols\SubstitutedErrorType.vb (2)
23Return _substitution.Pairs.Length = 0 288Dim count As Integer = arguments.Length
Symbols\SubstitutedMethodSymbol.vb (8)
31Dim count = unsubstituted.Length 579Dim alphaRenamedTypeParameters = New SubstitutedTypeParameterSymbol(typeParametersDefinitions.Length - 1) {} 581For i As Integer = 0 To typeParametersDefinitions.Length - 1 Step 1 605Debug.Assert(Not typeParameters.IsDefault AndAlso typeParameters.Length = DirectCast(substitution.TargetGenericDefinition, MethodSymbol).Arity) 765Dim count As Integer = arguments.Length 797Debug.Assert(typeArguments.Length = constructedFrom.Arity) 843Debug.Assert(typeArguments.Length = DirectCast(substitution.TargetGenericDefinition, MethodSymbol).Arity) 893For i As Integer = 0 To typeArguments.Length - 1
Symbols\SubstitutedNamedType.vb (12)
253If instanceInterfaces.Length = 0 Then 257Dim substitutedInterfaces = New NamedTypeSymbol(instanceInterfaces.Length - 1) {} 259For i As Integer = 0 To instanceInterfaces.Length - 1 Step 1 281If instanceInterfaces.Length = 0 Then 285Dim substitutedInterfaces = New NamedTypeSymbol(instanceInterfaces.Length - 1) {} 287For i As Integer = 0 To instanceInterfaces.Length - 1 Step 1 555Dim count As Integer = arguments.Length 681Dim alphaRenamedTypeParameters = New SubstitutedTypeParameterSymbol(typeParametersDefinitions.Length - 1) {} 683For i As Integer = 0 To typeParametersDefinitions.Length - 1 Step 1 706Debug.Assert(Not typeParameters.IsDefault AndAlso typeParameters.Length = DirectCast(substitution.TargetGenericDefinition, NamedTypeSymbol).Arity) 866Debug.Assert(substitution.Pairs.Length = 0) 878Debug.Assert(substitution.Pairs.Length = 0)
Symbols\SubstitutedPropertySymbol.vb (1)
252Dim count = unsubstituted.Length
Symbols\Symbol.vb (5)
333Return If(locations.Length > 0, New LexicalSortKey(locations(0), declaringCompilation), LexicalSortKey.NotInSource) 411If references.Length = 1 Then 900If Me.IsImplicitlyDeclared AndAlso declaringReferences.Length = 0 Then 1366Dim n = typeArguments.Length 1367If Not typeArgumentNullableAnnotations.IsDefault AndAlso typeArgumentNullableAnnotations.Length <> n Then
Symbols\Symbol_Attributes.vb (9)
268Debug.Assert(attributesToBind.Length = binders.Length) 276Dim attributeBuilder = New VisualBasicAttributeData(boundAttributeTypes.Length - 1) {} 430For i = 0 To boundAttributeTypes.Length - 1 460Debug.Assert(binders.Length = boundAttributes.Length) 461Debug.Assert(attributeSyntaxList.Length = boundAttributes.Length) 463Dim totalAttributesCount As Integer = boundAttributes.Length
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionConstructorSymbol.vb (1)
44Return _parameters.Length
Symbols\SynthesizedSymbols\SynthesizedInterfaceImplementationStubSymbol.vb (1)
67Return _typeParameters.Length
Symbols\SynthesizedSymbols\SynthesizedIntrinsicOperatorSymbol.vb (4)
77If _parameters.Length = other._parameters.Length AndAlso 82For i As Integer = 0 To _parameters.Length - 1 95Return Hash.Combine(_name, Hash.Combine(m_containingType, _parameters.Length))
Symbols\SynthesizedSymbols\SynthesizedSimpleConstructorSymbol.vb (1)
38Return Me._parameters.Length
Symbols\SynthesizedSymbols\SynthesizedSimpleMethodSymbol.vb (1)
97Return Me._parameters.Length
Symbols\Tuples\TupleTypeSymbol.vb (22)
345Debug.Assert(elementLocations.IsDefault OrElse elementLocations.Length = elementTypes.Length) 346Debug.Assert(elementNames.IsDefault OrElse elementNames.Length = elementTypes.Length) 370Debug.Assert(elementNames.IsDefault OrElse elementTypes.Length = elementNames.Length) 371Dim length As Integer = elementTypes.Length 417Dim instance As ArrayBuilder(Of TypeSymbol) = ArrayBuilder(Of TypeSymbol).GetInstance(TupleTypeSymbol.RestPosition - 1 + tupleElementTypes.Length) 478Debug.Assert(Not newUnderlyingType.IsTupleType AndAlso newUnderlyingType.IsTupleOrCompatibleWithTupleOfCardinality(Me._elementTypes.Length)) 484Debug.Assert(newElementNames.IsDefault OrElse Me._elementTypes.Length = newElementNames.Length) 544Dim numElements As Integer = elementTypes.Length 658Dim builder = ArrayBuilder(Of FieldSymbol).GetInstance(_elementTypes.Length, fillWithValue:=Nothing) 693Dim elementsMatchedByFields = ArrayBuilder(Of Boolean).GetInstance(_elementTypes.Length, fillWithValue:=False) 694Dim members = ArrayBuilder(Of Symbol).GetInstance(Math.Max(_elementTypes.Length, _underlyingType.OriginalDefinition.GetMembers().Length)) 886Dim i As Integer = members.Length - 1 1001Debug.Assert(myNames.Length = otherNames.Length) 1003For i As Integer = 0 To myNames.Length - 1 1115Dim sourceLength As Integer = sourceNames.Length 1117Debug.Assert(allMissing OrElse destinationNames.Length = sourceLength)
Symbols\TypeSubstitution.vb (20)
403If params.Length <> args.Length Then 410Dim haveSubstitutionForOrdinal = BitVector.Create(params.Length) 415For i = 0 To params.Length - 1 546For i = 0 To _pairs.Length - 1 603alphaRenamedTypeParameters.Length = typeParametersDefinitions.Length) 606Dim pairs(typeParametersDefinitions.Length - 1) As KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers) 608For i As Integer = 0 To typeParametersDefinitions.Length - 1 Step 1 632Debug.Assert(targetMethod.Arity > 0 AndAlso typeArguments.Length = targetMethod.Arity AndAlso 640For i As Integer = 0 To typeArguments.Length - 1 Step 1 669For i As Integer = 0 To typeArguments.Length - 1 Step 1 755If oldPairs.Length > 0 Then 767For i = 0 To oldPairs.Length - 1 Step 1 820Dim n = typeParametersDefinitions.Length 822If args.Length <> n Then 875For i As Integer = 0 To customModifiers.Length - 1 880Dim builder = ArrayBuilder(Of CustomModifier).GetInstance(customModifiers.Length) 884For j As Integer = i + 1 To customModifiers.Length - 1 895Debug.Assert(builder.Count = customModifiers.Length)
Symbols\TypeSymbol.vb (4)
169For n = baseInterfaces.Length - 1 To 0 Step -1 183For n = baseInterfaces.Length - 1 To 0 Step -1 221Dim result As New MultiDictionary(Of NamedTypeSymbol, NamedTypeSymbol)(declaredInterfaces.Length, EqualsIgnoringComparer.InstanceCLRSignatureCompare) 511Return TupleElementTypes.Length = targetCardinality
Symbols\TypeSymbolExtensions.vb (8)
275Dim count As Integer = [mod].Length 277If (count <> otherMod.Length) Then 964If typeArguments.Length = 0 OrElse typeArguments.Length <> expectedCount Then 1017Loop While i < typeArguments.Length 1024While i < typeArguments.Length 1043For i = 0 To specializedTypeParameters.Length - 1 1215For i As Integer = typeArguments.Length - 1 To 0 Step -1
Symbols\UnboundGenericType.vb (3)
527Dim members(originalTypeMembers.Length - 1) As NamedTypeSymbol 566Dim alphaRenamedTypeParameters = New SubstitutedTypeParameterSymbol(typeParametersDefinitions.Length - 1) {} 568For i As Integer = 0 To typeParametersDefinitions.Length - 1 Step 1
Symbols\WellKnownMembers.vb (1)
173Dim builder = New ArrayBuilder(Of KeyValuePair(Of String, TypedConstant))(namedArguments.Length)
Syntax\VisualBasicWarningStateMap.vb (2)
48Dim entries = New WarningStateMapEntry(directiveList.Length) {} 58While (index < directiveList.Length)
VisualBasicCompilationOptions.vb (1)
345Dim importNames = ArrayBuilder(Of String).GetInstance(GlobalImports.Length)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (3)
301If index < method.Parameters.Length Then 306If index < prop.Parameters.Length Then 398method.ReducedFrom.Parameters.Length > 0 AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
244If member IsNot Nothing AndAlso index < member.Parameters.Length Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1090method.Parameters.Length > 0 AndAlso
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (20)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (2)
113If parameters.Length = 0 Then 122Dim parameterIndex = Math.Min(i, parameters.Length - 1)
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (2)
90For i = 0 To matches.Length - 1 107If i < matches.Length - 1 Then
src\Analyzers\VisualBasic\CodeFixes\UseObjectInitializer\VisualBasicUseObjectInitializerCodeFixProvider.vb (3)
93For i = 0 To matches.Length - 1 97If i < matches.Length - 1 Then 109If i < matches.Length - 1 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\AttributeGenerator.vb (2)
45If attribute.ConstructorArguments.Length = 0 AndAlso attribute.NamedArguments.Length = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
216If namedType.Interfaces.Length = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
101If [property].Parameters.IsDefault OrElse [property].Parameters.Length = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\TypeParameterGenerator.vb (1)
11Return If(typeParameters.Length = 0,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
201If options.Context.ReuseSyntax AndAlso symbol.DeclaringSyntaxReferences.Length = 1 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
41Return enumType.GetMembers(name).Length = 1
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (3)
24If symbol.Parameters.Length = 0 Then 29If symbol.Parameters.Length = 1 Then 36delegateInvokeMethod.Parameters.Length = 1 AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
85If symbol.TypeParameters.Length = 0 Then 130If symbol.IsTupleType AndAlso symbol.TupleElements.Length >= 2 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\InitializeParameter\VisualBasicInitializeParameterService.vb (1)
24If accessor.DeclaringSyntaxReferences.Length = 0 Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (3)
src\Analyzers\VisualBasic\Tests\AddExplicitCast\AddExplicitCastTests.vb (3)
2945Assert.Equal(2, actions.Item1.Length) 3011Assert.Equal(2, actions.Item1.Length) 3200Assert.Equal(3, actions.Item1.Length)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (38)
CommandLineTests.vb (38)
1984Assert.Equal(1, parsedArgs.Errors.Length) 1989Assert.Equal(1, parsedArgs.Errors.Length) 1994Assert.Equal(0, parsedArgs.Errors.Length) 1998Assert.Equal(0, parsedArgs.Errors.Length) 2005Assert.Equal(0, parsedArgs.Errors.Length) 2009Assert.Equal(1, parsedArgs.Errors.Length) 2014Assert.Equal(1, parsedArgs.Errors.Length) 2018Assert.Equal(1, parsedArgs.Errors.Length) 2022Assert.Equal(0, parsedArgs.Errors.Length) 2026Assert.Equal(0, parsedArgs.Errors.Length) 2033Assert.Equal(0, parsedArgs.Errors.Length) 2197Assert.Equal(symbols.Length, parsedArgs.ParseOptions.PreprocessorSymbols.Length) 2539Assert.Equal(4, references.Length) 2555Assert.Equal(3, references.Length) 2568Assert.Equal(1, parsedArgs.AnalyzerReferences.Length) 2573Assert.Equal(1, parsedArgs.AnalyzerReferences.Length) 2578Assert.Equal(1, parsedArgs.AnalyzerReferences.Length) 2583Assert.Equal(2, parsedArgs.AnalyzerReferences.Length) 4960Assert.Equal(3, parsedArgs.MetadataReferences.Length) 5383Assert.Equal(1 + paths.Length, refPaths.Length) 7785Assert.Equal(2, args.AdditionalFiles.Length) 7791Assert.Equal(2, args.AdditionalFiles.Length) 7806Assert.Equal(3, args.AdditionalFiles.Length) 7813Assert.Equal(2, args.AdditionalFiles.Length) 7819Assert.Equal(2, args.AdditionalFiles.Length) 7825Assert.Equal(1, args.AdditionalFiles.Length) 7830Assert.Equal(1, args.AdditionalFiles.Length) 7835Assert.Equal(2, args.AdditionalFiles.Length) 7841Assert.Equal(1, args.AdditionalFiles.Length) 7846Assert.Equal(0, args.AdditionalFiles.Length) 7850Assert.Equal(0, args.AdditionalFiles.Length) 7861Assert.Equal(2, args.AnalyzerConfigPaths.Length) 7867Assert.Equal(2, args.AnalyzerConfigPaths.Length) 7877Assert.Equal(2, args.AnalyzerConfigPaths.Length) 7883Assert.Equal(2, args.AnalyzerConfigPaths.Length) 7889Assert.Equal(1, args.AnalyzerConfigPaths.Length) 7898Assert.Equal(0, args.AnalyzerConfigPaths.Length) 7905Assert.Equal(0, args.AnalyzerConfigPaths.Length)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (46)
Attributes\AssemblyAttributes.vb (8)
1311Assert.Equal(4, attrs.Length) 1344Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length) 1428Assert.Equal(2, attrs.Length) 1455Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length) 1600Assert.Equal(5, attrs.Length) 1636Assert.Equal(5, attrs.Length) 1644Assert.Equal(1, attrs.Length) 1653Assert.Equal(5, attrs.Length)
CodeGen\CodeGenTuples.vb (33)
15251Assert.Equal(parameters1.Length, parameters2.Length) 15252For j = 0 To parameters1.Length - 1 17201Assert.Equal(2, c1Interfaces.Length) 17202Assert.Equal(3, c1AllInterfaces.Length) 17213Assert.Equal(2, c2Interfaces.Length) 17214Assert.Equal(3, c2AllInterfaces.Length) 17225Assert.Equal(2, c3Interfaces.Length) 17226Assert.Equal(2, c3AllInterfaces.Length) 17236Assert.Equal(2, c4Interfaces.Length) 17237Assert.Equal(4, c4AllInterfaces.Length) 17301Assert.Equal(1, c1Interfaces.Length) 17302Assert.Equal(1, c1AllInterfaces.Length) 17309Assert.Equal(1, c2Interfaces.Length) 17310Assert.Equal(2, c2AllInterfaces.Length) 17317Assert.Equal(1, m2Implementations.Length) 17374Assert.Equal(1, c1Interfaces.Length) 17375Assert.Equal(1, c1AllInterfaces.Length) 17382Assert.Equal(1, c2Interfaces.Length) 17383Assert.Equal(2, c2AllInterfaces.Length) 17390Assert.Equal(0, m2Implementations.Length) 17484Assert.Equal(2, c1Interfaces.Length) 17485Assert.Equal(3, c1AllInterfaces.Length) 17496Assert.Equal(2, c2Interfaces.Length) 17497Assert.Equal(3, c2AllInterfaces.Length) 17508Assert.Equal(2, c3Interfaces.Length) 17509Assert.Equal(2, c3AllInterfaces.Length) 17519Assert.Equal(2, c4Interfaces.Length) 17520Assert.Equal(4, c4AllInterfaces.Length) 17571Assert.Equal(2, c3Interfaces.Length) 17572Assert.Equal(2, c3AllInterfaces.Length) 17623Assert.Equal(1, c3Interfaces.Length) 17624Assert.Equal(1, c3AllInterfaces.Length)
Emit\CompilationEmitTests.vb (2)
2042Assert.Equal(1, c.GlobalNamespace.GetModuleMembers("M").Length) 2043Assert.Equal(0, c.GlobalNamespace.GetModuleMembers("Z").Length)
Emit\EditAndContinue\SymbolMatcherTests.vb (1)
79Dim n As Integer = members.Length
PDB\PortablePdbTests.vb (2)
115Assert.Equal(64, checksumData.Checksum.Length) 169Assert.Equal(48, checksumData.Checksum.Length)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (14)
CompilationContext.vb (6)
111Debug.Assert(displayClassVariableNamesInOrder.Length = _displayClassVariables.Count) 206If Not argumentsOnly AndAlso allTypeParameters.Length > 0 Then 236If aliases.Length > 0 Then 291If itemsAdded.Count = 0 AndAlso _sourceMethodParametersInOrder.Length <> 0 Then 672Debug.Assert(importRecordGroups.Length = 2) ' First file-level, then project-level. 1421If arity <> desiredTypeParameters.Length Then
Symbols\EEMethodSymbol.vb (3)
202Return _typeParameters.Length 531Debug.Assert(originalLocals.Length = targetLocals.Length) 532For i = 0 To originalLocals.Length - 1
Symbols\EENamedTypeSymbol.vb (2)
121Return _typeParameters.Length 367For i = 0 To typeParameters.Length - 1
Symbols\PlaceholderLocalSymbol.vb (1)
153Debug.Assert(members.Length = 1)
Symbols\PlaceholderMethodSymbol.vb (1)
43Return _typeParameters.Length
VisualBasicInstructionDecoder.vb (1)
74Dim methodArgumentStartIndex = typeParameters.Length - methodArity
Microsoft.CodeAnalysis.VisualBasic.Features (31)
ChangeSignature\VisualBasicChangeSignatureService.vb (5)
571numSeparatorsToSkip = arguments.Count - newArguments.Length + 1 575numSeparatorsToSkip = arguments.Count - newArguments.Length 640If paramNodes.Length <> declaredParameters.Length Then 644If declaredParameters.Length = 0 Then
CodeRefactorings\SyncNamespace\VisualBasicChangeNamespaceService.vb (2)
38Dim qualifiedNamespaceName = CreateNamespaceAsQualifiedName(newNamespaceParts, newNamespaceParts.Length - 1) 49Dim memberAccessNamespaceName = CreateNamespaceAsMemberAccess(newNamespaceParts, newNamespaceParts.Length - 1)
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (1)
105If result.Length > 0 Then
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
180If memberGroup.Length > 0 Then
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
170If foreachOperation.NextVariables.Length > 1 Then
Diagnostics\Analyzers\VisualBasicSimplifyTypeNamesDiagnosticAnalyzer.vb (1)
107If method.Length = 1 Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
701Return syntaxRefs.Length > 1 OrElse
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (3)
370If method.Parameters.Length <> 1 Then 410Contract.ThrowIfTrue(variables.Length <> 1) 419Contract.ThrowIfTrue(variables.Length <> 1)
GenerateType\VisualBasicGenerateTypeService.vb (1)
358If memberGroup.Length <> 0 Then
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (2)
89Dim getAccessorDeclaration = If(getMethod.DeclaringSyntaxReferences.Length = 0, 122Dim setAccessorDeclaration = If(setMethod.DeclaringSyntaxReferences.Length = 0,
SignatureHelp\AttributeSignatureHelpProvider.vb (1)
118constructor.Parameters.Length > 0 AndAlso constructor.Parameters.Last().IsParams AndAlso namedParameters.Count = 0
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (2)
140If method.Parameters.Length <> 1 Then 150delegateInvokeMethod.Parameters.Length = 1 AndAlso
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
166Dim constraintCount = TypeParameterSpecialConstraintCount(typeParam) + constraintTypes.Length
SignatureHelp\InvocationExpressionSignatureHelpProvider.MemberGroup.vb (1)
42If accessibleMembers.Length = 0 Then
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (2)
113If parameters.Length = 0 Then 122Dim parameterIndex = Math.Min(i, parameters.Length - 1)
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (2)
90For i = 0 To matches.Length - 1 107If i < matches.Length - 1 Then
src\Analyzers\VisualBasic\CodeFixes\UseObjectInitializer\VisualBasicUseObjectInitializerCodeFixProvider.vb (3)
93For i = 0 To matches.Length - 1 97If i < matches.Length - 1 Then 109If i < matches.Length - 1 Then
UseNamedArguments\VisualBasicUseNamedArgumentsCodeRefactoringProvider.vb (1)
46Return Not parameters.LastOrDefault().IsParams OrElse parameters.Length > argumentCount
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (153)
Binding\BindingCollectionInitializerTests.vb (6)
1799Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1809Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1849Assert.Equal(2, symbolInfo.CandidateSymbols.Length) 1894Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1931Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1969Assert.Equal(0, symbolInfo.CandidateSymbols.Length)
Compilation\CompilationAPITests.vb (32)
664Assert.Equal(2, comp.GetDiagnostics().Length()) 668Assert.Equal(2, comp.GetDiagnostics(cancellationToken:=CancellationToken.None).Length()) 672Assert.Equal(0, comp.GetDiagnostics().Length()) 673Assert.Equal(0, comp.GetDeclarationDiagnostics().Length()) 685Assert.Equal(2, comp.GetDiagnostics().Length()) 688Assert.Equal(0, comp.GetDiagnostics().Length()) 695Assert.Equal(0, comp.SyntaxTrees.Length) 699Assert.Equal(1, comp.SyntaxTrees.Length) 702Assert.Equal(2, comp.SyntaxTrees.Length) 706Assert.Equal(2, comp.SyntaxTrees.Length) 710Assert.Equal(3, comp.SyntaxTrees.Length) 719Assert.Equal(3, comp.SyntaxTrees.Length) 723Assert.Equal(3, comp.SyntaxTrees.Length) 733Assert.Equal(0, compCollection.SyntaxTrees.Length) 735Assert.Equal(0, compCollection.SyntaxTrees.Length) 741Assert.Equal(0, compCollection.SyntaxTrees.Length) 743Assert.Equal(0, compCollection.SyntaxTrees.Length) 752Assert.Equal(0, compCollection.SyntaxTrees.Length) 754Assert.Equal(0, compCollection.SyntaxTrees.Length) 763Assert.Equal(0, compCollection.SyntaxTrees.Length) 765Assert.Equal(0, compCollection.SyntaxTrees.Length) 795Assert.Equal(1, comp.SyntaxTrees.Length) 808Assert.Equal(1, comp.SyntaxTrees.Length) 810Assert.Equal(2, comp.SyntaxTrees.Length) 814Assert.Equal(0, comp.SyntaxTrees.Length) 816AssertEx.Equal(Of Integer)(1, comp.SyntaxTrees.Length) 822Assert.Equal(2, comp.SyntaxTrees.Length) 828Assert.Equal(0, comp.SyntaxTrees.Length) 834Assert.Equal(1, comp.SyntaxTrees.Length) 850Assert.Equal(1, comp1.SyntaxTrees.Length) 1302Assert.Equal(0, comp.SyntaxTrees.Length) 1463Assert.Equal(0, diagnostics2.Length())
Compilation\GetImportScopesTests.vb (3)
121Assert.Equal(2, scopes.Single().Imports.Length) 274Assert.Equal(2, scopes.Single().Aliases.Length) 407Assert.Equal(2, scopes.Single().XmlNamespaces.Length)
Compilation\SemanticModelAPITests.vb (9)
1231Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1243Assert.Equal(3, symbolInfo.CandidateSymbols.Length) 1262Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1285Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1297Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1310Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1334Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1346Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 4004Assert.Equal(0, info.CandidateSymbols.Length)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (13)
1848Assert.Equal(2, tpSymbol1.Locations.Length()) 1857Assert.Equal(2, tpSymbol2.Locations.Length()) 1866Assert.Equal(2, tpSymbol3.Locations.Length()) 1875Assert.Equal(2, tpSymbol4.Locations.Length()) 1884Assert.Equal(1, tpSymbol5.Locations.Length()) 2021Assert.Equal(1, varSymbol1.Locations.Length()) 2031Assert.Equal(1, varSymbol2.Locations.Length()) 2041Assert.Equal(1, varSymbol3.Locations.Length()) 2051Assert.Equal(1, varSymbol4.Locations.Length()) 2061Assert.Equal(1, varSymbol5.Locations.Length()) 2071Assert.Equal(1, varSymbol6.Locations.Length()) 2082Assert.Equal(1, varSymbol7.Locations.Length()) 2092Assert.Equal(1, varSymbol8.Locations.Length())
Compilation\VisualBasicCompilationOptionsTests.vb (1)
370For i = 0 To diagnostics.Length - 1
DeclaringSyntaxNodeTests.vb (2)
25Assert.Equal(expectedNumber, declaringNodes.Length) 74Assert.Equal(expectedNumber, declaringNodes.Length)
Semantics\BinaryOperators.vb (2)
1043If info1.Symbol IsNot Nothing OrElse info1.CandidateSymbols.Length = 0 Then 1050Assert.Equal(0, info1.CandidateSymbols.Length)
Semantics\FieldInitializerBindingTests.vb (1)
1536Assert.Equal(numInitializers, boundInitializers.Length)
Semantics\GetExtendedSemanticInfoTests.vb (3)
9133Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 9197Assert.Equal(1, symbolInfo.CandidateSymbols.Length) 9322Assert.Equal(1, symbolInfo.CandidateSymbols.Length)
Semantics\GetSemanticInfoTests.vb (7)
3114Assert.Equal(handledEvent0.EventSymbol.ExplicitInterfaceImplementations.Length, commonEventSymbol.ExplicitInterfaceImplementations.Length) 5351Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 5366Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 5440Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 5455Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 5545Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 5559Assert.Equal(0, symbolInfo.CandidateSymbols.Length)
Semantics\MeMyBaseMyClassTests.vb (1)
552Assert.Equal(expectedCount, symbol.Length)
Semantics\NameOfTests.vb (36)
479Assert.Equal(0, group.Length) 552Assert.Equal(1, group.Length) 621Assert.Equal(2, symbolInfo.CandidateSymbols.Length) 626Assert.Equal(2, group.Length) 826Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 829Assert.Equal(0, group.Length) 890Assert.Equal(0, group.Length) 968Assert.Equal(0, group.Length) 1081Assert.Equal(0, group.Length) 1148Assert.Equal(0, group.Length) 1214Assert.Equal(1, group.Length) 1296Assert.Equal(1, group.Length) 1378Assert.Equal(0, group.Length) 1459Assert.Equal(0, group.Length) 1536Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1539Assert.Equal(0, group.Length) 1667Assert.Equal(2, symbolInfo.CandidateSymbols.Length) 1672Assert.Equal(0, group.Length) 1762Assert.Equal(0, group.Length) 1819Assert.Equal(0, group.Length) 1876Assert.Equal(0, group.Length) 1933Assert.Equal(0, group.Length) 2073Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 2076Assert.Equal(0, group.Length) 2483Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 2486Assert.Equal(0, group.Length) 2893Assert.Equal(0, group.Length) 2958Assert.Equal(0, group.Length) 3142Assert.Equal(0, group.Length) 3202Assert.Equal(0, group.Length) 3264Assert.Equal(2, symbolInfo.CandidateSymbols.Length) 3269Assert.Equal(2, group.Length) 3325Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 3328Assert.Equal(0, group.Length) 3382Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 3385Assert.Equal(0, group.Length)
Semantics\OverloadResolution.vb (6)
4326Assert.Equal(1, symbolInfo.CandidateSymbols.Length) 4336Assert.Equal(2, symbolInfo.CandidateSymbols.Length) 4347Assert.Equal(1, symbolInfo.CandidateSymbols.Length) 4435Assert.Equal(1, symbolInfo.CandidateSymbols.Length) 4445Assert.Equal(2, symbolInfo.CandidateSymbols.Length) 4456Assert.Equal(1, symbolInfo.CandidateSymbols.Length)
Semantics\QueryExpressions_SemanticModel.vb (21)
1105Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1178Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1184Assert.Equal(0, commonSymbolInfo.CandidateSymbols.Length) 1191Assert.Equal(1, symbolInfo.CandidateSymbols.Length) 1199Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1206Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1213Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1220Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1227Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 1435Assert.Equal(0, commonSymbolInfo.CandidateSymbols.Length) 1486Assert.Equal(0, commonSymbolInfo.CandidateSymbols.Length) 1498Assert.Equal(0, commonSymbolInfo.CandidateSymbols.Length) 1713Assert.Equal(0, commonSymbolInfo.CandidateSymbols.Length) 1732Assert.Equal(0, commonSymbolInfo.CandidateSymbols.Length) 3752Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 3757Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 3765Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 3770Assert.Equal(0, symbolInfo.CandidateSymbols.Length) 3823Assert.Equal(2, info.CandidateSymbols.Length) 3858Assert.Equal(0, aggrClauseSymInfo.Select1.CandidateSymbols.Length) 3860Assert.Equal(0, aggrClauseSymInfo.Select2.CandidateSymbols.Length)
Semantics\TypeOfTests.vb (3)
801Assert.Equal(a1.Length, a2.Length) 802For i As Integer = 0 To a1.Length - 1
Semantics\UnaryOperators.vb (1)
703Assert.Equal(0, info1.CandidateSymbols.Length)
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.vb (6)
671Assert.Equal(2, ctx1.Attributes.Length) 708Assert.Equal(2, ctx1.Attributes.Length) 745Assert.Equal(1, ctx1.Attributes.Length) 782Assert.Equal(1, ctx1.Attributes.Length) 819Assert.Equal(1, ctx1.Attributes.Length) 856Assert.Equal(1, ctx1.Attributes.Length)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (32)
DocumentationComments\DocCommentTests.vb (4)
4993Assert.Equal(2, actSymInfo1.CandidateSymbols.Length) 6719Assert.Equal(1, symbols.Length) 6873Assert.Equal(1, symbols.Length) 6952Assert.Equal(1, symbols.Length)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (12)
163Assert.Equal(1, members.Length) 445Assert.Equal(1, members.Length) 633Assert.Equal(0, typeInfo.Type.Interfaces.Length) 638Assert.Equal(1, typeInfo.Type.Interfaces.Length) 674Assert.Equal(1, typeInfo.Type.Interfaces.Length) 712Assert.Equal(1, typeInfo.Type.Interfaces.Length) 717Assert.Equal(0, typeInfo.Type.Interfaces.Length) 755Assert.Equal(0, typeInfo.Type.Interfaces.Length) 796Assert.Equal(0, typeInfo.Type.Interfaces.Length) 832Assert.Equal(1, typeInfo.Type.Interfaces.Length) 874Assert.Equal(0, typeInfo.Type.Interfaces.Length) 879Assert.Equal(1, typeInfo.Type.Interfaces.Length)
SymbolsTests\CompilationCreationTests.vb (2)
25Return this.Length 2216Assert.Equal(numTrees, actualSyntaxTrees.Length)
SymbolsTests\CustomModifiersTests.vb (1)
135Assert.Equal(2, modifiers.Length)
SymbolsTests\Metadata\PE\HasUnsupportedMetadata.vb (1)
558Dim n = bytes.Length
SymbolsTests\Metadata\PE\LoadingOperators.vb (5)
592For i = 0 To members.Length - 2 1188For i = 0 To members.Length - 2 1373For i = 0 To members.Length - 2 1950For i = 0 To members.Length - 2 2084For i = 0 To members.Length - 2
SymbolsTests\MetadataFileReferenceCompilationTests.vb (3)
66Assert.Equal(2, comp.ExternalReferences.Length) 74Assert.Equal(2, comp.ExternalReferences.Length) 79Assert.Equal(2, comp.ExternalReferences.Length)
SymbolsTests\Source\BindingsTests.vb (1)
521Assert.Equal(1, symbols.Length)
UsedAssembliesTests.vb (3)
465Assert.Equal(1, used.Length) 2048Assert.Equal(1, used.Length) 2053Assert.Equal(2, used.Length)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (10)
CompilationTestUtils.vb (6)
745If diags.Length > 0 Then 765If diags.Length > 0 Then 984Dim diagnosticsAndIndices(allDiagnostics.Length - 1) As DiagnosticAndIndex 985For i = 0 To allDiagnostics.Length - 1 1207Assert.Equal(symbols.Length, descriptions.Length) 1241Assert.Equal(symbols.Length, descriptions.Length)
Extensions.vb (4)
56For i = 0 To parts.Length - 2 60Return lastContainer.GetMembers(parts(parts.Length - 1)) 67If members.Length = 0 Then 69ElseIf members.Length > 1 Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (26)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
120Debug.Assert(otherPartOfPartial.Parameters.Length > ordinal)
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
309If symbols.Length = 1 Then 922DirectCast(renamedSymbol, IMethodSymbol).Parameters.Length <> 0) Then
Serialization\VisualBasicOptionsSerializationService.vb (1)
48writer.WriteInt32(vbOptions.PreprocessorSymbols.Length)
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (1)
168If boundSymbols.Length = 1 Then
Simplification\Simplifiers\ExpressionSimplifier.vb (1)
254containingType.TypeArguments.Length <> 0 Then
Simplification\VisualBasicSimplificationService.Expander.vb (2)
82conversion.MethodSymbol.Parameters.Length > 0 Then 686If DirectCast(symbol, IMethodSymbol).TypeArguments.Length <> 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (3)
301If index < method.Parameters.Length Then 306If index < prop.Parameters.Length Then 398method.ReducedFrom.Parameters.Length > 0 AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
244If member IsNot Nothing AndAlso index < member.Parameters.Length Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1090method.Parameters.Length > 0 AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\AttributeGenerator.vb (2)
45If attribute.ConstructorArguments.Length = 0 AndAlso attribute.NamedArguments.Length = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
216If namedType.Interfaces.Length = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
101If [property].Parameters.IsDefault OrElse [property].Parameters.Length = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\TypeParameterGenerator.vb (1)
11Return If(typeParameters.Length = 0,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
201If options.Context.ReuseSyntax AndAlso symbol.DeclaringSyntaxReferences.Length = 1 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
41Return enumType.GetMembers(name).Length = 1
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (3)
24If symbol.Parameters.Length = 0 Then 29If symbol.Parameters.Length = 1 Then 36delegateInvokeMethod.Parameters.Length = 1 AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
85If symbol.TypeParameters.Length = 0 Then 130If symbol.IsTupleType AndAlso symbol.TupleElements.Length >= 2 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\InitializeParameter\VisualBasicInitializeParameterService.vb (1)
24If accessor.DeclaringSyntaxReferences.Length = 0 Then
Microsoft.CodeAnalysis.Workspaces (374)
Classification\IRemoteSemanticClassificationService.cs (1)
108var classifiedSpans = new FixedSizeArrayBuilder<ClassifiedSpan>(this.ClassificationTriples.Length / 3);
CodeActions\CodeAction.cs (1)
614Debug.Assert(nestedActions.Length > 0);
CodeActions\CodeAction_Cleanup.cs (3)
89using var _ = ArrayBuilder<(DocumentId documentId, CodeCleanupOptions options)>.GetInstance(documentIds.Length, out var documentIdsAndOptions); 127progress.AddItems(documentIdsAndOptions.Length * s_cleanupPasses.Length);
CodeActions\Operations\ApplyChangesOperation.cs (1)
119if (changedDocuments.Length == 0)
CodeCleanup\AbstractCodeCleanerService.cs (3)
446if (spans.Length > 1) 473var count = codeCleaners.Length; 551var count = codeCleaners.Length;
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (1)
48progressTracker.AddItems(fixAllContexts.Length * 2 + 1);
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
74progressTracker.AddItems(projectsToFix.Length);
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (1)
38progressTracker.AddItems(fixAllContexts.Length);
CodeFixesAndRefactorings\FixAllLogger.cs (2)
162m[TotalDiagnosticsToFix] = documentsAndDiagnosticsToFixMap.Values.Sum(v => v.Length); 172m[TotalDiagnosticsToFix] = projectsAndDiagnosticsToFixMap.Values.Sum(v => v.Length);
Diagnostics\DiagnosticAnalyzerInfoCache.cs (1)
185descriptors.Length > 0 && descriptors[0].ImmutableCustomTags().Any(static t => t == WellKnownDiagnosticTags.Telemetry);
Diagnostics\HostDiagnosticAnalyzers.cs (2)
188if (analyzers.Length == 0) 228if (analyzers.Length == 0)
Diagnostics\SkippedHostAnalyzersInfo.cs (1)
102else if (skippedIdsForAnalyzer.Length > 0)
Differencing\LongestCommonImmutableArraySubsequence.cs (4)
23=> GetEdits(oldSequence, oldSequence.Length, newSequence, newSequence.Length); 26=> ComputeDistance(oldSequence, oldSequence.Length, newSequence, newSequence.Length);
Editing\SyntaxGenerator.cs (7)
200if (method.TypeParameters.Length > 0) 232if (method.ExplicitInterfaceImplementations.Length > 0) 398if (property.ExplicitInterfaceImplementations.Length > 0) 459if (indexer.ExplicitInterfaceImplementations.Length > 0) 498if (symbol.ExplicitInterfaceImplementations.Length > 0) 862if (typeParameters.Length > 0) 884=> typeParameter.HasConstructorConstraint || typeParameter.HasReferenceTypeConstraint || typeParameter.HasValueTypeConstraint || typeParameter.ConstraintTypes.Length > 0;
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (1)
221if (symbolAndProjectIds.Length == 0 ||
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (1)
76if (current.DeclaringSyntaxReferences.Length == 0)
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (2)
225: symbol.Parameters.Length; 229: symbol.Parameters.Length;
FindSymbols\FindReferences\Finders\MethodTypeParameterSymbolReferenceFinder.cs (2)
30if (method.PartialDefinitionPart != null && ordinal < method.PartialDefinitionPart.TypeParameters.Length) 33if (method.PartialImplementationPart != null && ordinal < method.PartialImplementationPart.TypeParameters.Length)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (7)
77parameter.Ordinal < invokeMethod.Parameters.Length) 160for (int i = 0, n = methodSymbol1.Parameters.Length; i < n; i++) 195if (containingProperty.GetMethod != null && ordinal < containingProperty.GetMethod.Parameters.Length) 198if (containingProperty.SetMethod != null && ordinal < containingProperty.SetMethod.Parameters.Length) 236if (parameters != null && ordinal < parameters.Value.Length) 248if (ordinal < method.PartialDefinitionPart?.Parameters.Length) 251if (ordinal < method.PartialImplementationPart?.Parameters.Length)
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (3)
75DeclaringSyntaxReferences.Length: > 0, 79DeclaringSyntaxReferences.Length: > 0, 87if (constructor.DeclaringSyntaxReferences.Length > 0)
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
167var result = new FixedSizeArrayBuilder<(ISymbol symbol, SymbolGroup group)>(symbols.Length);
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (1)
72using var _ = ArrayBuilder<(SymbolGroup group, ISymbol symbol, ReferenceLocation location)>.GetInstance(references.Length, out var rehydrated);
FindSymbols\SymbolFinder_Helpers.cs (2)
54var namespace1Count = namespace1.ConstituentNamespaces.Length; 55var namespace2Count = namespace2.ConstituentNamespaces.Length;
FindSymbols\SymbolFinder_Hierarchy.cs (1)
126if (explicitImplementations.Length > 0)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (12)
258while (endIndex + 1 < nodes.Length && s_caseInsensitiveComparer.Equals(nodes[endIndex + 1].Name, name)) 272var max = nodes.Length - 1; 305using var _1 = ArrayBuilder<int>.GetInstance(unsortedNodes.Length, out var tmp); 306tmp.Count = unsortedNodes.Length; 316using var _2 = ArrayBuilder<int>.GetInstance(unsortedNodes.Length, out var ranking); 317ranking.Count = unsortedNodes.Length; 321using var _3 = ArrayBuilder<Node>.GetInstance(unsortedNodes.Length, out var result); 322result.Count = unsortedNodes.Length; 328for (var i = 0; i < unsortedNodes.Length; i++) 434Debug.Assert(_nodes.Length == other._nodes.Length); 436for (int i = 0, n = _nodes.Length; i < n; i++)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
455if (signature.ParameterTypes.Length > 0)
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (1)
108writer.WriteInt32(_nodes.Length);
LanguageServices\DeclaredSymbolFactoryService\ArityUtilities.cs (1)
19return (arity <= s_aritySuffixesOneToNine.Length)
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (1)
46if (symbol?.DeclaringSyntaxReferences.Length > 1)
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (6)
151while (cumulativeChangeIndex < cumulativeChanges.Length && cumulativeChanges[cumulativeChangeIndex].Span.End < change.Span.Start) 158if (cumulativeChangeIndex < cumulativeChanges.Length) 189while (cumulativeChangeIndex < cumulativeChanges.Length) 271if (changes.Length <= 1) 275using var _ = ArrayBuilder<TextChange>.GetInstance(changes.Length, out var normalizedChanges); 294if (normalizedChanges.Count == orderedChanges.Length)
Log\AggregateLogger.cs (3)
119for (var i = 0; i < _loggers.Length; i++) 133for (var i = 0; i < _loggers.Length; i++) 147for (var i = 0; i < _loggers.Length; i++)
Options\GlobalOptionService.cs (1)
146if (values.Count != optionKeys.Length)
ReassignedVariable\AbstractReassignedVariableService.cs (3)
190if (methodOrProperty.DeclaringSyntaxReferences.Length == 0) 245if (parameter.Locations.Length > 0) 268if (local.DeclaringSyntaxReferences.Length == 0)
Recommendations\AbstractRecommendationServiceRunner.cs (9)
74if (owningMethod.DeclaringSyntaxReferences.Length != 1) 142if (invocationSymbols.Length == 0) 210if (allTypeArguments.Length != 1) 219if (methods.Length != 1) 223if (parameters.Length <= ordinalInLambda) 226if (lambdaParameterCount >= 0 && parameters.Length != lambdaParameterCount) 247if (method.IsParams() && (ordinalInInvocation >= method.Parameters.Length - 1)) 261if (ordinalInInvocation < method.Parameters.Length) 403using var _ = ArrayBuilder<ISymbol>.GetInstance(containerMembers.Length, out var result);
Rename\ConflictEngine\ConflictResolver.cs (2)
371renameDeclarationLocations[symbolIndex] = new RenameDeclarationLocationReference(solution.GetDocumentId(location.SourceTree), location.SourceSpan, overriddenFromMetadata, locations.Length); 375renameDeclarationLocations[symbolIndex] = new RenameDeclarationLocationReference(GetString(symbol), locations.Length);
Rename\ConflictEngine\ConflictResolver.Session.cs (6)
558else if (!conflictAnnotation.IsRenameLocation && conflictAnnotation.IsOriginalTextLocation && conflictAnnotation.RenameDeclarationLocationReferences.Length > 1 && newReferencedSymbols.Length == 1) 563else if (newReferencedSymbols.Length != conflictAnnotation.RenameDeclarationLocationReferences.Length) 566if (newReferencedSymbols.Length != 0 && conflictAnnotation.RenameDeclarationLocationReferences.Length == 0) 581if (conflictAnnotation.RenameDeclarationLocationReferences[symbolIndex].SymbolLocationsCount != symbol.Locations.Length) 673if (newReferencedSymbols.Length >= 2) 872if (renameLocations.Length == 1)
Rename\ConflictEngine\DeclarationConflictHelpers.cs (3)
31.Where(m => !m.Equals(renamedProperty) && m.Parameters.Length == renamedProperty.Parameters.Length); 91return obj.Length;
Rename\RenameUtilities.cs (3)
177if (symbolInfo.CandidateReason == CandidateReason.OverloadResolutionFailure && symbolInfo.CandidateSymbols.Length == 1) 181symbolInfo.CandidateSymbols.Length == 1) 339if (ordinal < associatedPropertyOrEvent.Parameters.Length)
Rename\SymbolicRenameLocations.cs (1)
42Debug.Assert(locations.Distinct().Count() == locations.Length, "Locations should be unique");
Serialization\SerializerService_Reference.cs (2)
223writer.WriteInt32(modules.Length); 340writer.WriteInt32(modules.Length);
Shared\Extensions\IMethodSymbolExtensions.cs (5)
31if (method.Parameters.Length != invoke.Parameters.Length) 46for (var i = 0; i < method.Parameters.Length; i++) 64if (p1.Length != p2.Length)
Shared\Extensions\ISymbolExtensions.cs (6)
92if (attributes.Length == 0) 186if (attribute.ConstructorArguments.Length == 1) 435if (index < typeArgs.Length) 512if (left.Parameters.Length != right.Parameters.Length) 527for (var i = 0; i < left.Parameters.Length; i++)
Shared\Extensions\SemanticModelExtensions.cs (2)
142if (type != null && allSymbols.Length == 0) 156if (allSymbols.Length == 0 && syntaxFacts.IsQueryKeyword(token))
Shared\Extensions\SyntaxGeneratorExtensions.cs (1)
32baseConstructorArguments: constructor.Parameters.Length == 0
Shared\Utilities\BloomFilter.cs (1)
450|| cachedHash._hashes.Length < hashFunctionCount
Shared\Utilities\EditorBrowsableHelpers.cs (2)
43.Where(c => c.Parameters.Length == 1 && Equals(c.Parameters[0].Type, editorBrowsableStateType)); 108.Where(c => c.Parameters.Length == 1 &&
Shared\Utilities\SemanticMap.Walker.cs (1)
44=> info.Symbol == null && info.CandidateSymbols.Length == 0;
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
60_producedFilesByGenerator.AddDataPoint(GetTelemetryKey(generatorResult.Generator, getAnalyzerReference), generatorResult.GeneratedSources.Length);
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (71)
173switch (items.Length) 191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 192for (int i = 0; i < items.Length; i++) 212if (array.Length == 0) 242if (array.Length == 0) 269if (array.Length == 0) 289if (array.Length == 0) 309if (array.Length == 0) 332if (array.Length == 0) 356if (array.Length == 0) 380if (array.Length == 0) 405if (array.Length == 0) 426var builder = new TResult[array.Length]; 428for (var i = 0; i < array.Length; i++) 444var builder = new TResult[array.Length]; 446for (var i = 0; i < array.Length; i++) 456if (source.Length == 0) 461if (source.Length == 1) 487Debug.Assert(self.Length == other.Length); 488switch (self.Length) 506var builder = new TResult[self.Length]; 507for (int i = 0; i < self.Length; i++) 518Debug.Assert(self.Length == other.Length); 524var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 525for (int i = 0; i < self.Length; i++) 557int n = array.Length; 619int n = array.Length; 635int n = array.Length; 651int n = array.Length; 667int n = array.Length; 683int n = array.Length; 765var count1 = array1.Length; 766var count2 = array2.Length; 818if (array.Length < 2) 833var result = (builder.Count == array.Length) ? array : builder.ToImmutable(); 843if (!array.IsDefault && array.Length >= 2) 889var builder = new T[first.Length + second.Length + third.Length]; 912var builder = new T[first.Length + second.Length + third.Length + fourth.Length]; 940var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length]; 973var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length + sixth.Length]; 1026var builder = new T[self.Length + items.Count]; 1049switch (array.Length) 1085switch (array.Length) 1117for (int i = 0; i < items.Length; ++i) 1140for (var i = 0; i < items.Length; i++) 1225if (namedTypes.Length > 0) 1233Debug.Assert(members.Length > 0); 1248Debug.Assert(count < members.Length); 1279if (array1.Length != array2.Length) 1284for (int i = 0; i < array1.Length; i++) 1302for (var i = 1; i < array.Length; i++) 1375if (other.Length == 0) 1377return array.Length == 0; 1380switch (array.Length)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
182else if (_count + items.Length <= InlineCapacity)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
88=> HasOneItem ? 1 : _many.Length;
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
27return (number < numerals.Length) ? numerals[number] : number.ToString();
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
31if (symbol.DeclaringSyntaxReferences.Length > 1)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (6)
319switch (oldIndex == oldChanges.Length, newIndex == newChanges.Length) 326while (oldIndex < oldChanges.Length) 332while (newIndex < newChanges.Length) 343if (oldIndex < oldChanges.Length) 358if (newIndex < newChanges.Length)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
600Debug.Assert(start + length <= items.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (2)
313Debug.Assert(match.Groups.Count - 1 == _numberRangePairs.Length); 314for (var i = 0; i < _numberRangePairs.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSeparatedSyntaxNodeList.cs (2)
30var allLength = NodesAndTokens.Length; 40for (var i = 0; i < NodesAndTokens.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs (7)
51=> Diagnostics.Length > 0 ? this : WithDiagnostics([diagnostic]); 78if (LeadingTrivia.Length == 0 && VirtualChars.Length == 0 && TrailingTrivia.Length == 0) 82Math.Min(LeadingTrivia.Length == 0 ? int.MaxValue : LeadingTrivia[0].GetSpan().Start, 84TrailingTrivia.Length == 0 ? int.MaxValue : TrailingTrivia[0].GetSpan().Start)); 87Math.Max(LeadingTrivia.Length == 0 ? int.MinValue : LeadingTrivia[^1].GetSpan().End, 89TrailingTrivia.Length == 0 ? int.MinValue : TrailingTrivia[^1].GetSpan().End));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (5)
169IEventSymbol @event => @event.ExplicitInterfaceImplementations.Length > 0, 170IMethodSymbol method => method.ExplicitInterfaceImplementations.Length > 0, 171IPropertySymbol property => property.ExplicitInterfaceImplementations.Length > 0, 355.WhereAsArray(t => t.members.Length > 0); 663Parameters.Length: 1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (3)
27DeclaringSyntaxReferences.Length: > 0, 31DeclaringSyntaxReferences.Length: > 0, 44if (member is IPropertySymbol { DeclaringSyntaxReferences.Length: > 0 } property &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (6)
107var parameterCount = symbol.GetParameters().Length; 127if (bestMethod is null || Math.Abs(method.Parameters.Length - parameterCount) < Math.Abs(bestMethod.Parameters.Length - parameterCount)) 500var count = extensionUsedAsInstance ? Math.Max(0, method.Parameters.Length - 1) : method.Parameters.Length; 734Parameters.Length: 0,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (3)
44var result = new List<INamedTypeSymbol>(allInterfaces.Length + 1) 750TypeArguments.Length: 1, 758TypeArguments.Length: 1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
16writer.WriteInt32(values.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (2)
409if (block.Operations.Length == 0) 412var firstOp = block.Operations.Length == 1
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
202if (typeArguments.Length == 1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
37var lastBlockOrdinal = blocks.Length - 1; 376Debug.Assert(startAt <= tryAndCatch.NestedRegions.Length); 378for (var i = startAt; i < tryAndCatch.NestedRegions.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
306lastBlockOrdinal: lambdaOrLocalFunctionCfg.Blocks.Length - 1, operationsBuilder, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
414Contract.ThrowIfFalse(intervals.Length == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\IFileBannerFactsExtensions.cs (1)
16return node.GetLeadingTrivia().Skip(leadingBlankLines.Length).ToImmutableArray();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
162if (nodes.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
265=> index < values.Length ? values[index] : null; 277if (parameters.Length != refKinds.Count)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
389if (originalParameterTypes.IsDefault || parameters.Length != originalParameterTypes.Count) 737if (info.CandidateSymbols.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
315WriteInteger(array.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolution.cs (1)
36internal int SymbolCount => Symbol != null ? 1 : CandidateSymbols.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolution.Enumeration.cs (1)
38while (++_index < _symbolKeyResolution.CandidateSymbols.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolutionExtensions.cs (1)
16if (resolution.CandidateSymbols.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (18)
337var candidateLength = originalSymbolInfo.CandidateSymbols.Length; 338if (candidateLength > 0 && candidateLength == newSymbolInfo.CandidateSymbols.Length) 481methodSymbol.Parameters.Length == newMethodSymbol.Parameters.Length && 786if (originalLocalVariables.Length != newLocalVariables.Length) 789for (int i = 0, n = originalLocalVariables.Length; i < n; i++) 1085Debug.Assert(signature1Parameters.Length == signature2Parameters.Length); 1086Debug.Assert(specifiedArguments.Length <= signature1Parameters.Length || 1087(signature1Parameters.Length > 0 && !signature1Parameters.Last().IsParams)); 1089if (signature1Parameters.Length != signature2Parameters.Length) 1095if (signature1Parameters.Length == 0) 1115for (var i = 0; i < specifiedArguments.Length; i++) 1145if (i < signature1Parameters.Length) 1160for (var i = 0; i < signature1Parameters.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
70if (_nodes.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EventMap.cs (1)
153get { return _registries != null && _registries.Length > 0; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (3)
52Contract.ThrowIfTrue(_index + values.Length > _values.Length); 53Array.Copy(ImmutableCollectionsMarshal.AsArray(values)!, 0, _values, _index, values.Length); 54_index += values.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (2)
61var tasks = new Task[streams.Length]; 62for (var i = 0; i < streams.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
217if (collection.Length == 1 && EqualityComparer<TValue>.Default.Equals(collection[0], value))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (5)
54property1.Parameters.Length != property2.Parameters.Length || 224for (var i = 0; i < method1.TypeParameters.Length; i++) 246if (typeParameter1.ConstraintTypes.Length != typeParameter2.ConstraintTypes.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (17)
78if (x.Length != y.Length) 83for (var i = 0; i < x.Length; i++) 208x.Parameters.Length != y.Parameters.Length || 273return x.Locations.Length == 1 && y.Locations.Length == 1 && 425if (xElements.Length != yElements.Length) 431for (var i = 0; i < xElements.Length; i++) 448for (var i = 0; i < xElements.Length; i++) 469var count = xParameters.Length; 470if (yParameters.Length != count) 494var count = xTypeArguments.Length; 495if (yTypeArguments.Length != count) 601x.Parameters.Length == y.Parameters.Length &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
123Hash.Combine(x.Parameters.Length, 244Hash.Combine(x.Parameters.Length,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208if (parameters.Length != expectedParameterCount)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
77public override int Arity => this.TypeParameters.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
72public override int Arity => this.TypeParameters.Length;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
243if (importsToAdd.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
172return errors.Length > 0; 194if (errors.Length > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
57for (var i = 0; i < method.TypeParameters.Length; i++) 111for (var i = 0; i < typeParameters.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
16for (var i = 0; i < parameterNames.Length; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (2)
75if (types.Length == 0) 105if (types.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (5)
207if (property.Parameters.Length > 0) 220if (conflictingProperty is { GetMethod: not null, Parameters.Length: 0 } && 221property is { GetMethod: not null, Parameters.Length: 0 }) 246if (property.Parameters.Length > 0) 261if (conflictingProperty is { SetMethod.Parameters.Length: 1 } &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
447method.Parameters.Length == 1 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
45if (memberReferences.Length <= 8) 90if (components.Length == 0) 109if (components.Length == 1 && !useInt64) 209method.Parameters.Length == 0 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (4)
31for (var i = parameterIndex + 1; i < method.Parameters.Length; i++) 97for (int i = 0, n = targetTuple.Elements.Length; i < n; i++) 129targetTupleTemp.Elements.Length == valueTupleTemp.Elements.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (3)
133.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnType: var returnType, Parameters.Length: 0 } && 149.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnsVoid: true, Parameters.Length: 0 }) is IMethodSymbol disposeMethodFromPattern) 165return (disposableType, disposableType?.GetMembers().OfType<IMethodSymbol>().FirstOrDefault(m => m.Parameters.Length == 0 && m.Name == methodName));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (4)
46using var isFixedDisposer = ArrayBuilder<bool>.GetInstance(names.Length, fillWithValue: false, out var isFixed); 48var result = ArrayBuilder<string>.GetInstance(names.Length); 66using var _1 = ArrayBuilder<bool>.GetInstance(names.Length, out var isFixedBuilder); 67using var _2 = ArrayBuilder<string>.GetInstance(names.Length, out var result);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
55get { return _services.Length > 0; }
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (3)
324statement.BindInt64Parameter(parameterIndex: _primaryKeyColumns.Length, dataNameId); 373statement.BindBlobParameter(parameterIndex: _primaryKeyColumns.Length + 1, checksumBytes); 374statement.BindBlobParameter(parameterIndex: _primaryKeyColumns.Length + 2, dataBytes);
Workspace\Host\DocumentService\AbstractSpanMappingService.cs (3)
33Contract.ThrowIfFalse(mappedSpanResults.Length == textChanges.Length); 36for (var i = 0; i < mappedSpanResults.Length; i++)
Workspace\ProjectSystem\IFileChangeWatcher.cs (1)
64if (watchedDirectory.ExtensionFilters.Length == 0 || watchedDirectory.ExtensionFilters.Any(filter => filePath.EndsWith(filter, stringComparison)))
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
503if (_documentPathsToDocumentIds.Count != filePaths.Length)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
792if (distinctRemainingProjects.Length == 1)
Workspace\Solution\ChecksumsAndIds.cs (5)
23Contract.ThrowIfTrue(ids.Length != checksums.Children.Length); 29public int Length => Ids.Length; 75Contract.ThrowIfTrue(ids.Length != attributeChecksums.Children.Length); 76Contract.ThrowIfTrue(ids.Length != textChecksums.Children.Length); 85public int Length => Ids.Length;
Workspace\Solution\Document.cs (2)
467if (textChanges.Length > 1 || (textChanges.Length == 1 && textChanges[0].Span != new TextSpan(0, oldText.Length)))
Workspace\Solution\ProjectState.cs (5)
991Contract.ThrowIfFalse(oldDocuments.Length == newDocuments.Length); 1017Contract.ThrowIfFalse(oldDocuments.Length == newDocuments.Length); 1103for (var i = 1; i < newDocuments.Length; i++)
Workspace\Solution\SolutionCompilationState.cs (3)
1299skipEmptyCallback: projectIdsToUnfreeze.Length == 0); 1328using var _ = ArrayBuilder<SourceGeneratedDocumentState>.GetInstance(documents.Length, out var documentStates); 1594using var _ = ArrayBuilder<DocumentState>.GetInstance(allDocumentIds.Length, out var documentStates);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
784using var _ = ArrayBuilder<SyntaxTree>.GetInstance(documentsWithTrees.Length, out var alreadyParsedTrees); 873using var _ = ArrayBuilder<Diagnostic>.GetInstance(capacity: driverRunResult.Diagnostics.Length, out var builder);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
285runResult.Results.Sum(r => r.GeneratedSources.IsDefaultOrEmpty ? 0 : r.GeneratedSources.Length); 418Contract.ThrowIfFalse(additionalTexts.Length == projectState.AdditionalDocumentStates.Count);
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (3)
75compilation.ExternalReferences.Length + compilation.DirectiveReferences.Length, out var secondarySymbols); 132while (index < secondarySymbols.Length && secondarySymbols[index].hashCode == symbolHash)
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (2)
33for (var i = 0; i < _newStates.Length; i++) 102for (var i = 0; i < _newStates.Length; i++)
Workspace\Solution\TextDocumentStates.cs (1)
159if (ids.Length == _ids.Count)
Workspace\Workspace.cs (3)
1303if (linkedDocumentIds.Length > 0) 1573progressTracker.AddItems(projectChangesList.Length); 1751if (!CanApplyChange(ApplyChangesKind.ChangeDocument) && changedDocumentIds.Length > 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
203var results = ImmutableArray.CreateBuilder<ProjectFileInfo>(projectFileInfos.Length);
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (2)
70for (var index = 0; index < metadataReferences.Length; index++) 167for (var index = 0; index < _metadataReferences.Length; index++)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (80)
MSBuild\ProjectFile\ProjectFile.cs (1)
228if (commandLineArgs.Length == 0)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (71)
173switch (items.Length) 191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 192for (int i = 0; i < items.Length; i++) 212if (array.Length == 0) 242if (array.Length == 0) 269if (array.Length == 0) 289if (array.Length == 0) 309if (array.Length == 0) 332if (array.Length == 0) 356if (array.Length == 0) 380if (array.Length == 0) 405if (array.Length == 0) 426var builder = new TResult[array.Length]; 428for (var i = 0; i < array.Length; i++) 444var builder = new TResult[array.Length]; 446for (var i = 0; i < array.Length; i++) 456if (source.Length == 0) 461if (source.Length == 1) 487Debug.Assert(self.Length == other.Length); 488switch (self.Length) 506var builder = new TResult[self.Length]; 507for (int i = 0; i < self.Length; i++) 518Debug.Assert(self.Length == other.Length); 524var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 525for (int i = 0; i < self.Length; i++) 557int n = array.Length; 619int n = array.Length; 635int n = array.Length; 651int n = array.Length; 667int n = array.Length; 683int n = array.Length; 765var count1 = array1.Length; 766var count2 = array2.Length; 818if (array.Length < 2) 833var result = (builder.Count == array.Length) ? array : builder.ToImmutable(); 843if (!array.IsDefault && array.Length >= 2) 889var builder = new T[first.Length + second.Length + third.Length]; 912var builder = new T[first.Length + second.Length + third.Length + fourth.Length]; 940var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length]; 973var builder = new T[first.Length + second.Length + third.Length + fourth.Length + fifth.Length + sixth.Length]; 1026var builder = new T[self.Length + items.Count]; 1049switch (array.Length) 1085switch (array.Length) 1117for (int i = 0; i < items.Length; ++i) 1140for (var i = 0; i < items.Length; i++) 1225if (namedTypes.Length > 0) 1233Debug.Assert(members.Length > 0); 1248Debug.Assert(count < members.Length); 1279if (array1.Length != array2.Length) 1284for (int i = 0; i < array1.Length; i++) 1302for (var i = 1; i < array.Length; i++) 1375if (other.Length == 0) 1377return array.Length == 0; 1380switch (array.Length)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
182else if (_count + items.Length <= InlineCapacity)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
88=> HasOneItem ? 1 : _many.Length;
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
27return (number < numerals.Length) ? numerals[number] : number.ToString();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
600Debug.Assert(start + length <= items.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (3)
52Contract.ThrowIfTrue(_index + values.Length > _values.Length); 53Array.Copy(ImmutableCollectionsMarshal.AsArray(values)!, 0, _values, _index, values.Length); 54_index += values.Length;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (10)
VisualStudioMSBuildWorkspaceTests.cs (10)
1476await AssertCSParseOptionsAsync(0, options => options.Errors.Length); 1483await AssertCSParseOptionsAsync(0, options => options.Errors.Length); 1490await AssertCSParseOptionsAsync(0, options => options.Errors.Length); 1497await AssertCSParseOptionsAsync(0, options => options.Errors.Length); 1504await AssertCSParseOptionsAsync(0, options => options.Errors.Length); 1666await AssertVBParseOptionsAsync(0, options => options.Errors.Length); 1673await AssertVBParseOptionsAsync(0, options => options.Errors.Length); 1680await AssertVBParseOptionsAsync(0, options => options.Errors.Length); 1687await AssertVBParseOptionsAsync(0, options => options.Errors.Length); 1694await AssertVBParseOptionsAsync(0, options => options.Errors.Length);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Formatting\FormattingTestBase.cs (2)
107var outputBuilder = ImmutableArray.CreateBuilder<TextSpan>(inputSpans.Length); 108for (var i = 0; i < inputSpans.Length; i++)
Microsoft.CodeAnalysis.Workspaces.UnitTests (19)
SolutionTests\SolutionTests.cs (4)
2995Assert.Equal(1, actualAnalyzers.Length); 4037Assert.Equal(2, project2.GetCompilationAsync().Result.ExternalReferences.Length); 5549Assert.Equal(2, solution.GetDocumentIdsWithFilePath(FilePath).Length); 5570Assert.Equal(2, solution.GetDocumentIdsWithFilePath($"{prefix}.{extension}").Length);
UtilityTest\BKTreeTests.cs (3)
63Assert.NotEqual(testValues.Length, items.Length); 76Assert.NotEqual(testValues.Length, items.Length); 90Assert.NotEqual(testValues.Length, items.Length);
UtilityTest\DocumentationCommentIdTests.cs (9)
156CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.#ctor", compilation, s => s.MethodKind == MethodKind.Constructor && s.Parameters.Length == 0); 157CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.#ctor(System.String)", compilation, s => s.MethodKind == MethodKind.Constructor && s.Parameters.Length == 1); 218CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.M0", compilation, s => s.Name == "M0" && s.Parameters.Length == 0); 248CheckDeclarationIdExact<IPropertySymbol>("P:Acme.Widget.Item(System.Int32)", compilation, p => p.Parameters.Length == 1); 249CheckDeclarationIdExact<IPropertySymbol>("P:Acme.Widget.Item(System.String,System.Int32)", compilation, p => p.Parameters.Length == 2); 281CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_UnaryPlus(Acme.Widget)", compilation, m => m.MethodKind == MethodKind.UserDefinedOperator && m.Parameters.Length == 1); 297CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Addition(Acme.Widget,Acme.Widget)", compilation, m => m.MethodKind == MethodKind.UserDefinedOperator && m.Parameters.Length == 2); 314CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Explicit(Acme.Widget)~System.Int32", compilation, m => m.MethodKind == MethodKind.Conversion && m.Parameters.Length == 1 && m.ReturnType.Name == "Int32"); 315CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Implicit(Acme.Widget)~System.Int64", compilation, m => m.MethodKind == MethodKind.Conversion && m.Parameters.Length == 1 && m.ReturnType.Name == "Int64");
UtilityTest\DocumentationCommentTests.cs (3)
223Assert.Equal(2, comment.GetExceptionTexts("A").Length); 226Assert.Equal(2, comment.GetExceptionTexts("B").Length); 236Assert.Equal(0, comment.GetExceptionTexts("A").Length);
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
MethodHandlerDetails.cs (1)
34var builder = ImmutableArray.CreateBuilder<MethodHandlerDetails>(initialCapacity: allHandlerDetails.Length);
Microsoft.Data.Analysis.Tests (4)
DataFrameIDataViewTests.cs (4)
30Assert.Equal(10, preview.RowView.Length); 31Assert.Equal(17, preview.ColumnView.Length); 136Assert.Equal(length, preview.RowView.Length); 137Assert.Equal(17, preview.ColumnView.Length);
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\AppContextDefaultsAnalyzer.cs (1)
144if (methodSym.Parameters.Length != 2)
Analyzers\ResourceUsageAnalyzer.cs (1)
48memberSymbol.Parameters.Length == 1)
Microsoft.DotNet.SignTool (6)
src\ByteSequenceComparer.cs (3)
25if (x.IsDefault || y.IsDefault || x.Length != y.Length) 30for (var i = 0; i < x.Length; i++)
src\Configuration.cs (1)
674return (value.FixedArguments.Length == 1) ? value.FixedArguments[0].Value as string : null;
src\FileSignInfo.cs (1)
114Debug.Assert(!pathWithHash.ContentHash.IsDefault && pathWithHash.ContentHash.Length == 256 / 8);
src\Hash.cs (1)
211for (int i = 0; i < data.Length; i++)
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Parser.cs (3)
122if (boundAttributes.Length == 0) 149switch (items.Length) 340if (paramSymbol.DeclaringSyntaxReferences.Length > 0)
Microsoft.Extensions.Options.SourceGeneration (17)
Emitter.cs (1)
93if (members.Length == 1 && members[0] is IMethodSymbol tryValidateValueMethod)
Generator.cs (1)
35if (types.Length == 0)
Parser.cs (15)
203.Any(m => m.Parameters.Length == NumValidationMethodArgs 366if (attribute.ConstructorArguments.Length == 1) 429if (attribute.ConstructorArguments.Length == 1) 436if (enumerationValidatorType.Constructors.Where(c => c.Parameters.Length == 0).Any()) 502bool lastParameterDeclaredWithParamsKeyword = parameters.Length > 0 && parameters[parameters.Length - 1].IsParams; 506for (int i = 0; i < arguments.Length; i++) 511bool isParams = lastParameterDeclaredWithParamsKeyword && i == arguments.Length - 1; 524bool isParams = lastParameterDeclaredWithParamsKeyword && namedArgument.Key == parameters[parameters.Length - 1].Name; 622if (constructorParameters.Length == 1 && constructorParameters[0].Name == "otherProperty" && constructorParameters[0].Type.SpecialType == SpecialType.System_String) 642if (constructorParameters.Length == 2) 649else if (constructorParameters.Length == 3) 652for (int i = 0; i < constructorParameters.Length; i++) 786for (int i = 0; i < value.Length; i++) 790if (i < value.Length - 1)
Microsoft.Gen.Logging (6)
Parsing\Parser.TagProvider.cs (3)
130if (method.Parameters.Length == 2) 135if (method.Parameters.Length < 2) 140for (int i = 2; i < method.Parameters.Length; i++)
Parsing\TypeSymbolExtensions.cs (3)
27&& ts.Parameters.Length == 1 50&& ts.Parameters.Length == 2 82if (current.GetMembers("ToString").Where(m => m.Kind == SymbolKind.Method && m.DeclaredAccessibility == Accessibility.Public).Cast<IMethodSymbol>().Any(m => m.Parameters.Length == 0))
Microsoft.Gen.Metrics.Unit.Tests (1)
EmitterTests.cs (1)
43Assert.Equal(2, r.Length);
Microsoft.Interop.ComInterfaceGenerator (20)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
60if (type.DeclaringSyntaxReferences.Length > 1)
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
36if (customAttributes.Length == 0)
ComClassGenerator.cs (3)
114Literal(implementedInterfaces.Length))))))), 119for (int i = 0; i < implementedInterfaces.Length; i++) 175Literal(implementedInterfaces.Length)))),
ComInterfaceContext.cs (1)
33var accumulator = ImmutableArray.CreateBuilder<DiagnosticOr<ComInterfaceContext>>(data.Length);
ComInterfaceGenerator.cs (3)
292for (int i = 0; i < returnSwappedSignatureElements.Length; ++i) 316NativeIndex = symbol.Parameters.Length 438while (methodIndex < methods.Length && methods[methodIndex].OwningInterface == iface)
ComInterfaceInfo.cs (1)
341&& guidAttr.ConstructorArguments.Length == 1
ComMethodContext.cs (1)
203startingIndex += baseMethods.Length;
ComMethodInfo.cs (1)
145var attributeInfos = ImmutableArray.CreateBuilder<AttributeInfo>(attributes.Length);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
62if (diagnostics.Length != 0)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (2)
14if (operation.TargetMethod.Parameters.Length <= ordinal) 30if (operation.Constructor.Parameters.Length <= ordinal)
UnmanagedToManagedStubGenerator.cs (1)
86if (finallyStatements.Length > 0)
VirtualMethodPointerStubGenerator.cs (3)
154if (methodStub.CallingConvention.Array.Length != 0) 181var elements = ImmutableArray.CreateBuilder<TypePositionInfo>(originalElements.Length + 2); 203var elements = ImmutableArray.CreateBuilder<TypePositionInfo>(originalElements.Length + 2);
VtableIndexStubGenerator.cs (1)
140if (attrData.ConstructorArguments.Length == 0 || attrData.ConstructorArguments[0].Value is not int)
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSImportCodeGenerator.cs (1)
175LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(2 + _marshallers.NativeParameterMarshallers.Length)))))))))))));
JSImportGenerator.cs (2)
138if (attrData.ConstructorArguments.Length == 1) 142if (attrData.ConstructorArguments.Length == 2)
JSManagedTypeInfo.cs (3)
120case INamedTypeSymbol { TypeArguments.Length: 1 } taskType when fullTypeName.StartsWith(Constants.TaskGlobal, StringComparison.Ordinal): 128case INamedTypeSymbol { TypeArguments.Length: 1 } spanType when fullTypeName.StartsWith(Constants.SpanGlobal, StringComparison.Ordinal): 136case INamedTypeSymbol { TypeArguments.Length: 1 } arraySegmentType when fullTypeName.StartsWith(Constants.ArraySegmentGlobal, StringComparison.Ordinal):
Microsoft.Interop.LibraryImportGenerator (12)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (4)
956ITypeSymbol expectedUnmanagedCollectionElementType = typeArguments[typeArguments.Length - 1]; 1134if (fromUnmanagedCandidates.Length == 0) 1146if (fromUnmanagedCandidates.Length > 1) 1244ITypeSymbol expectedUnmanagedCollectionElementType = typeArguments[typeArguments.Length - 1];
Analyzers\CustomMarshallerAttributeFixer.cs (4)
311returnType: gen.TypeExpression(spanOfT.Construct(typeParameters[typeParameters.Length - 1])), 327returnType: gen.TypeExpression(readOnlySpanOfT.Construct(typeParameters[typeParameters.Length - 1])), 481returnType: gen.TypeExpression(spanOfT.Construct(typeParameters[typeParameters.Length - 1])), 495returnType: gen.TypeExpression(readOnlySpanOfT.Construct(typeParameters[typeParameters.Length - 1])),
LibraryImportGenerator.cs (1)
195if (attrData.ConstructorArguments.Length == 0)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
62if (diagnostics.Length != 0)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (2)
14if (operation.TargetMethod.Parameters.Length <= ordinal) 30if (operation.Constructor.Parameters.Length <= ordinal)
Microsoft.Interop.LibraryImportGenerator.Downlevel (3)
DownlevelLibraryImportGenerator.cs (1)
137if (attrData.ConstructorArguments.Length == 0)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (2)
14if (operation.TargetMethod.Parameters.Length <= ordinal) 30if (operation.Constructor.Parameters.Length <= ordinal)
Microsoft.Interop.SourceGeneration (53)
IncrementalValuesProviderExtensions.cs (4)
19if (data.Left.Length != data.Right.Length) 23ImmutableArray<(T, U)>.Builder builder = ImmutableArray.CreateBuilder<(T, U)>(data.Left.Length); 24for (int i = 0; i < data.Left.Length; i++)
ManualTypeMarshallingHelper.cs (2)
175if (attr.ConstructorArguments.Length != 3) 177Debug.WriteLine($"{attr} has {attr.ConstructorArguments.Length} constructor arguments - expected 3");
MarshallerShape.cs (31)
209.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: true }); 219.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1 } and 228if (!SymbolEqualityComparer.Default.Equals(spanOfT, namedType.ConstructedFrom) || namedType.TypeArguments.Length != 1) 239for (int i = 0; i < currentType.TypeParameters.Length; i++) 262.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false } 274.Where(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 293.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false } 302.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false } 314.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 325.Where(m => m is { IsStatic: true, Parameters.Length: 3, ReturnsVoid: false } 346.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 356.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 366.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 376.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 386.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 396.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 565.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: true } 576.Where(m => m is { IsStatic: false, Parameters.Length: 2, ReturnsVoid: true } 594.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnsByRef: false, ReturnsByRefReadonly: false } 602.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnsByRef: false, ReturnsByRefReadonly: false } 610.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnsByRef: false, ReturnsByRefReadonly: false }); 617.Where(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: true }) 629if (candidates.Length != 1) 656.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: true }); 663.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: true }); 670.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1 } and 679.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0 } and 690.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 699.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 708.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 718.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType }
Marshalling\GeneratorDiagnostic.cs (1)
57DiagnosticProperties.Add(WellKnownDiagnosticTags.Unnecessary, $"[{string.Join(",", Enumerable.Range(0, UnnecessaryDataLocations.Length))}]"),
MarshalUsingAttributeParser.cs (1)
37if (attributeData.ConstructorArguments.Length == 0)
MethodSignatureElementInfoProvider.cs (3)
27public string FindNameForParamIndex(int paramIndex) => paramIndex >= _method.Parameters.Length ? string.Empty : _method.Parameters[paramIndex].Name; 42for (int i = 0; i < _method.Parameters.Length; i++) 62if (paramIndex >= _method.Parameters.Length)
SafeHandleMarshallingInfoProvider.cs (2)
44if (type is INamedTypeSymbol named && !named.IsAbstract && named.InstanceConstructors.Length > 0) 48if (ctor.Parameters.Length == 0)
SequenceEqualImmutableArray.cs (1)
32public int Length => Array.Length;
SignatureContext.cs (1)
109for (int i = 0; i < method.Parameters.Length; i++)
SyntaxExtensions.cs (1)
54int i = fixedStatements.Length - 1;
TypeSymbolExtensions.cs (6)
141return attr.ConstructorArguments.Length == 1 && (LayoutKind)(int)attr.ConstructorArguments[0].Value! == LayoutKind.Auto; 253if (currentType.TypeParameters.Length > 0) 274int numArgumentsToInsert = currentType.TypeParameters.Length; 278int numArgumentsToCopy = Math.Min(numArgumentsToInsert, typeArgumentsToSubstitute.Length - currentArityOffset); 291currentType.TypeParameters.CastArray<ITypeSymbol>().CopyTo(currentType.TypeParameters.Length - numArgumentsToPropogate, arguments, numArgumentsToCopy, numArgumentsToPropogate); 300extraTypeArgumentsInTemplate = typeArgumentsToSubstitute.Length - currentArityOffset;
Microsoft.Maui.Controls.BindingSourceGen (4)
BindingSourceGenerator.cs (1)
182 if (parameters.Length == 0 || parameters[0].Type is IErrorTypeSymbol)
InvocationParser.cs (2)
73 || methodSymbol.TypeParameters.Length != 2 74 || methodSymbol.Parameters.Length != 9
ISymbolExtensions.cs (1)
58 return (attribute.ConstructorArguments.Length > 0 ? attribute.ConstructorArguments[0].Value as string : null) ?? defaultName;
Microsoft.Maui.Controls.SourceGen (3)
CodeBehindGenerator.cs (3)
218 if (attr.NamedArguments.Length == 1 && attr.NamedArguments[0].Key == nameof(XmlnsDefinitionAttribute.AssemblyName)) 780 if (x.ExternalReferences.Length != y.ExternalReferences.Length)
Microsoft.ML.Data (21)
DataDebuggerPreview.cs (1)
66=> $"{Schema.Count} columns, {RowView.Length} rows";
DataLoadSave\Binary\Codecs.cs (1)
806int count = _type.Dimensions.Length;
Prediction\Calibrator.cs (9)
1984_host.Assert(values.Length == 0 || (0 <= values[0] && values[values.Length - 1] <= 1)); 2064_host.Assert(Mins.Length == Maxes.Length); 2065_host.Assert(Mins.Length == Values.Length); 2066ctx.Writer.Write(Mins.Length); 2069for (int i = 0; i < Mins.Length; i++) 2098int p = Mins.Length;
Transforms\Normalizer.cs (10)
496public int Count => _infos.Length; 518string errMsg = "Not valid. Valid range is from 0 (inclusive) to " + Columns.Length + " (exclusive) but got " + index + "."; 519Contracts.CheckUserArg(index >= 0 && index < Columns.Length, nameof(index), errMsg); 693for (int iinfo = 0; iinfo < Columns.Length; iinfo++) 735var result = new DataViewSchema.DetachedColumn[_parent.Columns.Length]; 736for (int i = 0; i < _parent.Columns.Length; i++) 766for (int iinfo = 0; iinfo < _parent.Columns.Length; ++iinfo) 791for (int iinfo = 0; iinfo < _parent.Columns.Length; ++iinfo) 816Contracts.Assert(0 <= iinfo && iinfo < _parent.Columns.Length); 826Contracts.Assert(0 <= iinfo && iinfo < _parent.Columns.Length);
Microsoft.ML.DataView (8)
VectorType.cs (8)
80Contracts.CheckParam(dimensions.Length > 0, nameof(dimensions)); 97for (int i = 0; i < dims.Length; ++i) 131if (Dimensions.Length != tmp.Dimensions.Length) 133for (int i = 0; i < Dimensions.Length; i++) 149hash = Hashing.CombineHash(hash, Dimensions.Length); 150for (int i = 0; i < Dimensions.Length; i++) 160if (Dimensions.Length == 1)
Microsoft.ML.ImageAnalytics (1)
ImagePixelExtractor.cs (1)
310Contracts.Assert(dims.Length == 3);
Microsoft.ML.IntegrationTests (1)
Explainability.cs (1)
75Assert.Equal(HousingRegression.Features.Length, permutationMetrics.Length);
Microsoft.ML.InternalCodeAnalyzer (3)
ContractsCheckAnalyzer.cs (3)
107ArgumentSyntax[] args = new ArgumentSyntax[parameters.Length]; 118for (int p = 0; p < parameters.Length; ++p) 218for (int i = 0; i < parameters.Length; ++i)
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
224if ((vectorType != null && !vectorType.IsKnownSize && vectorType.Dimensions.Length > 1)
Microsoft.ML.OnnxConverter (1)
OnnxUtils.cs (1)
374for (int i = 0; i < vec.Dimensions.Length; i++)
Microsoft.ML.Samples (10)
Dynamic\Transforms\NormalizeBinning.cs (2)
79var offset = (transformParams.Offset.Length == 0 ? 0 : transformParams 100offset = (fixZeroParams.Offset.Length == 0 ? 0 : fixZeroParams
Dynamic\Transforms\NormalizeLogMeanVariance.cs (1)
87var offset = noCdfParams.Offset.Length == 0 ? 0 : noCdfParams.Offset[1];
Dynamic\Transforms\NormalizeLogMeanVarianceFixZero.cs (1)
69var offset = noCdfParams.Offset.Length == 0 ? 0 : noCdfParams.Offset[1];
Dynamic\Transforms\NormalizeMeanVariance.cs (1)
89var offset = noCdfParams.Offset.Length == 0 ? 0 : noCdfParams.Offset[1];
Dynamic\Transforms\NormalizeMinMax.cs (1)
77Console.WriteLine(" y = (x - (" + (transformParams.Offset.Length == 0 ?
Dynamic\Transforms\NormalizeMinMaxMulticolumn.cs (1)
114Console.WriteLine(" y = (x - (" + (transformParams.Offset.Length == 0 ?
Dynamic\Transforms\NormalizeSupervisedBinning.cs (2)
99") - " + (transformParams.Offset.Length == 0 ? 0 : transformParams 121") - " + (fixZeroParams.Offset.Length == 0 ? 0 : fixZeroParams
Dynamic\WithOnFitDelegate.cs (1)
66for (int i = 0; i < binningParam.UpperBounds.Length; i++)
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
583Assert.Equal(2, type.Dimensions.Length);
Microsoft.ML.Tests (63)
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (1)
124for (int i = 0; i < binningParam.UpperBounds.Length; i++)
TextLoaderTests.cs (4)
752Assert.Equal(5, previewIris.ColumnView.Length); 773Assert.Equal(2, previewIrisStartEnd.ColumnView.Length); 795Assert.Equal(2, previewIrisColumnIndices.ColumnView.Length); 850Assert.Equal(5, previewIris.ColumnView.Length);
TrainerEstimators\CalibratorEstimators.cs (6)
107Assert.True(scoredDataPreview.ColumnView.Length == 6); 133Assert.True(calibratedData.ColumnView.Length == 7); 270Assert.True(oldCalibratedData.RowView.Length == newCalibratedData.RowView.Length); 271Assert.True(oldCalibratedData.ColumnView.Length == newCalibratedData.ColumnView.Length);
Transformers\NormalizerTests.cs (52)
146Assert.Equal(4, floatAffineDataVec.Scale.Length); 154Assert.Equal(4, doubleAffineDataVec.Scale.Length); 158Assert.True(35 == floatBinData.UpperBounds.Length); 163Assert.True(4 == floatBinDataVec.UpperBounds.Length); 164Assert.True(35 == floatBinDataVec.UpperBounds[0].Length); 165Assert.True(4 == floatBinDataVec.Density.Length); 166Assert.True(0 == floatBinDataVec.Offset.Length); 169Assert.Equal(35, doubleBinData.UpperBounds.Length); 174Assert.Equal(35, doubleBinDataVec.UpperBounds[0].Length); 175Assert.Equal(4, doubleBinDataVec.Density.Length); 184Assert.Equal(4, floatCdfMeanDataVec.Scale.Length); 192Assert.Equal(4, doubleCdfMeanDataVec.Scale.Length); 201Assert.Equal(4, floatCdfLogMeanDataVec.Mean.Length); 203Assert.Equal(4, floatCdfLogMeanDataVec.StandardDeviation.Length); 211Assert.Equal(4, doubleCdfLogMeanDataVec.Mean.Length); 213Assert.Equal(4, doubleCdfLogMeanDataVec.StandardDeviation.Length); 263Assert.Equal(4, floatAffineModelVec.Scale.Length); 271Assert.Equal(4, doubleAffineModelVector.Scale.Length); 277Assert.True(35 == floatBinModel.UpperBounds.Length); 284Assert.True(4 == floatBinModelVector.UpperBounds.Length); 285Assert.True(35 == floatBinModelVector.UpperBounds[0].Length); 287Assert.True(float.PositiveInfinity == floatBinModelVector.UpperBounds[0][floatBinModelVector.UpperBounds[0].Length - 1]); 289Assert.True(float.PositiveInfinity == floatBinModelVector.UpperBounds[3][floatBinModelVector.UpperBounds[3].Length - 1]); 290Assert.True(4 == floatBinModelVector.Density.Length); 291Assert.True(0 == floatBinModelVector.Offset.Length); 294Assert.Equal(35, doubleBinModel.UpperBounds.Length); 301Assert.Equal(35, doubleBinModelVector.UpperBounds[0].Length); 303Assert.True(double.PositiveInfinity == doubleBinModelVector.UpperBounds[0][doubleBinModelVector.UpperBounds[0].Length - 1]); 305Assert.True(double.PositiveInfinity == doubleBinModelVector.UpperBounds[3][doubleBinModelVector.UpperBounds[3].Length - 1]); 306Assert.Equal(4, doubleBinModelVector.Density.Length); 316Assert.Equal(4, floatCdfMeanModelVector.Scale.Length); 324Assert.Equal(4, doubleCdfMeanModelVector.Scale.Length); 335Assert.Equal(4, floatCdfLogMeanModelVector.Mean.Length); 339Assert.Equal(4, floatCdfLogMeanModelVector.StandardDeviation.Length); 349Assert.Equal(4, doubleCdfLogMeanModelVector.Mean.Length); 353Assert.Equal(4, doubleCdfLogMeanModelVector.StandardDeviation.Length); 358Assert.True(4 == floatBinModel.UpperBounds.Length); 365Assert.True(4 == floatBinModelVector.UpperBounds.Length); 366Assert.True(4 == floatBinModelVector.UpperBounds[0].Length); 368Assert.True(float.PositiveInfinity == floatBinModelVector.UpperBounds[0][floatBinModelVector.UpperBounds[0].Length - 1]); 370Assert.True(float.PositiveInfinity == floatBinModelVector.UpperBounds[3][floatBinModelVector.UpperBounds[3].Length - 1]); 371Assert.True(4 == floatBinModelVector.Density.Length); 372Assert.True(0 == floatBinModelVector.Offset.Length); 375Assert.Equal(4, doubleBinModel.UpperBounds.Length); 382Assert.Equal(4, doubleBinModelVector.UpperBounds[0].Length); 384Assert.True(double.PositiveInfinity == doubleBinModelVector.UpperBounds[0][doubleBinModelVector.UpperBounds[0].Length - 1]); 386Assert.True(double.PositiveInfinity == doubleBinModelVector.UpperBounds[3][doubleBinModelVector.UpperBounds[3].Length - 1]); 387Assert.Equal(4, doubleBinModelVector.Density.Length); 402Assert.Equal(4, floatAffineModelVec.Scale.Length); 418Assert.Equal(4, doubleAffineModelVector.Scale.Length); 442Assert.Equal(4, floatAffineModelVec.Scale.Length); 455Assert.Equal(4, doubleAffineModelVector.Scale.Length);
Microsoft.ML.Transforms (18)
PermutationFeatureImportanceExtensions.cs (1)
709for (int i = 0; i < permutationFeatureImportance.Length; i++)
Text\NgramHashingTransformer.cs (16)
198int[] invertHashMaxCounts = new int[_columns.Length]; 201for (int i = 0; i < _columns.Length; i++) 263ctx.Writer.Write(_columns.Length); 266TextModelHelper.SaveAll(Host, ctx, _columns.Length, _slotNames); 387_types = new VectorDataViewType[_parent._columns.Length]; 388_srcIndices = new int[_parent._columns.Length][]; 389_srcTypes = new DataViewType[_parent._columns.Length][]; 390for (int i = 0; i < _parent._columns.Length; i++) 607var result = new DataViewSchema.DetachedColumn[_parent._columns.Length]; 608for (int i = 0; i < _parent._columns.Length; i++) 650Contracts.Assert(friendlyNames.Length == parent._columns.Length); 653Contracts.Assert(invertHashMaxCounts.Length == parent._columns.Length); 656_iinfoToCollector = new InvertHashCollector<NGram>[_parent._columns.Length]; 667_srcIndices = new int[_parent._columns.Length][]; 668for (int i = 0; i < _parent._columns.Length; i++) 748Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length);
Text\NgramTransform.cs (1)
465for (int i = 0; i < _transformInfos.Length; i++)
Microsoft.ML.Vision (2)
DnnRetrainTransform.cs (2)
246var colTypeDims = new int[vecType.Dimensions.Length + 1]; 248for (int indexLocal = 0; indexLocal < vecType.Dimensions.Length; indexLocal += 1)
Microsoft.VisualStudio.LanguageServices (29)
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (2)
72pcItems = (uint)_locations.Length; 103if (index < 0 || index >= _locations.Length)
ColorSchemes\ColorSchemeApplier.RegistryItemConverter.cs (1)
79WriteDWord(bytes, (uint)category.Colors.Length);
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
60LogWorkspaceAnalyzerCount(references.Length);
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
333var totalProjectCount = project != null ? (1 + otherProjectsForMultiTfmProject.Length) : solution.ProjectIds.Count;
DocumentOutline\DocumentOutlineViewModel.cs (1)
377if (oldItems.Length > 0 && oldItems.All(static i => !i.IsExpanded))
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (2)
127while (newStart < allSymbols.Length) 178var documentSymbolItems = new FixedSizeArrayBuilder<DocumentSymbolDataViewModel>(documentSymbolData.Length);
EditorConfigSettings\Common\SettingsEntriesSnapshotBase.cs (2)
23public override int Count => _data.Length; 30if (index < 0 || index > _data.Length)
FindReferences\TableEntriesSnapshot.cs (1)
25public override int Count => _entries.Length;
InheritanceMargin\InheritanceMarginHelpers.cs (1)
136Contract.ThrowIfTrue(members.Length <= 1);
InheritanceMargin\MarginGlyph\InheritanceMarginGlyphViewModel.cs (2)
50else if (members.Length == 1) 131else if (members.Length == 1)
Library\ObjectBrowser\AbstractListItemFactory.cs (5)
174var builder = ImmutableArray.CreateBuilder<ObjectListItem>(symbols.Length); 270if (typeSymbol.Interfaces.Length > 0) 319var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>(members.Length); 551var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length); 666var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length);
Library\ObjectBrowser\ObjectList.cs (1)
459=> (uint)_items.Length;
Library\VsNavInfo\NavInfo.cs (2)
61_symbolType = _basePresentationNodes.Length > 0 101for (var i = startIndex; i < baseNodes.Length; i++)
Library\VsNavInfo\NavInfoNodeEnum.cs (1)
29for (; i < celt && _index < _nodes.Length; i++, _index++)
ProjectSystem\FileChangeWatcher.cs (1)
309if (_filters.Length > 0)
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (2)
335var modules = new FixedSizeArrayBuilder<ModuleMetadata>(1 + moduleNames.Length); 336var handles = new FixedSizeArrayBuilder<TemporaryStorageStreamHandle?>(1 + moduleNames.Length);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
276if (documentIds.IsDefaultOrEmpty || documentIds.Length == 1)
Snippets\SnippetExpansionClient.cs (1)
812if (_state._method is null && method.Parameters.Length == 0)
Venus\ContainedLanguageCodeSupport.cs (1)
383if (method.Parameters.Length != 2)
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (1)
983if (symbols.Length > 0)
ObjectBrowser\DescriptionBuilder.cs (2)
332if (typeParameterSymbol.ConstraintTypes.Length == 0 && 407var count = parameters.Length;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
DocumentOutline\DocumentOutlineTests.cs (1)
83var sortedDocumentSymbols = new FixedSizeArrayBuilder<DocumentSymbolDataViewModel>(documentSymbolData.Length);
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (1)
66ContextDiagnosticsCount = context.Diagnostics.Length;
Microsoft.VisualStudio.LanguageServices.VisualBasic (16)
CodeModel\Extenders\GenericExtender.vb (4)
45Return typeSymbol.Interfaces.Length 52Return typeSymbol.Interfaces.Length 80Return If(index >= 0 AndAlso index < typeSymbol.Interfaces.Length, 89Return If(index >= 0 AndAlso index < typeSymbol.Interfaces.Length,
CodeModel\VisualBasicCodeModelService.vb (3)
2159If typeSymbol.DeclaringSyntaxReferences.Length > 1 Then 2374If symbol.DeclaringSyntaxReferences.Length > 1 Then 3490If symbols.Length > 0 Then
ObjectBrowser\DescriptionBuilder.vb (9)
51If typeSymbol.TypeParameters.Length > 0 Then 94If typeSymbol.TypeParameters.Length > 0 Then 224If methodSymbol.TypeParameters.Length > 0 Then 280If propertySymbol.Parameters.Length > 0 Then 399Dim count = parameters.Length 444Dim count = typeParameters.Length 488Debug.Assert(typeParameter.ConstraintTypes.Length = 1) 523If typeParameter.ConstraintTypes.Length > 0 Then 538Dim result = typeParameter.ConstraintTypes.Length
PresentationCore (1)
System\Windows\Nrbf\SerializationRecordExtensions.cs (1)
130|| classInfo.TypeName.GetGenericArguments().Length != 1
Roslyn.Test.PdbUtilities (3)
Reader\MockSymUnmanagedReader.cs (2)
392numRead = source.IsDefault ? 0 : source.Length; 397Assert.Equal(source.Length, numDesired);
Reader\PdbValidation.cs (1)
638Assert.Equal(entries.Length, entryIndex);
Roslyn.VisualStudio.Next.UnitTests (7)
Remote\SerializationValidator.cs (1)
66public int Count => Children.Length;
Services\ServiceHubServicesTests.cs (6)
154Assert.Equal(1, infos.Length); 445for (var i = 0; i < values.Length; i++) 465await AssertSourceGeneratedDocumentsAreSame(localProject, remoteProject, expectedCount: sourceTexts.Length); 476Assert.Equal(localGeneratedDocs.Length, remoteGeneratedDocs.Length); 477Assert.Equal(expectedCount, localGeneratedDocs.Length);
RunTests (7)
AssemblyScheduler.cs (4)
63Logger.Log($"Scheduling {assemblies.Length} assemblies"); 273ConsoleUtil.WriteLine($"Built {workItems.Length} work items"); 299if (testFilters.Length > 0) 301logger($" - {testFilters.Length} tests: {string.Join(",", testFilters.Select(t => t.FullyQualifiedName))}");
ProcessTestExecutor.cs (1)
62if (filters.Length > 0 || !string.IsNullOrWhiteSpace(options.TestFilter))
Program.cs (2)
134if (workItems.Length == 0) 142ConsoleUtil.WriteLine($"Running tests in {workItems.Length} partitions");
SemanticSearch.BuildTask (2)
GenerateFilteredReferenceAssembliesTask.cs (1)
349=> (symbolIndex < symbols.Length && symbols[symbolIndex].MetadataToken == MetadataTokens.GetToken(handle)) ? symbols[symbolIndex++] : null;
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
250for (int i = 0; i < data.Length; i++)
System.Collections.Immutable (94)
System\Collections\Frozen\FrozenDictionary.cs (2)
283Keys is { Length: > 0 } keys ? keys : Array.Empty<TKey>(); 304Values is { Length: > 0 } values ? values : Array.Empty<TValue>();
System\Collections\Immutable\ImmutableArray.cs (5)
249Requires.Range(start >= 0 && start <= items.Length, nameof(start)); 250Requires.Range(length >= 0 && start + length <= items.Length, nameof(length)); 257if (start == 0 && length == items.Length) 281int length = items.Length; 311int itemsLength = items.Length;
System\Collections\Immutable\ImmutableArray_1.Builder.cs (5)
310this.EnsureCapacity(this.Count + items.Length); 314Array.Copy(_elements, index, _elements, index + items.Length, _count - index); 317Array.Copy(items.array!, 0, _elements, index, items.Length); 319_count += items.Length; 411this.AddRange(items, items.Length);
System\Collections\Immutable\ImmutableArray_1.cs (56)
58return self.Length; 73return self.Length; 115return self.IndexOf(item, 0, self.Length, EqualityComparer<T>.Default); 128return self.IndexOf(item, startIndex, self.Length - startIndex, equalityComparer); 140return self.IndexOf(item, startIndex, self.Length - startIndex, EqualityComparer<T>.Default); 176Requires.Range(startIndex >= 0 && startIndex < self.Length, nameof(startIndex)); 177Requires.Range(count >= 0 && startIndex + count <= self.Length, nameof(count)); 211return self.LastIndexOf(item, self.Length - 1, self.Length, EqualityComparer<T>.Default); 261Requires.Range(startIndex >= 0 && startIndex < self.Length, nameof(startIndex)); 317Requires.Range(index >= 0 && index <= self.Length, nameof(index)); 324T[] tmp = new T[self.Length + 1]; 331if (index != self.Length) 333Array.Copy(self.array!, index, tmp, index + 1, self.Length - index); 349Requires.Range(index >= 0 && index <= self.Length, nameof(index)); 363T[] tmp = new T[self.Length + count]; 369if (index != self.Length) 371Array.Copy(self.array!, index, tmp, index + count, self.Length - index); 403Requires.Range(index >= 0 && index <= self.Length, nameof(index)); 430return self.Insert(self.Length, item); 441return self.InsertRange(self.Length, items); 466T[] tmp = new T[self.Length + length]; 467Array.Copy(self.array!, tmp, self.Length); 468Array.Copy(items, 0, tmp, self.Length, length); 490T[] tmp = new T[self.Length + items.Length]; 491Array.Copy(self.array!, tmp, self.Length); 492Array.Copy(items, 0, tmp, self.Length, items.Length); 545return self.InsertRange(self.Length, items); 558Requires.Range(index >= 0 && index < self.Length, nameof(index)); 560T[] tmp = new T[self.Length]; 561Array.Copy(self.array!, tmp, self.Length); 592int index = self.IndexOf(oldValue, 0, self.Length, equalityComparer); 626int index = self.IndexOf(item, 0, self.Length, equalityComparer); 652Requires.Range(index >= 0 && index <= self.Length, nameof(index)); 653Requires.Range(length >= 0 && index <= self.Length - length, nameof(length)); 660T[] tmp = new T[self.Length - length]; 662Array.Copy(self.array!, index + length, tmp, index, self.Length - index - length); 702} while (index >= 0 && !indicesToRemove.Add(index) && index < self.Length - 1); 789return self.Sort(0, self.Length, Comparer<T>.Default); 816return self.Sort(0, self.Length, comparer); 830Requires.Range(count >= 0 && index + count <= self.Length, nameof(count)); 850var tmp = new T[self.Length]; 851Array.Copy(self.array!, tmp, self.Length); 886return self.InsertRange(self.Length, items); 897return self.InsertRange(self.Length, items); 916Requires.Range(self.Length <= destination.Length, nameof(destination)); 931Requires.Range(index >= 0 && index <= self.Length, nameof(index)); 956Requires.Range(index >= 0 && index <= self.Length, nameof(index)); 1002} while (index >= 0 && !indicesToRemove.Add(index) && index < self.Length - 1); 1299return self.Length; 1375Array.Copy(self.array!, 0, array, index, self.Length); 1489var newArray = new T[self.Length - indicesToRemove.Count]; 1503Array.Copy(self.array!, copied + removed, newArray, copied, self.Length - (copied + removed)); 1514var tmp = new T[Length + items.Length]; 1520if (index != Length) 1522Array.Copy(array!, index, tmp, index + items.Length, Length - index);
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (5)
218return self.IsDefault ? "Uninitialized" : $"Length = {self.Length}"; 230Array.Copy(self.array!, destination, self.Length); 242Array.Copy(self.array!, 0, destination, destinationIndex, self.Length); 266if (self.Length == 0) 271var builder = new Builder(self.Length);
System\Collections\Immutable\ImmutableArray_1.netcoreapp.cs (1)
20(int start, int length) = range.GetOffsetAndLength(self.Length);
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (1)
126Array.Copy(immutable.array!, 0, array, arrayIndex, immutable.Length);
System\Linq\ImmutableArrayExtensions.cs (19)
73return immutableArray.Length == 0 ? 99return immutableArray.Length > 0; 165if (immutableArray.Length != items.Length) 172for (int i = 0; i < immutableArray.Length; i++) 195int n = immutableArray.Length; 230if (immutableArray.Length != items.Length) 235for (int i = 0, n = immutableArray.Length; i < n; i++) 254if (immutableArray.Length == 0) 260for (int i = 1, n = immutableArray.Length; i < n; i++) 318if (index < 0 || index >= immutableArray.Length) 356return immutableArray.Length > 0 399return immutableArray.Length > 0 400? immutableArray[immutableArray.Length - 1] 412for (int i = immutableArray.Length - 1; i >= 0; i--) 443for (int i = immutableArray.Length - 1; i >= 0; i--) 578var result = new Dictionary<TKey, T>(immutableArray.Length, comparer); 603var result = new Dictionary<TKey, TElement>(immutableArray.Length, comparer);
System.Formats.Nrbf (1)
System\Formats\Nrbf\SerializationRecord.cs (1)
131if (genericNames.Length != genericTypes.Length)
System.Private.Windows.Core (1)
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (1)
353|| classInfo.TypeName.GetGenericArguments().Length != 1
System.Reflection.Metadata (42)
System\Reflection\Internal\MemoryBlocks\ByteArrayMemoryProvider.cs (1)
29public override int Size => _array.Length;
System\Reflection\Internal\Utilities\ImmutableMemoryStream.cs (6)
43get { return _array.Length; } 54if (value < 0 || value >= _array.Length) 69int result = Math.Min(count, _array.Length - _position); 80int result = Math.Min(buffer.Length, _array.Length - _position); 96SeekOrigin.End => checked(offset + _array.Length), 105if (target < 0 || target >= _array.Length)
System\Reflection\Metadata\BlobBuilder.cs (1)
760BlobUtilities.ValidateRange(buffer.Length, start, byteCount, nameof(byteCount));
System\Reflection\Metadata\BlobWriter.cs (1)
207BlobUtilities.ValidateRange(buffer.Length, start, byteCount, nameof(byteCount));
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (6)
369if (encodedArguments.Length > BlobWriterImpl.MaxCompressedIntegerValue) 375Builder.WriteCompressedInteger(encodedArguments.Length); 1290if (sizes.Length > rank) 1295Builder.WriteCompressedInteger(sizes.Length); 1312if (lowerBounds.Length > rank) 1317Builder.WriteCompressedInteger(lowerBounds.Length);
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (3)
278while (generation < sizes.Length && sizes[generation] == size); 285if (generation >= sizes.Length) 318if (generation >= sizes.Length)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
632writer.WriteCompressedInteger(blob.Length);
System\Reflection\Metadata\Ecma335\MetadataSizes.cs (6)
127Debug.Assert(rowCounts.Length == MetadataTokens.TableCount); 128Debug.Assert(externalRowCounts.Length == MetadataTokens.TableCount); 129Debug.Assert(heapSizes.Length == MetadataTokens.HeapCount); 406if (i < 0 || i > HeapSizes.Length) 424for (int i = 0; i < RowCounts.Length; i++) 452for (int i = 0; i < rowCounts.Length; i++)
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
76if (typeSystemRowCounts.Length != MetadataTokens.TableCount) 81for (int i = 0; i < typeSystemRowCounts.Length; i++)
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (1)
94for (int i = 0; i < rowCounts.Length; i++)
System\Reflection\Metadata\TypeName.cs (1)
205_genericArguments.Length > 0;
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.cs (1)
188if (checksum.Length == 0)
System\Reflection\PortableExecutable\PEBuilder.cs (8)
126var result = ImmutableArray.CreateBuilder<SerializedSection>(sections.Length); 127int sizeOfPeHeaders = Header.ComputeSizeOfPEHeaders(sections.Length); 198builder.WriteUInt16((ushort)sections.Length); 271var lastSection = sections[sections.Length - 1]; 275builder.WriteUInt32((uint)BitArithmetic.Align(Header.ComputeSizeOfPEHeaders(sections.Length), Header.FileAlignment)); 394for (int i = 0; i < sections.Length; i++) 408for (int i = 0; i < sections.Length; i++) 500int peHeadersSize = Header.ComputeSizeOfPEHeaders(GetSections().Length);
System\Reflection\PortableExecutable\PEHeaders.cs (2)
351for (int i = 0; i < _sectionHeaders.Length; i++) 365for (int i = 0; i < SectionHeaders.Length; i++)
System\Reflection\PortableExecutable\PEReader.cs (2)
383Debug.Assert(index >= 0 && index < PEHeaders.SectionHeaders.Length); 389Interlocked.CompareExchange(ref _lazyPESectionBlocks, new AbstractMemoryBlock[PEHeaders.SectionHeaders.Length], null);
System.Reflection.MetadataLoadContext (11)
System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs (1)
67int count = others.Length;
System\Reflection\TypeLoading\General\Ecma\EcmaSignatureTypeProviderForToString.cs (2)
41for (int i = 0; i < typeArguments.Length; i++) 62for (int i = 0; i < signature.ParameterTypes.Length; i++)
System\Reflection\TypeLoading\General\Ecma\EcmaWrappedTypeProvider.cs (1)
45for (int i = 0; i < typeArguments.Length; i++)
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodBody.cs (2)
40int count = sig.Length; 63int count = regions.Length;
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (1)
99int parameterCount = sig.ParameterTypes.Length;
System\Reflection\TypeLoading\Properties\Ecma\EcmaProperty.cs (2)
84if (sig.ParameterTypes.Length != 0) 87for (int i = 0; i < sig.ParameterTypes.Length; i++)
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (2)
38_parameterTypes = new RoType[sigParameterTypes.Length]; 39for (int i = 0; i < sigParameterTypes.Length; i++)
System.Text.Json.SourceGeneration (16)
Helpers\RoslynExtensions.cs (5)
29=> typeSymbol.Locations.Length > 0 ? typeSymbol.Locations[0] : null; 63if (namedType.TupleElements.Length < 2) 90if (typeArguments.Length > 0) 112constructorInfo = namedType.GetExplicitlyDeclaredInstanceConstructors().FirstOrDefault(ctor => ctor.DeclaredAccessibility is Accessibility.Public && ctor.Parameters.Length == 0); 117=> type.Constructors.Where(ctor => !ctor.IsStatic && !(ctor.IsImplicitlyDeclared && type.IsValueType && ctor.Parameters.Length == 0));
JsonSourceGenerator.Parser.cs (11)
291if (attributeData.ConstructorArguments.Length > 0) 293Debug.Assert(attributeData.ConstructorArguments.Length == 1 & attributeData.ConstructorArguments[0].Type?.Name is nameof(JsonSerializerDefaults)); 454Debug.Assert(attributeData.ConstructorArguments.Length == 1); 726Debug.Assert(attributeData.ConstructorArguments.Length > 0); 933propertyInfo.IsStatic || propertyInfo.Parameters.Length > 0 || 1275if (namedArgs.Length == 0) 1279else if (namedArgs.Length == 1 && 1451int paramCount = constructor?.Parameters.Length ?? 0; 1572Debug.Assert(attributeData.ConstructorArguments.Length == 1 && attributeData.ConstructorArguments[0].Value is null or ITypeSymbol); 1581!namedConverterType.Constructors.Any(c => c.Parameters.Length == 0 && IsSymbolAccessibleWithin(c, within: contextType))) 1749else if (constructor.Parameters.Length == 0)
System.Text.RegularExpressions.Generator (12)
RegexGenerator.cs (4)
365if (left.Length != right.Length) 370for (int i = 0; i < left.Length; i++) 388for (int i = 0; i < obj.Length; i++)
RegexGenerator.Parser.cs (6)
63if (boundAttributes.Length != 1) 75if (items.Length is 0 or > 4) 84if (items.Length >= 2) 87if (items.Length == 4) 94else if (items.Length == 3) 117regexMethodSymbol.Parameters.Length != 0 ||
UpgradeToGeneratedRegexAnalyzer.cs (2)
132if (operation.Arguments.Length > 2) 162for (int i = 0; i < arguments.Length; i++)
System.Windows.Forms (4)
System\Windows\Forms\Internal\TypeExtensions.cs (4)
117if (genericNames.Length != genericTypes.Length) 199if (genericNamesX.Length != genericNamesY.Length) 204for (int i = 0; i < genericNamesX.Length; i++)
System.Windows.Forms.Analyzers.CSharp (5)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (2)
36|| methodSymbol.Name != InvokeAsyncString || methodSymbol.Parameters.Length != 2) 50|| funcType.TypeArguments.Length != 1
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
69|| shouldSerializeMethod.Parameters.Length > 0)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (2)
99hasSupportedSyntaxNode: source.ProjectNamespaces.Length > 0, 100projectNamespace: source.ProjectNamespaces.Length > 0
System.Windows.Forms.Analyzers.VisualBasic (3)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (2)
42If methodSymbol Is Nothing OrElse methodSymbol.Name <> InvokeAsyncString OrElse methodSymbol.Parameters.Length <> 2 Then 60If funcType.TypeArguments.Length <> 1 OrElse funcType.ContainingNamespace.ToString() <> "System" Then
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
71shouldSerializeMethod.Parameters.Length > 0 Then