Table of Contents

Class ClientGenerationOptions

Namespace
TypedRest.CodeGeneration.Generation
Assembly
TypedRest.CodeGeneration.dll

Options controlling the generation of a TypedRest client, common to all target languages.

public class ClientGenerationOptions
Inheritance
object
ClientGenerationOptions
Derived

Remarks

Target languages derive from this to add their own options.

Constructors

ClientGenerationOptions(string)

Creates new generation options.

public ClientGenerationOptions(string serviceName)

Parameters

serviceName string

The service name to use for the entry endpoint.

ClientGenerationOptions(ClientGenerationOptions)

Copies the common options from other.

protected ClientGenerationOptions(ClientGenerationOptions other)

Parameters

other ClientGenerationOptions

Remarks

Used by target languages to accept options that were built without knowledge of the language.

Properties

DtoNamespace

The namespace or module path for the DTOs. Uses Namespace if not set.

public string? DtoNamespace { get; set; }

Property Value

string

GenerateDtos

Controls whether to generate DTOs.

public bool GenerateDtos { get; set; }

Property Value

bool

GenerateEntryConstructor

Controls whether the entry endpoint gets a generated constructor taking the base URI. Turn this off to supply the constructors yourself, e.g. to pass an error handler or custom headers. Not supported by all target languages.

public bool GenerateEntryConstructor { get; set; }

Property Value

bool

GenerateInterfaces

Controls whether to generate interfaces for endpoints. Not supported by all target languages.

public bool GenerateInterfaces { get; set; }

Property Value

bool

Namespace

The namespace or module path for the endpoints. Uses ServiceName if not set.

public string? Namespace { get; set; }

Property Value

string

ServiceName

The service name to use for the entry endpoint.

public string ServiceName { get; }

Property Value

string