-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix STJ inheritance, closes RicoSuter/NSwag#3871
- Loading branch information
Showing
3 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/NJsonSchema.CodeGeneration.CSharp/Models/JsonInheritanceConverterTemplateModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="JsonInheritanceConverterTemplateModel.cs" company="NJsonSchema"> | ||
// Copyright (c) Rico Suter. All rights reserved. | ||
// </copyright> | ||
// <license>https://github.com/RicoSuter/NJsonSchema/blob/master/LICENSE.md</license> | ||
// <author>Rico Suter, mail@rsuter.com</author> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace NJsonSchema.CodeGeneration.CSharp.Models | ||
{ | ||
/// <summary>The JsonInheritanceConverterTemplateModel.</summary> | ||
public class JsonInheritanceConverterTemplateModel | ||
{ | ||
private readonly CSharpGeneratorSettings _settings; | ||
|
||
/// <summary>The DateFormatConverterTemplateModel.</summary> | ||
public JsonInheritanceConverterTemplateModel(CSharpGeneratorSettings settings) | ||
{ | ||
_settings = settings; | ||
} | ||
|
||
/// <summary>Gets a value indicating whether to use System.Text.Json</summary> | ||
public bool UseSystemTextJson => _settings.JsonLibrary == CSharpJsonLibrary.SystemTextJson; | ||
} | ||
} |