C# Class NSwag.CodeGeneration.CodeGenerators.CSharp.SwaggerToCSharpClientGenerator

Generates the CSharp service client code.
Inheritance: NSwag.CodeGeneration.CodeGenerators.CSharp.SwaggerToCSharpGenerator
Mostrar archivo Open project: NSwag/NSwag Class Usage Examples

Private Properties

Property Type Description
GenerateClientClass string
GetParameterVariableName string

Public Methods

Method Description
GenerateFile ( ) : string

Generates the file.

GenerateFile ( ClientGeneratorOutputType outputType ) : string

Generates the the whole file containing all needed types.

SwaggerToCSharpClientGenerator ( SwaggerDocument document, SwaggerToCSharpClientGeneratorSettings settings ) : System

Initializes a new instance of the SwaggerToCSharpClientGenerator class.

SwaggerToCSharpClientGenerator ( SwaggerDocument document, SwaggerToCSharpClientGeneratorSettings settings, SwaggerToCSharpTypeResolver resolver ) : System

Initializes a new instance of the SwaggerToCSharpClientGenerator class.

Protected Methods

Method Description
ResolveParameterType ( SwaggerParameter parameter ) : string

Resolves the type of the parameter.

Private Methods

Method Description
GenerateClientClass ( string controllerName, string controllerClassName, IList operations, ClientGeneratorOutputType outputType ) : string
GetParameterVariableName ( SwaggerParameter parameter ) : string

Method Details

GenerateFile() public method

Generates the file.
public GenerateFile ( ) : string
return string

GenerateFile() public method

Generates the the whole file containing all needed types.
public GenerateFile ( ClientGeneratorOutputType outputType ) : string
outputType ClientGeneratorOutputType The output type.
return string

ResolveParameterType() protected method

Resolves the type of the parameter.
protected ResolveParameterType ( SwaggerParameter parameter ) : string
parameter SwaggerParameter The parameter.
return string

SwaggerToCSharpClientGenerator() public method

Initializes a new instance of the SwaggerToCSharpClientGenerator class.
is .
public SwaggerToCSharpClientGenerator ( SwaggerDocument document, SwaggerToCSharpClientGeneratorSettings settings ) : System
document SwaggerDocument The Swagger document.
settings SwaggerToCSharpClientGeneratorSettings The settings.
return System

SwaggerToCSharpClientGenerator() public method

Initializes a new instance of the SwaggerToCSharpClientGenerator class.
is .
public SwaggerToCSharpClientGenerator ( SwaggerDocument document, SwaggerToCSharpClientGeneratorSettings settings, SwaggerToCSharpTypeResolver resolver ) : System
document SwaggerDocument The Swagger document.
settings SwaggerToCSharpClientGeneratorSettings The settings.
resolver SwaggerToCSharpTypeResolver The resolver.
return System