From 0a8a2237c49716c8867271fc0cdb563efc980b49 Mon Sep 17 00:00:00 2001 From: Andrei Dreyer Date: Wed, 27 Mar 2024 12:47:47 +0200 Subject: [PATCH] Added designation to propsToAllow (#25) --- DotNetAstGen/SyntaxNodePropertiesResolver.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DotNetAstGen/SyntaxNodePropertiesResolver.cs b/DotNetAstGen/SyntaxNodePropertiesResolver.cs index ffc0c47..172e703 100644 --- a/DotNetAstGen/SyntaxNodePropertiesResolver.cs +++ b/DotNetAstGen/SyntaxNodePropertiesResolver.cs @@ -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 _regexToAllow = new(new[] @@ -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; } }