NameFormatter

A convenience class used for modeling names that have multiple parts and need multiple generators to create them.

Implements: Archigen.IGenerator<System.String>

Constructors

Constructor
Description

NameFormatter(System.String format)

Instantiates a new NameFormatter with the specified format. Substrings that need to be replaced with a generated name should be surrounded with curly brackets. For example, the format "John {middle-name} Smith" tells a NameFormatter that the name between the first and last needs to be generated.

Methods

Method
Returns
Description

Define(System.String propertyName, Archigen.IGenerator <System.String> nameGenerator, NameFormat stringCase, System.Boolean useLeadingSpace)

Next()

System.String

Returns a new generated name based on the previously specified format.

Properties

Property
Type
Description

BoundNameGenerators

System.Collections.Generic.Dictionary <System.String,Archigen.IGenerator <System.String>>

The NameGenerator used by this NameFormatter.

Format

System.String

The desired format for names. Surround substrings that need to be replaced with a generated name with curly brackets. For example, the format "John {middle-name} Smith" tells a NameFormatter that the name between the first and last needs to be generated.

Options

System.Collections.Generic.Dictionary <System.String,NameFormatterGeneratorOptions>

Provides hints on whether a name should be upper case, lower case, capitalized, etc.

Last updated