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
-
objectClientGenerationOptions
- Derived
Remarks
Target languages derive from this to add their own options.
Constructors
ClientGenerationOptions(string)
Creates new generation options.
public ClientGenerationOptions(string serviceName)
Parameters
serviceNamestringThe service name to use for the entry endpoint.
ClientGenerationOptions(ClientGenerationOptions)
Copies the common options from other.
protected ClientGenerationOptions(ClientGenerationOptions other)
Parameters
otherClientGenerationOptions
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
GenerateDtos
Controls whether to generate DTOs.
public bool GenerateDtos { get; set; }
Property Value
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
GenerateInterfaces
Controls whether to generate interfaces for endpoints. Not supported by all target languages.
public bool GenerateInterfaces { get; set; }
Property Value
Namespace
The namespace or module path for the endpoints. Uses ServiceName if not set.
public string? Namespace { get; set; }
Property Value
ServiceName
The service name to use for the entry endpoint.
public string ServiceName { get; }