Skip to content

Commit af9a8ab

Browse files
author
Shoaib Shakeel
committed
no-commit-message-savepoint
1 parent 3616598 commit af9a8ab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
Enhancements:
66
- Two new generic method overloads `proxyGenerator.CreateClassProxy<TClass>([options], constructorArguments, interceptors)` (@backstromjoel, #636)
7+
- Allow specifying which attributes should always be copied to proxy class by adding attribute type to `AttributesToAlwaysReplicate`. Previously only non-inherited, with `Inherited=false`, attributes were copied. (@shoaibshakeel381, #633)
78

89
## 5.1.1 (2022-12-30)
910

src/Castle.Core/DynamicProxy/Generators/AttributesToAlwaysReplicate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static bool Contains(Type attribute)
5353

5454
internal static bool ShouldAdd(Type attribute)
5555
{
56-
return attributes.Any(attr => attr == attribute);
56+
return attributes.Any(attr => attr.IsAssignableFrom(attribute));
5757
}
5858
}
5959
}

0 commit comments

Comments
 (0)