CSharpGeneratorSettings Class

Summary

Settings to further control the C# generation process
Assembly
Cake.NSwag.dll
Namespace
Cake.NSwag.Settings
Base Types
graph BT Type-->Base0["GeneratorSettings"] click Base0 "/api/Cake.NSwag.Settings/GeneratorSettings" Base0-->Base1["Object"] Type["CSharpGeneratorSettings"] class Type type-node

Syntax

public class CSharpGeneratorSettings : GeneratorSettings

Properties

Name Value Summary
BaseClass string
Gets or sets the base class to use for the generated client
ClientSettings ClientGeneratorBaseSettings
Container for operation-specific settings used when generating client libraries.
Inherited from GeneratorSettings
ControllerSettings ControllerGeneratorBaseSettings
Container for operation-specific settings used when generating controller code.
Inherited from GeneratorSettings
GenerateInterfaces bool
Gets or sets a value indicating whether to generate interfaces for the client code.
JsonSettings JsonSchemaGeneratorSettings
Container for operation-specific settings used when generating JSON schemas, including Swagger specifications.
Inherited from GeneratorSettings
Namespaces List<string>
Gets or sets a collection of additional namespace usages

Methods

Name Value Summary
WithSettings(ClientGeneratorBaseSettings) GeneratorSettings
Specifies operation-specific settings for generating client code.
Inherited from GeneratorSettings
WithSettings(ControllerGeneratorBaseSettings) GeneratorSettings
Specificies operation-specific settings for generating controller code
Inherited from GeneratorSettings
WithSettings(JsonSchemaGeneratorSettings) GeneratorSettings
Specifies operation-specific settings for generating JSON schemas, including Swagger specifications.
Inherited from GeneratorSettings

Extension Methods

Name Value Summary
AddNamespace(string) CSharpGeneratorSettings
Adds an additional namespace usage
Requires the Cake.NSwag addin
Dump<CSharpGeneratorSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
EnableInterfaces() CSharpGeneratorSettings
Enables generating interfaces when generating the client
Requires the Cake.NSwag addin
IsIn<CSharpGeneratorSettings>(CSharpGeneratorSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<CSharpGeneratorSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<CSharpGeneratorSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
SetBaseClass(string) CSharpGeneratorSettings
Sets the base class for the generated code
Requires the Cake.NSwag addin
ThrowIfNull<CSharpGeneratorSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<CSharpGeneratorSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin