Table of Contents

Class TypeNameRegistry

Namespace
TypedRest.CodeGeneration.TypeScript
Assembly
TypedRest.CodeGeneration.TypeScript.dll

Keeps track of the type names handed out during a generation run, so that no two generated types end up in the same file.

public class TypeNameRegistry
Inheritance
object
TypeNameRegistry

Methods

Register(IEnumerable<TsIdentifier>)

Registers the first of the candidates that is still free. Falls back to appending a number to the last candidate if all of them are taken.

public TsIdentifier Register(IEnumerable<TsIdentifier> candidates)

Parameters

candidates IEnumerable<TsIdentifier>

Returns

TsIdentifier

Register(TsIdentifier)

Registers a name for a type, appending a number if it is already taken.

public TsIdentifier Register(TsIdentifier candidate)

Parameters

candidate TsIdentifier

Returns

TsIdentifier