- Timestamp:
- 03/12/10 10:43:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs
r2994 r3010 46 46 } 47 47 48 private static readonly BindingFlags instanceMembers =49 BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public ;48 private static readonly BindingFlags declaredInstanceMembers = 49 BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly; 50 50 51 51 private static readonly object[] emptyArgs = new object[] { }; … … 79 79 } 80 80 81 private static IEnumerable<MethodInfo> CollectHooks(HookType hookType, Type type) { 82 foreach (MemberInfo memberInfo in type.GetMembers(instanceMembers)) { 81 private static IEnumerable<MethodInfo> CollectHooks(HookType hookType, Type type) { 82 if (type.BaseType != null) 83 foreach (var mi in CollectHooks(hookType, type.BaseType)) 84 yield return mi; 85 foreach (MemberInfo memberInfo in type.GetMembers(declaredInstanceMembers)) { 83 86 foreach (StorableHookAttribute hook in memberInfo.GetCustomAttributes(typeof(StorableHookAttribute), false)) { 84 87 if (hook != null && hook.HookType == hookType) {
Note: See TracChangeset
for help on using the changeset viewer.