When using the is-public() function to disable renaming on public elements of an Application, it fails on the following class:
public class MyClass
{
public delegate void MyDelegate();
public class MyNestedClass
{
}
}
with the log:
[ERROR] Unknown error occurred.
Exception: System.NotSupportedException: Specified method is not supported.
at Confuser.Core.Project.Patterns.IsPublicFunction.Evaluate(IDnlibDef definition) in c:\projects\confuserex\Confuser.Core\Project\Patterns\IsPublicFunction.cs:line 43
at Confuser.Core.Marker.ApplyRules(ConfuserContext context, IDnlibDef target, Dictionary`2 rules) in c:\projects\confuserex\Confuser.Core\Marker.cs:line 189
at Confuser.Core.Marker.MarkProject(ConfuserProject proj, ConfuserContext context) in c:\projects\confuserex\Confuser.Core\Marker.cs:line 126
at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in c:\projects\confuserex\Confuser.Core\ConfuserEngine.cs:line 123
Failed at 12:51, 0:00 elapsed.
I solved this issue by adding support for TypeDef in IsPublicFunction.Evaluate(...) with:
if (member is TypeDef)
return ((TypeDef)member).IsPublic || ((TypeDef)member).IsNestedPublic;
When using the
is-public()
function to disable renaming on public elements of an Application, it fails on the following class:with the log:
I solved this issue by adding support for
TypeDef
inIsPublicFunction.Evaluate(...)
with: