Changeset 3205 for trunk/sources
- Timestamp:
- 03/23/10 14:13:58 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs
r3031 r3205 42 42 } 43 43 44 public static bool IsEmptyOrStorableType(Type type, bool recusrive) { 45 if (IsEmptyType(type, recusrive)) return true; 46 if (!HasStorableClassAttribute(type)) return false; 47 return !recusrive || type.BaseType == null || IsEmptyOrStorableType(type.BaseType, true); 44 public static bool IsEmptyOrStorableType(Type type, bool recursive) { 45 if (!HasStorableClassAttribute(type) && !IsEmptyType(type, false)) return false; 46 return !recursive || type.BaseType == null || IsEmptyOrStorableType(type.BaseType, true); 48 47 } 49 48 … … 77 76 foreach (MemberInfo memberInfo in type.GetMembers(DECLARED_INSTANCE_MEMBERS)) { 78 77 if ((memberInfo.MemberType & memberTypes) == memberInfo.MemberType && 79 !memberInfo.Name.StartsWith("<") && 78 !memberInfo.Name.StartsWith("<") && 80 79 !memberInfo.Name.EndsWith("k__BackingField")) 81 80 storableMembers.Add(new StorableMemberInfo(memberInfo)); … … 133 132 .GetCustomAttributes(typeof(StorableClassAttribute), false) 134 133 .SingleOrDefault(); 135 } 134 } 136 135 137 136 private static bool HasStorableClassAttribute(Type type) { … … 152 151 private static bool IsModifiableMember(MemberInfo memberInfo) { 153 152 return memberInfo.MemberType == MemberTypes.Field && IsModifiableField((FieldInfo)memberInfo) || 154 153 memberInfo.MemberType == MemberTypes.Property && IsModifiableProperty((PropertyInfo)memberInfo); 155 154 } 156 155
Note: See TracChangeset
for help on using the changeset viewer.