Exemple #1
0
        private void _LoadProperty(SoulProxy new_soul)
        {
            IEnumerable <PropertyInfo> propertys = new_soul.PropertyInfos;
            MemberMap map = _Protocol.GetMemberMap();

            foreach (PropertyInfo property in propertys)
            {
                int id = map.GetProperty(property);

                if (property.PropertyType.GetInterfaces().Any(t => t == typeof(IDirtyable)))
                {
                    object propertyValue = property.GetValue(new_soul.ObjectInstance);

                    IAccessable accessable = propertyValue as IAccessable;
                    _LoadProperty(new_soul.Id, id, accessable.Get());
                }
            }
        }
Exemple #2
0
        private void _LoadProperty(Soul new_soul)
        {
            PropertyInfo[] propertys = new_soul.ObjectType.GetProperties(BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public);
            MemberMap      map       = _Protocol.GetMemberMap();

            for (int i = 0; i < propertys.Length; ++i)
            {
                PropertyInfo property = propertys[i];
                int          id       = map.GetProperty(property);

                if (property.PropertyType.GetInterfaces().Any(t => t == typeof(IDirtyable)))
                {
                    object propertyValue = property.GetValue(new_soul.ObjectInstance);

                    IAccessable accessable = propertyValue as IAccessable;
                    _LoadProperty(new_soul.Id, id, accessable.Get());
                }
            }
        }