Class FluidMarkdownGenerator
Namespace: Momentum.Extensions.EventMarkdownGenerator.Services
Assembly: Momentum.Extensions.EventMarkdownGenerator.dll
Generates markdown documentation from event metadata using Fluid (Liquid) templates. Supports custom template directories and generates both event and schema documentation.
public class FluidMarkdownGeneratorInheritance
object ← FluidMarkdownGenerator
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
CopyDefaultTemplatesToDirectoryAsync(string, CancellationToken)
Copies the default Liquid templates to a target directory for customization.
public static Task CopyDefaultTemplatesToDirectoryAsync(string targetDirectory, CancellationToken cancellationToken = default)Parameters
targetDirectory string
The directory to copy templates to.
cancellationToken CancellationToken
Optional cancellation token.
Returns
Exceptions
Thrown when targetDirectory is null or empty.
CreateAsync(string?)
Creates a new instance of the class asynchronously.
public static Task<FluidMarkdownGenerator> CreateAsync(string? customTemplatesDirectory = null)Parameters
customTemplatesDirectory string?
Optional directory containing custom Liquid templates to override defaults.
Returns
A new instance.
GenerateAllMarkdown(IEnumerable<EventWithDocumentation>, string, GeneratorOptions?)
Generates markdown content for multiple events.
public IEnumerable<IndividualMarkdownOutput> GenerateAllMarkdown(IEnumerable<EventWithDocumentation> events, string outputDirectory, GeneratorOptions? options = null)Parameters
events IEnumerable<EventWithDocumentation>
The events to render.
outputDirectory string
The base output directory for generated files.
options GeneratorOptions?
Optional generator options for customization.
Returns
IEnumerable<IndividualMarkdownOutput>
An enumerable of generated markdown outputs.
GenerateAllSchemas(IEnumerable<Type>, string)
Generates markdown content for multiple complex type schemas.
public IEnumerable<IndividualMarkdownOutput> GenerateAllSchemas(IEnumerable<Type> schemaTypes, string outputDirectory)Parameters
schemaTypes IEnumerable<Type>
The types to generate schema documentation for.
outputDirectory string
The base output directory for generated files.
Returns
IEnumerable<IndividualMarkdownOutput>
An enumerable of generated markdown outputs.
GenerateMarkdown(EventWithDocumentation, string, GeneratorOptions?)
Generates markdown content for a single event.
public IndividualMarkdownOutput GenerateMarkdown(EventWithDocumentation eventWithDoc, string outputDirectory, GeneratorOptions? options = null)Parameters
eventWithDoc EventWithDocumentation
The event metadata and documentation to render.
outputDirectory string
The base output directory for generated files.
options GeneratorOptions?
Optional generator options for customization.
Returns
The generated markdown output containing content and file path.
GenerateSchemaMarkdown(Type, string)
Generates markdown content for a complex type schema.
public IndividualMarkdownOutput GenerateSchemaMarkdown(Type schemaType, string outputDirectory)Parameters
schemaType Type
The type to generate schema documentation for.
outputDirectory string
The base output directory for generated files.
Returns
The generated markdown output containing content and file path.