Class TextBuilder
Implements a builder that works by writing text.
Namespace: Umbraco.Cms.Infrastructure.ModelsBuilder.Building
Assembly: Umbraco.Infrastructure.dll
Syntax
public class TextBuilder : Builder
Constructors
View SourceTextBuilder()
Declaration
public TextBuilder()
TextBuilder(ModelsBuilderSettings, IList<TypeModel>)
Initializes a new instance of the TextBuilder class with a list of models to generate and the result of code parsing.
Declaration
public TextBuilder(ModelsBuilderSettings config, IList<TypeModel> typeModels)
Parameters
Type | Name | Description |
---|---|---|
ModelsBuilderSettings | config | The models builder configuration. |
IList<TypeModel> | typeModels | The list of models to generate. |
Methods
View SourceGenerate(StringBuilder, IEnumerable<TypeModel>)
Outputs generated models to a string builder.
Declaration
public void Generate(StringBuilder sb, IEnumerable<TypeModel> typeModels)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | The string builder. |
IEnumerable<TypeModel> | typeModels | The models to generate. |
Generate(StringBuilder, TypeModel)
Outputs a generated model to a string builder.
Declaration
public void Generate(StringBuilder sb, TypeModel typeModel)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | The string builder. |
TypeModel | typeModel | The model to generate. |
WriteClrType(StringBuilder, Type)
Declaration
public void WriteClrType(StringBuilder sb, Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | |
Type | type |
WriteHeader(StringBuilder)
Outputs an "auto-generated" header to a string builder.
Declaration
public static void WriteHeader(StringBuilder sb)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | The string builder. |