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

A resolver which returns Exception without generating the class (uses System.Exception instead of own class).
Inheritance: CSharpTypeResolver
ファイルを表示 Open project: NSwag/NSwag Class Usage Examples

Public Methods

Method Description
CreateWithDefinitions ( NJsonSchema.CodeGeneration.CSharp.CSharpGeneratorSettings settings, JsonSchema4>.IDictionary definitions ) : SwaggerToCSharpTypeResolver

Creates a new resolver, adds the given schema definitions and registers an exception schema if available.

Resolve ( NJsonSchema.JsonSchema4 schema, bool isNullable, string typeNameHint ) : string

Resolves and possibly generates the specified schema.

SwaggerToCSharpTypeResolver ( NJsonSchema.CodeGeneration.CSharp.CSharpGeneratorSettings settings, NJsonSchema.JsonSchema4 exceptionSchema ) : System.Collections.Generic

Initializes a new instance of the CSharpTypeResolver class.

Method Details

CreateWithDefinitions() public static method

Creates a new resolver, adds the given schema definitions and registers an exception schema if available.
public static CreateWithDefinitions ( NJsonSchema.CodeGeneration.CSharp.CSharpGeneratorSettings settings, JsonSchema4>.IDictionary definitions ) : SwaggerToCSharpTypeResolver
settings NJsonSchema.CodeGeneration.CSharp.CSharpGeneratorSettings The settings.
definitions JsonSchema4>.IDictionary The definitions.
return SwaggerToCSharpTypeResolver

Resolve() public method

Resolves and possibly generates the specified schema.
public Resolve ( NJsonSchema.JsonSchema4 schema, bool isNullable, string typeNameHint ) : string
schema NJsonSchema.JsonSchema4 The schema.
isNullable bool Specifies whether the given type usage is nullable.
typeNameHint string The type name hint to use when generating the type and the type name is missing.
return string

SwaggerToCSharpTypeResolver() public method

Initializes a new instance of the CSharpTypeResolver class.
public SwaggerToCSharpTypeResolver ( NJsonSchema.CodeGeneration.CSharp.CSharpGeneratorSettings settings, NJsonSchema.JsonSchema4 exceptionSchema ) : System.Collections.Generic
settings NJsonSchema.CodeGeneration.CSharp.CSharpGeneratorSettings The generator settings.
exceptionSchema NJsonSchema.JsonSchema4 The exception type schema.
return System.Collections.Generic