Skip to Main Content

BTD_Mod_Helper​.Api​.ModSourceFileGenerator


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api

ModSourceFileGenerator Class

ModContent class for code/data generators that write files into a mod project's source code.
per output.

public abstract class ModSourceFileGenerator : BTD_Mod_Helper.Api.ModContent

Inheritance System.ObjectModContent  ModSourceFileGenerator

Properties

ModSourceFileGenerator.FileExt Property

File extension to use

public virtual string FileExt { get; }

Property Value

System.String

ModSourceFileGenerator.FileName Property

C# class name of the generated file (and its base filename).

public virtual string FileName { get; }

Property Value

System.String

ModSourceFileGenerator.FileNames Property

Multiple classes to generate, if applicable

public virtual System.Collections.Generic.IEnumerable<string> FileNames { get; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

ModSourceFileGenerator.GeneratedComment Property

Comment to include at the top of the file about it being a generated file

public virtual string GeneratedComment { get; }

Property Value

System.String

ModSourceFileGenerator.Namespace Property

C# namespace of the generated file.

public virtual string Namespace { get; }

Property Value

System.String

ModSourceFileGenerator.OutputPath Property

Folder segments under the root project that the generated file lives in.

public abstract string[] OutputPath { get; }

Property Value

System.String[]

ModSourceFileGenerator.RootFolder Property

<ModHelperSourceFolder>/BloonsTD6 Mod Helper — root for everything generators emit.

public virtual string RootFolder { get; }

Property Value

System.String

ModSourceFileGenerator.RootNamespace Property

Root Namespace for the class to be in before OutputPath

public virtual string RootNamespace { get; }

Property Value

System.String

Methods

ModSourceFileGenerator.Generate() Method

Build the file contents into a fresh System.Text.StringBuilder and write them to OutputPath/FileName.FileExt.

public virtual void Generate();

ModSourceFileGenerator.Generate(StringBuilder, string) Method

Append the file's contents to sb for the class

public virtual void Generate(System.Text.StringBuilder sb, ref string fileName);

Parameters

sb System.Text.StringBuilder

fileName System.String

ModSourceFileGenerator.Generate(StringBuilder) Method

Append the file's contents to sb

public virtual void Generate(System.Text.StringBuilder sb);

Parameters

sb System.Text.StringBuilder