Class GeneratedFile
Represents a generated file. It's usually provided in a IGeneratedFileSet, which contains additional specs.
[WorkInProgressApi("still being standardized")]
public class GeneratedFile : IGeneratedFile, IGeneratedFileInfo
- Inheritance
-
objectGeneratedFile
- Implements
Properties
Body
The body of the file, which will be written to the file.
public string Body { get; init; }
Property Value
Dependencies
List of dependencies which are required to create this file.
For example, if we generate a PersonList.cshtml which will inherit the AppRazor, then the AppRazor should be in the list.
Note: not implemented yet - this is for later when users may want to select which files to generate.
public IReadOnlyCollection<IGeneratedFileInfo> Dependencies { get; init; }
Property Value
FileName
The file name of the final code file, with extension. May not contain any slashes.
public string FileName { get; init; }
Property Value
Path
The path to put the file in, relative to the root which is determined elsewhere. May not begin or end with a slash.
Example: if path is "Data" and the root is "AppCode", the file will be saved to "AppCode\Data\FileName.cs"
public string Path { get; init; }