Class SessionTemplateGenerator
Session-aware template generator: Run(SessionTemplateGeneratorParameters) sequences Generate(SessionTemplateGeneratorParameters) → ApplyMetadata(SessionTemplateGeneratorParameters) → SaveSession(SessionTemplateGeneratorParameters) → AfterSave(SessionTemplateGeneratorParameters). Each step is a public virtual so a decorator (e.g. Quantum-aware editor wrapper) can intercept it; CLI / headless flows get bare no-op + plain Save(ILogger, PackageSaveParameters?).
public abstract class SessionTemplateGenerator : TemplateGeneratorBase<SessionTemplateGeneratorParameters>, ITemplateGenerator<SessionTemplateGeneratorParameters>, ITemplateGenerator
- Inheritance
-
objectSessionTemplateGenerator
- Implements
- Inherited Members
- Extension Methods
Methods
AfterSave(SessionTemplateGeneratorParameters)
Optional post-save step.
public virtual Task<bool> AfterSave(SessionTemplateGeneratorParameters parameters)
Parameters
parametersSessionTemplateGeneratorParameters
Returns
ApplyMetadata(SessionTemplateGeneratorParameters)
No-op by default; Quantum decorator materializes override metadata into the asset graph.
public virtual void ApplyMetadata(SessionTemplateGeneratorParameters parameters)
Parameters
parametersSessionTemplateGeneratorParameters
Generate(SessionTemplateGeneratorParameters)
Generates the template; must work unattended.
public abstract bool Generate(SessionTemplateGeneratorParameters parameters)
Parameters
parametersSessionTemplateGeneratorParameters
Returns
Run(SessionTemplateGeneratorParameters)
Runs the generator with the given parameter.
public override sealed bool Run(SessionTemplateGeneratorParameters parameters)
Parameters
parametersSessionTemplateGeneratorParametersThe parameters for the template generator.
Returns
- bool
Trueif the generation was successful,falseotherwise.
Remarks
This method should work in unattended mode and should not ask user for information anymore.
SaveSession(SessionTemplateGeneratorParameters)
Bare Save(ILogger, PackageSaveParameters?); Quantum decorator runs PrepareForSave first.
public virtual void SaveSession(SessionTemplateGeneratorParameters parameters)
Parameters
parametersSessionTemplateGeneratorParameters
WriteGitIgnore(SessionTemplateGeneratorParameters)
protected void WriteGitIgnore(SessionTemplateGeneratorParameters parameters)
Parameters
parametersSessionTemplateGeneratorParameters