Skip to content

Commit

Permalink
Added designation to propsToAllow (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDreyer authored Mar 27, 2024
1 parent e9dd6de commit 0a8a223
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DotNetAstGen/SyntaxNodePropertiesResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class SyntaxNodePropertiesResolver : DefaultContractResolver
"Modifiers", "ReturnType", "IsUnboundGenericName", "Default", "IsConst", "Types",
"ExplicitInterfaceSpecifier", "MetaData", "Kind", "AstRoot", "FileName", "Code", "Operand", "Block",
"Catches", "Finally", "Keyword", "Incrementors", "Sections", "Pattern", "Labels", "Elements" ,"WhenTrue",
"WhenFalse", "Initializers", "NameEquals", "Contents", "Attributes"
"WhenFalse", "Initializers", "NameEquals", "Contents", "Attributes", "Designation"
});

private readonly List<string> _regexToAllow = new(new[]
Expand Down Expand Up @@ -63,6 +63,7 @@ protected override JsonProperty CreateProperty(MemberInfo member, MemberSerializ
!MatchesIgnore(propertyName);
Logger?.LogDebug(shouldSerialize ? $"Allowing {propertyName}" : $"Ignoring {propertyName}");
property.ShouldSerialize = _ => shouldSerialize;
// property.ShouldSerialize = _ => true;
return property;
}
}
Expand Down

0 comments on commit 0a8a223

Please sign in to comment.