-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSharpClientGeneratorSettings
Rico Suter edited this page Jun 6, 2019
·
5 revisions
- Package: NSwag.CodeGeneration.CSharp
- Class: CSharpClientGeneratorSettings.cs
Inherits CSharpGeneratorBaseSettings
Properties:
- ClientBaseClass: Full name of the base class
-
ConfigurationClass: Specifies the name of the configuration class (see below, requires setting the
ClientBaseClass) - GenerateExceptionClasses
- ExceptionClass: The name of the generated exception classes (supports the {controller} placeholder
- InjectHttpClient: Inject the HttpClient via constructor so that its lifetime can be handled externally
- DisposeHttpClient
- ProtectedMethods
- UseHttpClientCreationMethod: Indicates whether to call CreateHttpClientAsync on the base class to create a new HttpClient instance (ClientBaseClass must be defined).
-
UseHttpRequestMessageCreationMethod: Indicates whether to call
CreateHttpRequestMessageAsyncon the base class to create a newHttpRequestMessage(ClientBaseClass must be defined). - WrapDtoExceptions
- ClientClassAccessModifier
- UseBaseUrl
- GenerateBaseUrlProperty
- GenerateSyncMethods
- HttpClientType
- ParameterDateTimeFormat
- GenerateUpdateJsonSerializerSettingsMethod
-
SerializeTypeInformation: Indicates whether the generated client will automatically use
TypeNameHandling.Autoproperty of theNewtonsoft.Jsonserializer. Furthermore, this option will update the generated client code for the correct use of the property. For more information about the property see: Newtonsoft.Json documentation - QueryNullValue
- ExposeJsonSerializerSettings