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