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
-
objectGenerationOptions
- Inherited Members
Constructors
GenerationOptions(string)
Creates new generation options.
public GenerationOptions(string serviceName)
Parameters
serviceNamestringThe 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
otherClientGenerationOptions
Properties
LanguageVersion
The minimum C# version the generated code must compile with.
public LanguageVersion LanguageVersion { get; set; }
Property Value
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
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
Exceptions
- ArgumentException
The serializer is not one of SupportedSerializers.
NamingStrategy()
Builds a NamingStrategy applying the namespace fallbacks.
public NamingStrategy NamingStrategy()