Interface ICodeGenerator
Interface for code generator.
Namespace: Kephas.Generation
Assembly: Kephas.CodeAnalysis.dll
Syntax
public interface ICodeGenerator
Methods
| Improve this Doc View SourceGenerateCodeAsync(IEnumerable<IElementInfo>, ICodeGenerationContext, CancellationToken)
Writes the generated code to the given text writer.
Declaration
Task<IEnumerable<ICodeGenerationUnit>> GenerateCodeAsync(IEnumerable<IElementInfo> codeElements, ICodeGenerationContext codeGenerationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IElementInfo> | codeElements | The IElementInfos to be generated. |
ICodeGenerationContext | codeGenerationContext | Context for the code generation. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICodeGenerationUnit>> | A promise of an enumeration of ICodeGenerationUnits. |