-
-
Notifications
You must be signed in to change notification settings - Fork 539
CSharpGenerator
Rico Suter edited this page May 14, 2016
·
11 revisions
Package: NJsonSchema.CodeGeneration
The CSharpGenerator
class generates C# DTO classes from a given JSON Schema:
var schema = JsonSchema4.FromType<Person>();
var settings = new CSharpGeneratorSettings();
var generator = new CSharpGenerator(schema, settings);
var code = generator.GenerateFile();
Class: CSharpGeneratorSettings
Properties:
- Namespace: The namespace of the generated classes
- RequiredPropertiesMustBeDefined (default: true)
- DateTimeType (default: DateTime)
- ArrayType (default: ObservableCollection)
- DictionaryType (default: Dictionary)
- ClassStyle: Inpc (default) | Poco