Class RecordGenerator<T>
- Namespace
- Hegel
- Assembly
- Hegel.dll
Draws records by drawing each component: the primary constructor's parameters, then the
settable properties it leaves out. Printed as new Name(a, b), with { X = c } after
it for the properties.
public sealed class RecordGenerator<T> : PrintableGenerator<T>
Type Parameters
T
- Inheritance
-
Generator<T>RecordGenerator<T>
- 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
Methods
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 T DoDraw(TestCase tc)
Parameters
tcTestCase
Returns
- T
DoDrawAndPrint(TestCase, Printer)
Draw one value, printing it to printer (which may be Noop).
Draw its parts through DrawAndPrint<T>(Generator<T>, Printer).
protected override T DoDrawAndPrint(TestCase tc, Printer printer)
Parameters
Returns
- T
With<TComponent>(string, Generator<TComponent>)
Draw the component component from generator instead of deriving one from its type.
public RecordGenerator<T> With<TComponent>(string component, Generator<TComponent> generator)
Parameters
Returns
Type Parameters
TComponent