Interface ICodeGenerator
- Namespace
- JD.Domain.Generators.Core
- Assembly
- JD.Domain.Generators.Core.dll
Interface for code generators that produce generated files from domain manifests.
public interface ICodeGenerator
Properties
Name
Gets the name of this generator.
string Name { get; }
Property Value
Methods
CanGenerate(GeneratorContext)
Determines if this generator can process the given manifest.
bool CanGenerate(GeneratorContext context)
Parameters
contextGeneratorContextThe generator context to check.
Returns
- bool
True if this generator can process the manifest, false otherwise.
Generate(GeneratorContext, CancellationToken)
Generates code files from the given context.
IEnumerable<GeneratedFile> Generate(GeneratorContext context, CancellationToken cancellationToken = default)
Parameters
contextGeneratorContextThe generator context containing manifest and compilation information.
cancellationTokenCancellationTokenCancellation token for async operations.
Returns
- IEnumerable<GeneratedFile>
A collection of generated files.