castleproject / Core

Castle Core, including Castle DynamicProxy, Logging Services and DictionaryAdapter
http://www.castleproject.org/
Other
2.2k stars 467 forks source link

Enable replication of nested custom attribute types #639

Closed stakx closed 1 year ago

stakx commented 1 year ago

Fixes #638.

TL;DR, this boils down to the following change:

 private static bool ShouldSkipAttributeReplication(Type attribute, bool ignoreInheritance)
 {
-    if (attribute.IsPublic == false)
+    if (attribute.IsPublic == false && attribute.IsNestedPublic == false)
 ...
stakx commented 1 year ago

I am going to merge this without any further review, as it's a pretty straightforward change.