58 references to Types
Microsoft.CodeAnalysis.CSharp (16)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2032=> node.Update(VisitToken(node.ColonToken), VisitList(node.Types));
_generated\2\Syntax.xml.Syntax.Generated.cs (8)
10520return WithBaseList(baseList.WithTypes(baseList.Types.AddRange(items))); 10687return WithBaseList(baseList.WithTypes(baseList.Types.AddRange(items))); 10853return WithBaseList(baseList.WithTypes(baseList.Types.AddRange(items))); 11028return WithBaseList(baseList.WithTypes(baseList.Types.AddRange(items))); 11168return WithBaseList(baseList.WithTypes(baseList.Types.AddRange(items))); 11548if (colonToken != this.ColonToken || types != this.Types) 11558public BaseListSyntax WithColonToken(SyntaxToken colonToken) => Update(colonToken, this.Types); 11561public BaseListSyntax AddTypes(params BaseTypeSyntax[] items) => WithTypes(this.Types.AddRange(items));
Lowering\Instrumentation\DebugInfoInjector.cs (1)
96Debug.Assert(typeDecl.BaseList?.Types.Any(t => t is PrimaryConstructorBaseTypeSyntax { ArgumentList: not null }) != true);
src\roslyn\src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
111if (typeDeclaration.BaseList?.Types.FirstOrDefault() is PrimaryConstructorBaseTypeSyntax initializer)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
51SeparatedSyntaxList<BaseTypeSyntax> inheritedTypeDecls = bases.Types;
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (2)
223foreach (var baseTypeSyntax in bases.Types) 478foreach (var baseTypeSyntax in bases.Types)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
56var types = bases.Types;
Syntax\TypeDeclarationSyntax.cs (1)
39return BaseList?.Types.FirstOrDefault() as PrimaryConstructorBaseTypeSyntax;
Microsoft.CodeAnalysis.CSharp.Analyzers (1)
MetaAnalyzers\CSharpSymbolIsBannedInAnalyzersAnalyzer.cs (1)
25protected override IEnumerable<SyntaxNode> GetTypeSyntaxNodesFromBaseType(SyntaxNode syntaxNode) => ((BaseListSyntax)syntaxNode).Types.Select(t => (SyntaxNode)t.Type);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
215else if (baseList.Types[0] == type.Parent)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
285var typeList = baseList.Types;
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
44if (node is { Parent: BaseTypeSyntax { Parent: BaseListSyntax { Types: [var firstType, ..] } baseList } })
src\roslyn\src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
43foreach (var baseType in typeDeclaration.BaseList.Types)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
389if (typeDeclaration.BaseList is { Types: [SimpleBaseTypeSyntax baseType, ..] } && 435currentTypeDeclaration.BaseList.WithTypes(currentTypeDeclaration.BaseList.Types.Insert(0, baseTypeSyntax)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (2)
83if (syntaxRef.GetSyntax(cancellationToken) is TypeDeclarationSyntax { BaseList.Types: var baseTypes }) 92return typeNode.BaseList.Types;
Microsoft.CodeAnalysis.CSharp.Features (15)
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (1)
76baseList.Types.Any(t => token == t.GetLastToken(includeSkipped: true)))
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
102var baseType = typeDeclaration.BaseList?.Types is [PrimaryConstructorBaseTypeSyntax type, ..] ? type : null;
EditAndContinue\BreakpointSpans.cs (1)
202var baseInitializer = (PrimaryConstructorBaseTypeSyntax?)typeDeclaration.BaseList?.Types.FirstOrDefault(t => t.IsKind(SyntaxKind.PrimaryConstructorBaseType));
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1652return baseList.Types.Span;
EditAndContinue\DeclarationBody\PrimaryConstructorWithExplicitInitializerDeclarationBody.cs (1)
22=> (PrimaryConstructorBaseTypeSyntax)TypeDeclaration.BaseList!.Types[0];
EditAndContinue\SyntaxUtilities.cs (1)
60=> typeDeclaration is { BaseList.Types: [PrimaryConstructorBaseTypeSyntax { }, ..] }
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (2)
432return node.WithTypes(node.Types.Replace(node.Types[0], primaryConstructorBase));
GenerateType\CSharpGenerateTypeService.cs (1)
90if (baseList.Types[0] != expression.Parent)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
285var typeList = baseList.Types;
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
44if (node is { Parent: BaseTypeSyntax { Parent: BaseListSyntax { Types: [var firstType, ..] } baseList } })
src\roslyn\src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
43foreach (var baseType in typeDeclaration.BaseList.Types)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
389if (typeDeclaration.BaseList is { Types: [SimpleBaseTypeSyntax baseType, ..] } && 435currentTypeDeclaration.BaseList.WithTypes(currentTypeDeclaration.BaseList.Types.Insert(0, baseTypeSyntax)));
src\roslyn\src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
111if (typeDeclaration.BaseList?.Types.FirstOrDefault() is PrimaryConstructorBaseTypeSyntax initializer)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (3)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CSharpEnumStorageShouldBeInt32.Fixer.cs (1)
21return (enumDecl.BaseList?.Types.FirstOrDefault() as SimpleBaseTypeSyntax)?.Type;
Microsoft.NetCore.Analyzers\Runtime\CSharpDetectPreviewFeatureAnalyzer.cs (1)
259if (typeSymbolDefinition is TypeDeclarationSyntax { BaseList.Types: var baseListTypes })
Microsoft.NetCore.Analyzers\Usage\CSharpImplementGenericMathInterfacesCorrectly.cs (1)
21FindTypeArgumentFromBaseInterfaceList(baseList.Types, theInterfaceSymbol) is { } node)
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
2808return baseList.Types.OfType<SimpleBaseTypeSyntax>().Select(bt => bt.Type).ToReadOnlyCollection(); 2822return WithBaseList(declaration, baseList.WithTypes(baseList.Types.Insert(0, SyntaxFactory.SimpleBaseType((TypeSyntax)baseType)))); 2836return WithBaseList(declaration, baseList.WithTypes(baseList.Types.Insert(baseList.Types.Count, SyntaxFactory.SimpleBaseType((TypeSyntax)interfaceType)))); 3174if (declaration.Parent is BaseListSyntax baseList && baseList.Types.Count == 1)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
49var builder = ArrayBuilder<string>.GetInstance(baseList.Types.Count); 74foreach (var baseType in baseList.Types)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
475foreach (var baseType in typeDeclaration.BaseList.Types)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
215else if (baseList.Types[0] == type.Parent)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (2)
83if (syntaxRef.GetSyntax(cancellationToken) is TypeDeclarationSyntax { BaseList.Types: var baseTypes }) 92return typeNode.BaseList.Types;
Microsoft.CodeAnalysis.Razor.Compiler (1)
CSharp\DefaultUtf8WriteLiteralFeature.cs (1)
198var baseTypeSyntax = classDecl?.BaseList?.Types.FirstOrDefault();
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
215else if (baseList.Types[0] == type.Parent)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (2)
83if (syntaxRef.GetSyntax(cancellationToken) is TypeDeclarationSyntax { BaseList.Types: var baseTypes }) 92return typeNode.BaseList.Types;