C# Class TerrificNet.Generator.JsonSchemaCodeGenerator

Inheritance: IJsonSchemaCodeGenerator
显示文件 Open project: namics/TerrificNet Class Usage Examples

Public Methods

Method Description
Compile ( Newtonsoft.Json.Schema.JSchema schema ) : Type
CompileTo ( IEnumerable schemas, Stream stream, string rootNamespace = null ) : void
Generate ( Newtonsoft.Json.Schema.JSchema schema ) : string
JsonSchemaCodeGenerator ( ) : System
JsonSchemaCodeGenerator ( INamingRule namingRule ) : System
WriteTo ( IEnumerable schemas, Stream stream, string rootNamespace = null ) : void

Private Methods

Method Description
CompileToInternal ( IEnumerable schemas, Stream stream, string rootNamespace = null ) : EmitResult
GetRootNamespace ( IEnumerable schemas, string rootNamespace ) : SyntaxList
GetSyntax ( Newtonsoft.Json.Schema.JSchema schema ) : CompilationUnitSyntax
GetSyntaxTree ( IEnumerable schemas, string rootNamespace = null ) : SyntaxTree

Method Details

Compile() public method

public Compile ( Newtonsoft.Json.Schema.JSchema schema ) : Type
schema Newtonsoft.Json.Schema.JSchema
return System.Type

CompileTo() public method

public CompileTo ( IEnumerable schemas, Stream stream, string rootNamespace = null ) : void
schemas IEnumerable
stream Stream
rootNamespace string
return void

Generate() public method

public Generate ( Newtonsoft.Json.Schema.JSchema schema ) : string
schema Newtonsoft.Json.Schema.JSchema
return string

JsonSchemaCodeGenerator() public method

public JsonSchemaCodeGenerator ( ) : System
return System

JsonSchemaCodeGenerator() public method

public JsonSchemaCodeGenerator ( INamingRule namingRule ) : System
namingRule INamingRule
return System

WriteTo() public method

public WriteTo ( IEnumerable schemas, Stream stream, string rootNamespace = null ) : void
schemas IEnumerable
stream Stream
rootNamespace string
return void