コード例 #1
0
        /// <summary>
        /// Loads child objects from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        internal void FetchChildren(SafeDataReader dr)
        {
            dr.NextResult();
            var propertyFriendlyNameColl = PropertyFriendlyNameColl.GetPropertyFriendlyNameColl(dr);

            propertyFriendlyNameColl.LoadItems((PropertyConfigurationColl)Parent);
        }
コード例 #2
0
        /// <summary>
        /// Factory method. Loads a <see cref="PropertyConfiguration"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        /// <returns>A reference to the fetched <see cref="PropertyConfiguration"/> object.</returns>
        internal static PropertyConfiguration GetPropertyConfiguration(SafeDataReader dr)
        {
            PropertyConfiguration obj = new PropertyConfiguration();

            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(FriendlyNamesProperty, PropertyFriendlyNameColl.NewPropertyFriendlyNameColl());
            obj.MarkOld();
            // check all object rules and property rules
            obj.BusinessRules.CheckRules();
            return(obj);
        }