Table of Contents

Class Dialect

Namespace
Hegel
Assembly
Hegel.dll

The language a failing test case's draws are printed in: how the statement binding a draw is written, and how Repr(object?, Type) prints a value. C# unless another frontend, such as Hegel for F#, installs its own with Use(Dialect) around a run.

public abstract class Dialect
Inheritance
Dialect
Inherited Members

Properties

CSharp

The C# dialect: var name = value;, with values printed as the C# that builds them.

public static Dialect CSharp { get; }

Property Value

Dialect

Current

The dialect in effect: the one installed with Use(Dialect), or CSharp.

public static Dialect Current { get; }

Property Value

Dialect

Methods

BeginDraw(Printer, string)

Print the start of the statement binding a draw to name.

public abstract void BeginDraw(Printer printer, string name)

Parameters

printer Printer
name string

EndDraw(Printer)

Print the end of the statement binding a draw; the line break follows.

public abstract void EndDraw(Printer printer)

Parameters

printer Printer

Repr(Printer, object?, Type)

Print value, drawn with the static type staticType, as the code that builds it.

public abstract void Repr(Printer printer, object? value, Type staticType)

Parameters

printer Printer
value object
staticType Type

Use(Dialect)

Make dialect the current one until the returned scope is disposed, on this thread and on the threads and tasks it starts meanwhile.

public static IDisposable Use(Dialect dialect)

Parameters

dialect Dialect

Returns

IDisposable