Table of Contents

Class GenerationOptions

Namespace
TypedRest.CodeGeneration.CSharp
Assembly
TypedRest.CodeGeneration.CSharp.dll

Options controlling the generation of a C# TypedRest client.

public class GenerationOptions : ClientGenerationOptions
Inheritance
object
GenerationOptions
Inherited Members

Constructors

GenerationOptions(string)

Creates new generation options.

public GenerationOptions(string serviceName)

Parameters

serviceName string

The service name to use for the entry endpoint.

GenerationOptions(ClientGenerationOptions)

Creates new generation options, copying the common options from other.

public GenerationOptions(ClientGenerationOptions other)

Parameters

other ClientGenerationOptions

Properties

LanguageVersion

The minimum C# version the generated code must compile with.

public LanguageVersion LanguageVersion { get; set; }

Property Value

LanguageVersion

SupportedSerializers

The names accepted by Serializer, most preferred first. Empty if the target language has no serializer to choose, either because it does not annotate DTOs or because it only supports one.

public override IReadOnlyCollection<string> SupportedSerializers { get; }

Property Value

IReadOnlyCollection<string>

Remarks

Target languages override this to declare what they can generate for.

Methods

JsonAttributes()

Builds the JsonAttributes for Serializer, falling back to Newtonsoft.Json as TypedRest for .NET does.

public JsonAttributes JsonAttributes()

Returns

JsonAttributes

Exceptions

ArgumentException

The serializer is not one of SupportedSerializers.

NamingStrategy()

Builds a NamingStrategy applying the namespace fallbacks.

public NamingStrategy NamingStrategy()

Returns

NamingStrategy