-
-
Notifications
You must be signed in to change notification settings - Fork 538
CSharpGeneratorSettings
Rico Suter edited this page Oct 4, 2017
·
16 revisions
- Package: NJsonSchema.CodeGeneration
- Settings for: CSharpGenerator
- Class: CSharpGeneratorSettings.cs
Inherits from CodeGeneratorSettingsBase
Properties:
- Namespace: The namespace of the generated classes
- RequiredPropertiesMustBeDefined (default: true)
- DateTimeType (default: DateTime)
- ArrayType (default: ObservableCollection)
- DictionaryType (default: Dictionary)
- ClassStyle: Inpc (default) | Poco
- JsonSerializerSettingsTransformationMethod: (default: null) A method to transform the serializer settings.
JsonSerializerSettingsTransformationMethod
For example, you can implement the following class and set the method to MyNamespace.SerializerSettings.TransformSettings
:
namespace MyNamespace
{
internal static class SerializerSettings
{
public static JsonSerializerSettings TransformSettings(
JsonSerializerSettings settings)
{
settings.DateParseHandling = DateParseHandling.DateTimeOffset;
return settings;
}
}
}