Table of Contents

Class FlatMappedGenerator<TSource, TResult>

Namespace
Hegel
Assembly
Hegel.dll

A generator that draws a value and then from the generator chosen for it.

public sealed class FlatMappedGenerator<TSource, TResult> : PrintableGenerator<TResult>

Type Parameters

TSource
TResult
Inheritance
Generator<TResult>
FlatMappedGenerator<TSource, TResult>
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

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 TResult DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

TResult

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 TResult DoDrawAndPrint(TestCase tc, Printer printer)

Parameters

tc TestCase
printer Printer

Returns

TResult