static X20Logic() { SerializeMemberAttributes = new Type[] { typeof(SerializeField) }; DontSerializeMemberAttributes = new Type[] { typeof(NonSerializedAttribute) }; CachedGetSerializableMembers = new Func <Type, MemberInfo[]>(type => { var members = X20Reflection.CachedGetMembers(type); var serializableMembers = members.Where(IsSerializableMember).ToArray(); return(serializableMembers); }).Memoize(); }
public X20Logic(FieldPredicate isSerializableField, PropertyPredicate isSerializableProperty) { _IsSerializableField = isSerializableField; _IsSerializableProperty = isSerializableProperty; CachedGetSerializableMembers = new Func <Type, MemberInfo[]>(type => { var members = X20Reflection.CachedGetMembers(type); var serializableMembers = members.Where(IsSerializableMember).ToArray(); return(serializableMembers); }).Memoize(); }