TcHmiJSchemaGenerator.CreateGenerator Method

Creates a TcHmiJSchemaGenerator with the specified parameters.

Namespace:  TcHmiSrv.Core.Tools.DynamicSymbols
Assembly:  TcHmiSrvExtNet.Core (in TcHmiSrvExtNet.Core.dll) Version: 1.3.0.0

Syntax

C#

public static TcHmiJSchemaGenerator CreateGenerator(
    SchemaPropertyOrderHandling schemaPropertyOrderHandling,
    SchemaReferenceHandling schemaReferenceHandling,
    bool required,
    IEnumerable<JSchemaGenerationProvider> generationProviders,
    IContractResolver preContractResolver,
    IContractResolver postContractResolver
)

Parameters

schemaPropertyOrderHandling

Type: SchemaPropertyOrderHandling
The SchemaPropertyOrderHandling that indicates in which order the properties should appear in the generated schema.

schemaReferenceHandling

Type: SchemaReferenceHandling
The SchemaReferenceHandling that indicates which generated schemas can be referenced.

required

Type: System.Boolean
true if all properties in the generated JSON schema are required; otherwise, false.

generationProviders

Type: System.Collections.Generic.IEnumerable.JSchemaGenerationProvider.
An IEnumerable.T. of JSchemaGenerationProviders that are used to customize JSchema generation.

preContractResolver

Type: IContractResolver
An IContractResolver that is used to resolve a JsonContract for a given Type before JsonSchemaContractResolver tries to resolve the JsonContract.

postContractResolver

Type: IContractResolver
An IContractResolver that is used to resolve a JsonContract for a given Type after JsonSchemaContractResolver tried to resolve the JsonContract.

Return Value

Type: TcHmiJSchemaGenerator
A TcHmiJSchemaGenerator with the specified parameters.

Reference

TcHmiJSchemaGenerator Class

TcHmiSrv.Core.Tools.DynamicSymbols Namespace