Skip to content

Commit c8cb68f

Browse files
author
Caitlin Bales (MSFT)
authored
Merge pull request #97 from PetRich-MSFT/SetDerivedTypeConverterOnCompleType
Add the DerivedTypeConverter to base class for Complex Types
2 parents 17442ce + 5b405ff commit c8cb68f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Templates/CSharp/Model/ComplexType.cs.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ var classType = complex.IsAbstract ? "abstract partial class" : "partial class";
1818
var attributeStringBuilder = new StringBuilder();
1919
attributeStringBuilder.Append("[JsonObject(MemberSerialization = MemberSerialization.OptIn)]");
2020

21-
// We only want to add the derived type converter to the concrete class at the top of the inheritance hierarchy
22-
if (!complex.IsAbstract && complex.Derived != null && (complex.Base == null || complex.Base.IsAbstract))
21+
// We only want to add the derived type converter to the class at the top of the inheritance hierarchy
22+
if (complex.Derived != null && complex.Base == null)
2323
{
2424
attributeStringBuilder.Append(Environment.NewLine);
2525
attributeStringBuilder.Append(" ");

0 commit comments

Comments
 (0)