Beispiel #1
0
        public PersistentProperty(PersistentObject persistentObject, string propertyPath)
        {
            Debug.Assert(persistentObject != null, "PersistentObject can not be null.");
            Debug.Assert(!string.IsNullOrEmpty(propertyPath), "Property path is not specified.");
            mPersistentObject = persistentObject;
            mPropertyPath     = propertyPath;
            mMemberPath       = CoreUtil.FindMemberPath(persistentObject.type, propertyPath);
            foreach (var mi in mMemberPath)
            {
                if (mi.MemberType == MemberTypes.Property)
                {
                    Debug.Assert(((PropertyInfo)mi).CanRead);
                }
            }

            mType = CoreUtil.GetMemberType(memberInfo);
        }