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 Text
Declaration
public TextBuilder(ModelsBuilderSettings config, IList<TypeModel> typeModels)
Parameters
Type | Name | Description |
---|---|---|
Models |
config | The models builder configuration. |
IList<Type |
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. |
sb | The string builder. |
IEnumerable<Type |
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. |
sb | The string builder. |
Type |
typeModel | The model to generate. |
WriteClrType(StringBuilder, Type)
Declaration
public void WriteClrType(StringBuilder sb, Type type)
Parameters
Type | Name | Description |
---|---|---|
System. |
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. |
sb | The string builder. |