C# Класс NSwag.CodeGeneration.CodeGenerators.TypeScript.SwaggerToTypeScriptClientGenerator

Generates the CSharp service client code.
Наследование: ClientGeneratorBase
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AppendExtensionClassIfNecessary string
GenerateClientClass string
GenerateFile string
GetClassName string
GetExceptionType string
GetResultType string
GetType string
UpdateUseDtoClassAndDataConversionCodeProperties void

Открытые методы

Метод Описание
GenerateFile ( ) : string

Generates the file.

SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings ) : System

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.

SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings, TypeScriptTypeResolver resolver ) : System

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.

Защищенные методы

Метод Описание
ResolveParameterType ( SwaggerParameter parameter ) : string

Resolves the type of the parameter.

Приватные методы

Метод Описание
AppendExtensionClassIfNecessary ( string controllerName, string code ) : string
GenerateClientClass ( string controllerName, string controllerClassName, IList operations, ClientGeneratorOutputType outputType ) : string
GenerateFile ( string clientCode, IEnumerable clientClasses, ClientGeneratorOutputType outputType ) : string
GetClassName ( string className ) : string
GetExceptionType ( SwaggerOperation operation ) : string
GetResultType ( SwaggerOperation operation ) : string
GetType ( NJsonSchema.JsonSchema4 schema, bool isNullable, string typeNameHint ) : string
UpdateUseDtoClassAndDataConversionCodeProperties ( IEnumerable operations ) : void

Описание методов

GenerateFile() публичный Метод

Generates the file.
public GenerateFile ( ) : string
Результат string

ResolveParameterType() защищенный Метод

Resolves the type of the parameter.
protected ResolveParameterType ( SwaggerParameter parameter ) : string
parameter SwaggerParameter The parameter.
Результат string

SwaggerToTypeScriptClientGenerator() публичный Метод

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.
is .
public SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings ) : System
document SwaggerDocument The Swagger document.
settings SwaggerToTypeScriptClientGeneratorSettings The settings.
Результат System

SwaggerToTypeScriptClientGenerator() публичный Метод

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.
is .
public SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings, TypeScriptTypeResolver resolver ) : System
document SwaggerDocument The Swagger document.
settings SwaggerToTypeScriptClientGeneratorSettings The settings.
resolver TypeScriptTypeResolver The resolver.
Результат System