CodeGenerator Class
An abstract class representing a code generator. For more details ICodeGenerator interface.
Assembly: Microsoft.AspNet.Scaffolding.12.0 (in Microsoft.AspNet.Scaffolding.12.0.dll)
The CodeGenerator type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Context | Gets the CodeGenerationContext for the current code generation operation. |
![]() | Dependencies | A list of NuGet packages upon which this code generator depends in order to run successfully. Packages listed here will be installed after ShowUIAndValidate succeeded and before the GenerateCode method is invoked. |
![]() | Information | Gets the CodeGeneratorInformation for the current code generation operation. |
![]() | ServiceProvider | Gets the IServiceProvider for the current code generation operation. |
![]() | TemplateFolders | List of search paths of this code generator where templates/static files are searched for. By default, this list contains only one folder which is a sub-directory named "Templates\ Id inside the directory containing the CodeGenerator assembly. Custom code generators can override the default behavior. |
| Name | Description | |
|---|---|---|
![]() | AddClassMemberFromTemplate | Adds the result of running a Visual Studio T4 text template to an existing source file as a class member at the end. |
![]() | AddFile | Adds a new file to the active project at the given relative path. |
![]() | AddFileFromTemplate | Executes a template and adds the generated code as a project file. |
![]() | AddFolder | Adds a new folder to the active project at the given relative path. If a project item already exists for the active project at the given projectRelativePath, nothing is done. If there is already a folder on the disk but that is not part of the project, the folder is added to the project. |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GenerateCode | Performs code generation. |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ShowUIAndValidate | Gathers and validates information necessary for code generation. Any UI for the code generator should be displayed in this method. |
![]() | ToString | (Inherited from Object.) |
Show:
