Table of Contents

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

string

Methods

CanGenerate(GeneratorContext)

Determines if this generator can process the given manifest.

bool CanGenerate(GeneratorContext context)

Parameters

context GeneratorContext

The 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

context GeneratorContext

The generator context containing manifest and compilation information.

cancellationToken CancellationToken

Cancellation token for async operations.

Returns

IEnumerable<GeneratedFile>

A collection of generated files.