2 implementations of Rank
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
35int IArrayTypeSymbol.Rank => _underlying.Rank;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ArrayTypeSymbol.vb (1)
418Private ReadOnly Property IArrayTypeSymbol_Rank As Integer Implements IArrayTypeSymbol.Rank
77 references to Rank
ConfigurationSchemaGenerator (3)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
341if (typeSymbol.Rank > 1) 559return arrayTypeSymbol.Rank > 1 || IsUnsupportedType(arrayTypeSymbol.ElementType, recursionDepth);
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (1)
96int rank = arrayType.Rank;
Microsoft.CodeAnalysis (3)
DocumentationCommentId.cs (1)
628for (int i = 0, n = symbol.Rank; i < n; i++)
Symbols\IArrayTypeSymbol.cs (2)
34/// Specified lower bounds for dimensions, by position. The length can be less than <see cref="Rank"/>, 41/// Specified sizes for dimensions, by position. The length can be less than <see cref="Rank"/>,
Microsoft.CodeAnalysis.CodeStyle (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (1)
30return compilation.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
109return _typeGenerator.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
31return compilation.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (1)
30return compilation.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ArrayTypeSymbolKey.cs (1)
16visitor.WriteInteger(symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
26/// equal <see cref="IArrayTypeSymbol.Rank"/>.</item>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (3)
66if (array.Rank != 1) 142x.Rank == y.Rank &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
82Hash.Combine(x.Rank,
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
368if (arrayType.Rank != 1)
Microsoft.CodeAnalysis.CSharp (2)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
109if (symbol.Rank > 1) 125for (int i = 0; i < symbol.Rank - 1; i++)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
95[.. Enumerable.Repeat<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)]));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\MultiDimensionalArrayTests.cs (2)
1683Assert.Equal(1, a1.Rank); 1688Assert.Equal(1, a2.Rank);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\CompilationAPITests.cs (3)
2464Assert.Equal(1, arrayType.Rank); 2472Assert.Equal(1, arrayType.Rank); 2480Assert.Equal(1, arrayType.Rank);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
95[.. Enumerable.Repeat<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)]));
Microsoft.CodeAnalysis.Features (6)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
218if (array.Rank != 1)
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (2)
254return arrayType.Rank == 1; 505return arrayType.Rank == 1 ? arrayType.ElementType : null;
RQName\RQNodeBuilder.cs (1)
287return new RQArrayType(arrayType.Rank, elementType);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
368if (arrayType.Rank != 1)
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (1)
62if (currentArrayType.Rank != arrayExpression.CommaTokens.Length + 1)
Microsoft.CodeAnalysis.VisualBasic (3)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (2)
48If symbol.Rank > 1 Then 62While i < symbol.Rank - 1
Symbols\ArrayTypeSymbol.vb (1)
418Private ReadOnly Property IArrayTypeSymbol_Rank As Integer Implements IArrayTypeSymbol.Rank
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
50Dim arguments = Enumerable.Repeat(Of ArgumentSyntax)(SyntaxFactory.OmittedArgument(), arrayType.Rank)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
51Dim commaCount = Math.Max(0, arrayType.Rank - 1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (22)
Compilation\CompilationAPITests.vb (3)
1514Assert.Equal(1, arrayType.Rank) 1521Assert.Equal(1, arrayType.Rank) 1528Assert.Equal(1, arrayType.Rank)
Semantics\MultiDimensionalTest.vb (19)
875Assert.Equal(1, szArray.Rank) 882Assert.Equal(1, mdArray.Rank) 2139Assert.Equal(2, array.Rank) 2146Assert.Equal(2, array.Rank) 2153Assert.Equal(2, array.Rank) 2160Assert.Equal(2, array.Rank) 2167Assert.Equal(2, array.Rank) 2174Assert.Equal(2, array.Rank) 2181Assert.Equal(2, array.Rank) 2188Assert.Equal(2, array.Rank) 2195Assert.Equal(2, array.Rank) 2202Assert.Equal(2, array.Rank) 2209Assert.Equal(2, array.Rank) 2216Assert.Equal(2, array.Rank) 2223Assert.Equal(2, array.Rank) 2230Assert.Equal(2, array.Rank) 2237Assert.Equal(2, array.Rank) 2244Assert.Equal(2, array.Rank) 2251Assert.Equal(1, array.Rank)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
50Dim arguments = Enumerable.Repeat(Of ArgumentSyntax)(SyntaxFactory.OmittedArgument(), arrayType.Rank)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
51Dim commaCount = Math.Max(0, arrayType.Rank - 1)
Microsoft.CodeAnalysis.Workspaces (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (1)
30return compilation.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
109return _typeGenerator.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
31return compilation.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (1)
30return compilation.CreateArrayTypeSymbol(elementType, symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ArrayTypeSymbolKey.cs (1)
16visitor.WriteInteger(symbol.Rank);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
26/// equal <see cref="IArrayTypeSymbol.Rank"/>.</item>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (3)
66if (array.Rank != 1) 142x.Rank == y.Rank &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
82Hash.Combine(x.Rank,
Microsoft.Interop.SourceGeneration (1)
ManualTypeMarshallingHelper.cs (1)
397resultType = compilation.CreateArrayTypeSymbol(resultType, arrayType.Rank);
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphNodeIdCreation.cs (1)
251partials.Add(GraphNodeId.GetPartial(CodeQualifiedName.ArrayRank, arrayType.Rank.ToString()));
System.Text.Json.SourceGeneration (4)
Helpers\RoslynExtensions.cs (1)
56return compilation.CreateArrayTypeSymbol(elementType, arrayType.Rank);
JsonSourceGenerator.Parser.cs (3)
787Debug.Assert(arraySymbol.Rank == 1, "multi-dimensional arrays should have been handled earlier."); 1688int rank = arrayType.Rank; 1792type is IArrayTypeSymbol { Rank: > 1 };