src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (11)
890public SyntaxList<SyntaxNode> GetMembersOfTypeDeclaration(SyntaxNode typeDeclaration)
1006private static void AppendConstructors(SyntaxList<MemberDeclarationSyntax> members, List<SyntaxNode> constructors, CancellationToken cancellationToken)
1119public SyntaxList<SyntaxNode> GetContentsOfInterpolatedString(SyntaxNode interpolatedString)
1362public SyntaxList<SyntaxNode> GetAttributeLists(SyntaxNode? node)
1369public SyntaxList<SyntaxNode> GetContentFromDocumentationCommentTriviaSyntax(SyntaxTrivia trivia)
1558public void GetPartsOfCompilationUnit(SyntaxNode node, out SyntaxList<SyntaxNode> imports, out SyntaxList<SyntaxNode> attributeLists, out SyntaxList<SyntaxNode> members)
1597out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken)
1620public void GetPartsOfBaseNamespaceDeclaration(SyntaxNode node, out SyntaxNode name, out SyntaxList<SyntaxNode> imports, out SyntaxList<SyntaxNode> members)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (8)
401var newAttributeLists = RemoveAttributeFromAttributeLists(member.GetAttributes(), attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
409var newAttributeLists = RemoveAttributeFromAttributeLists(accessor.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
417var newAttributeLists = RemoveAttributeFromAttributeLists(compilationUnit.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
425var newAttributeLists = RemoveAttributeFromAttributeLists(parameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
432var newAttributeLists = RemoveAttributeFromAttributeLists(typeParameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
441private static SyntaxList<AttributeListSyntax> RemoveAttributeFromAttributeLists(
442SyntaxList<AttributeListSyntax> attributeLists,
592var statementsArray = StatementGenerator.GenerateStatements(statements);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (5)
25SyntaxList<MemberDeclarationSyntax> members,
48SyntaxList<MemberDeclarationSyntax> members,
73var members = Insert(destination.Members, declaration, info, availableIndices,
87var members = Insert(destination.Members, declaration, info, availableIndices,
142private static SyntaxList<AttributeListSyntax> GenerateAttributes(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (6)
39var members = Insert(destination.Members, declaration, info, availableIndices, after: LastMethod);
54var members = Insert(destination.Members, declaration, info, availableIndices, after: LastMethod);
69var members = Insert(destination.Members, methodDeclaration, info, availableIndices, after: LastMethod);
219private static SyntaxList<AttributeListSyntax> GenerateAttributes(
235private static SyntaxList<TypeParameterConstraintClauseSyntax> GenerateConstraintClauses(
243private static SyntaxList<TypeParameterConstraintClauseSyntax> GenerateDefaultConstraints(IMethodSymbol method)
CodeGeneration\CSharpSyntaxGenerator.cs (32)
79(SyntaxList<XmlNodeSyntax>)SyntaxFactory.List(nodes),
92return SyntaxFactory.DocumentationCommentTrivia(documentationCommentTrivia.Kind(), (SyntaxList<XmlNodeSyntax>)SyntaxFactory.List(content), documentationCommentTrivia.EndOfComment);
108private SyntaxList<UsingDirectiveSyntax> AsUsingDirectives(IEnumerable<SyntaxNode> declarations)
125private static SyntaxList<MemberDeclarationSyntax> AsNamespaceMembers(IEnumerable<SyntaxNode> declarations)
271var attributes = default(SyntaxList<AttributeListSyntax>);
463var list = SyntaxFactory.List(accessorDeclarations.Cast<AccessorDeclarationSyntax>());
724var typeMembers = this.AsClassMembers(name, members);
731private SyntaxList<MemberDeclarationSyntax> AsClassMembers(string className, IEnumerable<SyntaxNode>? members)
771var structMembers = this.AsClassMembers(name, members);
801private SyntaxList<MemberDeclarationSyntax> AsInterfaceMembers(IEnumerable<SyntaxNode>? members)
995private static SyntaxList<AttributeListSyntax> AsAttributeLists(IEnumerable<SyntaxNode> attributes)
1039var newAttributes = AsAttributeLists(attributes);
1052var lists = declaration.GetAttributeLists();
1053var newList = lists.AddRange(newAttributes);
1087var lists = d.GetAttributeLists();
1088var newList = lists.AddRange(newAttributes);
1099private static SyntaxList<AttributeListSyntax> AsAssemblyAttributes(IEnumerable<AttributeListSyntax> attributes)
1104private static SyntaxList<AttributeListSyntax> WithRequiredTargetSpecifier(SyntaxList<AttributeListSyntax> attributes, SyntaxNode declaration)
1202internal static SyntaxList<AttributeListSyntax> GetAttributeLists(SyntaxNode declaration)
1213private static SyntaxNode WithAttributeLists(SyntaxNode declaration, SyntaxList<AttributeListSyntax> attributeLists)
1251var usingsToInsert = this.AsUsingDirectives(imports);
1840private static SyntaxList<TypeParameterConstraintClauseSyntax> WithTypeConstraints(
1841SyntaxList<TypeParameterConstraintClauseSyntax> clauses,
2335var newSections = statement.Sections.InsertRange(index, switchSections.Cast<SwitchSectionSyntax>());
3285var statementList = AsStatementList(statements);
3296private static SyntaxList<StatementSyntax> AsStatementList(IEnumerable<SyntaxNode>? nodes)
3637private static SyntaxList<SwitchLabelSyntax> AsSwitchLabels(IEnumerable<SyntaxNode> expressions)
3639var labels = default(SyntaxList<SwitchLabelSyntax>);
3746SyntaxList<MemberDeclarationSyntax> extensionMembers = [.. members.OfType<MemberDeclarationSyntax>().WhereNotNull()];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (11)
890public SyntaxList<SyntaxNode> GetMembersOfTypeDeclaration(SyntaxNode typeDeclaration)
1006private static void AppendConstructors(SyntaxList<MemberDeclarationSyntax> members, List<SyntaxNode> constructors, CancellationToken cancellationToken)
1119public SyntaxList<SyntaxNode> GetContentsOfInterpolatedString(SyntaxNode interpolatedString)
1362public SyntaxList<SyntaxNode> GetAttributeLists(SyntaxNode? node)
1369public SyntaxList<SyntaxNode> GetContentFromDocumentationCommentTriviaSyntax(SyntaxTrivia trivia)
1558public void GetPartsOfCompilationUnit(SyntaxNode node, out SyntaxList<SyntaxNode> imports, out SyntaxList<SyntaxNode> attributeLists, out SyntaxList<SyntaxNode> members)
1597out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken)
1620public void GetPartsOfBaseNamespaceDeclaration(SyntaxNode node, out SyntaxNode name, out SyntaxList<SyntaxNode> imports, out SyntaxList<SyntaxNode> members)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (8)
401var newAttributeLists = RemoveAttributeFromAttributeLists(member.GetAttributes(), attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
409var newAttributeLists = RemoveAttributeFromAttributeLists(accessor.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
417var newAttributeLists = RemoveAttributeFromAttributeLists(compilationUnit.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
425var newAttributeLists = RemoveAttributeFromAttributeLists(parameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
432var newAttributeLists = RemoveAttributeFromAttributeLists(typeParameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
441private static SyntaxList<AttributeListSyntax> RemoveAttributeFromAttributeLists(
442SyntaxList<AttributeListSyntax> attributeLists,
592var statementsArray = StatementGenerator.GenerateStatements(statements);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (5)
25SyntaxList<MemberDeclarationSyntax> members,
48SyntaxList<MemberDeclarationSyntax> members,
73var members = Insert(destination.Members, declaration, info, availableIndices,
87var members = Insert(destination.Members, declaration, info, availableIndices,
142private static SyntaxList<AttributeListSyntax> GenerateAttributes(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (6)
39var members = Insert(destination.Members, declaration, info, availableIndices, after: LastMethod);
54var members = Insert(destination.Members, declaration, info, availableIndices, after: LastMethod);
69var members = Insert(destination.Members, methodDeclaration, info, availableIndices, after: LastMethod);
219private static SyntaxList<AttributeListSyntax> GenerateAttributes(
235private static SyntaxList<TypeParameterConstraintClauseSyntax> GenerateConstraintClauses(
243private static SyntaxList<TypeParameterConstraintClauseSyntax> GenerateDefaultConstraints(IMethodSymbol method)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (11)
890public SyntaxList<SyntaxNode> GetMembersOfTypeDeclaration(SyntaxNode typeDeclaration)
1006private static void AppendConstructors(SyntaxList<MemberDeclarationSyntax> members, List<SyntaxNode> constructors, CancellationToken cancellationToken)
1119public SyntaxList<SyntaxNode> GetContentsOfInterpolatedString(SyntaxNode interpolatedString)
1362public SyntaxList<SyntaxNode> GetAttributeLists(SyntaxNode? node)
1369public SyntaxList<SyntaxNode> GetContentFromDocumentationCommentTriviaSyntax(SyntaxTrivia trivia)
1558public void GetPartsOfCompilationUnit(SyntaxNode node, out SyntaxList<SyntaxNode> imports, out SyntaxList<SyntaxNode> attributeLists, out SyntaxList<SyntaxNode> members)
1597out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken)
1620public void GetPartsOfBaseNamespaceDeclaration(SyntaxNode node, out SyntaxNode name, out SyntaxList<SyntaxNode> imports, out SyntaxList<SyntaxNode> members)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (8)
401var newAttributeLists = RemoveAttributeFromAttributeLists(member.GetAttributes(), attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
409var newAttributeLists = RemoveAttributeFromAttributeLists(accessor.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
417var newAttributeLists = RemoveAttributeFromAttributeLists(compilationUnit.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
425var newAttributeLists = RemoveAttributeFromAttributeLists(parameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
432var newAttributeLists = RemoveAttributeFromAttributeLists(typeParameter.AttributeLists, attributeToRemove, out positionOfRemovedNode, out triviaOfRemovedNode);
441private static SyntaxList<AttributeListSyntax> RemoveAttributeFromAttributeLists(
442SyntaxList<AttributeListSyntax> attributeLists,
592var statementsArray = StatementGenerator.GenerateStatements(statements);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (5)
25SyntaxList<MemberDeclarationSyntax> members,
48SyntaxList<MemberDeclarationSyntax> members,
73var members = Insert(destination.Members, declaration, info, availableIndices,
87var members = Insert(destination.Members, declaration, info, availableIndices,
142private static SyntaxList<AttributeListSyntax> GenerateAttributes(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (6)
39var members = Insert(destination.Members, declaration, info, availableIndices, after: LastMethod);
54var members = Insert(destination.Members, declaration, info, availableIndices, after: LastMethod);
69var members = Insert(destination.Members, methodDeclaration, info, availableIndices, after: LastMethod);
219private static SyntaxList<AttributeListSyntax> GenerateAttributes(
235private static SyntaxList<TypeParameterConstraintClauseSyntax> GenerateConstraintClauses(
243private static SyntaxList<TypeParameterConstraintClauseSyntax> GenerateDefaultConstraints(IMethodSymbol method)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (9)
452var attributeList = syntaxFacts.GetAttributeLists(node);
534public static SyntaxList<SyntaxNode> GetImportsOfBaseNamespaceDeclaration(this ISyntaxFacts syntaxFacts, SyntaxNode node)
536syntaxFacts.GetPartsOfBaseNamespaceDeclaration(node, out _, out var imports, out _);
540public static SyntaxList<SyntaxNode> GetImportsOfCompilationUnit(this ISyntaxFacts syntaxFacts, SyntaxNode node)
542syntaxFacts.GetPartsOfCompilationUnit(node, out var imports, out _, out _);
552public static SyntaxList<SyntaxNode> GetMembersOfBaseNamespaceDeclaration(this ISyntaxFacts syntaxFacts, SyntaxNode node)
554syntaxFacts.GetPartsOfBaseNamespaceDeclaration(node, out _, out _, out var members);
558public static SyntaxList<SyntaxNode> GetMembersOfCompilationUnit(this ISyntaxFacts syntaxFacts, SyntaxNode node)
560syntaxFacts.GetPartsOfCompilationUnit(node, out _, out _, out var members);