docs.unity3d.com
    Show / Hide Table of Contents

    Method GenerateSourceTextForRootNodes

    GenerateSourceTextForRootNodes(String, GeneratorExecutionContext, SyntaxTree, IEnumerable<MemberDeclarationSyntax>)

    Generates the SourceText from a given list of root nodes using the SyntaxTree's path. Includes the existing SyntaxTree's root using statements, and adds correct line directives.

    Declaration
    public static SourceText GenerateSourceTextForRootNodes(string generatorName, GeneratorExecutionContext generatorExecutionContext, SyntaxTree originalSyntaxTree, IEnumerable<MemberDeclarationSyntax> rootNodes)
    Parameters
    Type Name Description
    String generatorName

    Name to base filepath on.

    GeneratorExecutionContext generatorExecutionContext

    Context of the generator executed.

    SyntaxTree originalSyntaxTree

    Original SyntaxTree to base SourceText location and usings on.

    IEnumerable<MemberDeclarationSyntax> rootNodes

    Root nodes to add to compilation unit.

    Returns
    Type Description
    SourceText

    The SourceText based on nodes and SyntaxTree filepath.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023