Table of Contents

Class TextGenerator

Namespace
Hegel
Assembly
Hegel.dll

Draws strings: any Unicode text by default, narrowed by size, code point, category or alphabet.

public sealed class TextGenerator : ValueGenerator<string>
Inheritance
TextGenerator
Inherited Members

Properties

Label

The span label the engine files this generator's draws under. Defaults to a label derived from the class's full name.

public override ulong Label { get; }

Property Value

ulong

Methods

Alphabet(string)

Only the characters of chars. Cannot be combined with the other restrictions.

public TextGenerator Alphabet(string chars)

Parameters

chars string

Returns

TextGenerator

Categories(params string[])

Only the Unicode general categories categories ("L", "Nd", ...).

public TextGenerator Categories(params string[] categories)

Parameters

categories string[]

Returns

TextGenerator

Codec(string)

Only text that codec ("ascii", "utf-8", ...) can encode.

public TextGenerator Codec(string codec)

Parameters

codec string

Returns

TextGenerator

Codepoints(int, int)

Only code points in [min, max].

public TextGenerator Codepoints(int min, int max)

Parameters

min int
max int

Returns

TextGenerator

DoDraw(TestCase)

Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.

protected override string DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

string

ExcludeCategories(params string[])

None of the Unicode general categories categories.

public TextGenerator ExcludeCategories(params string[] categories)

Parameters

categories string[]

Returns

TextGenerator

ExcludeCharacters(string)

Never the characters of chars.

public TextGenerator ExcludeCharacters(string chars)

Parameters

chars string

Returns

TextGenerator

IncludeCharacters(string)

Also the characters of chars, whatever the other restrictions say.

public TextGenerator IncludeCharacters(string chars)

Parameters

chars string

Returns

TextGenerator

MaxSize(int)

At most maxSize code points.

public TextGenerator MaxSize(int maxSize)

Parameters

maxSize int

Returns

TextGenerator

MinSize(int)

At least minSize code points.

public TextGenerator MinSize(int minSize)

Parameters

minSize int

Returns

TextGenerator