Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }