コード例 #1
0
        public virtual PropertyStatus GetPropertyStatus(object obj, string propertyName)
        {
            ObjectStatus objStatus = m_ObjectManager.GetObjectStatus(obj);

            if (objStatus == ObjectStatus.UpForCreation)
            {
                return(PropertyStatus.Dirty);
            }
            if (objStatus == ObjectStatus.Deleted)
            {
                return(PropertyStatus.Deleted);
            }
            if (m_ObjectManager.IsDirtyProperty(obj, propertyName))
            {
                return(PropertyStatus.Dirty);
            }
            if (m_ObjectManager.HasOriginalValues(obj, propertyName))
            {
                return(PropertyStatus.Clean);
            }
            return(PropertyStatus.NotLoaded);
        }