RegisterProperties() public method

Registers all the properties for the specified type. This method can only be called once per type. The PropertyDataManager caches whether it has already registered the properties once.
The is null. The properties are not declared correctly.
public RegisterProperties ( Type type ) : CatelTypeInfo
type System.Type The type to register the properties for.
return CatelTypeInfo
Esempio n. 1
0
        /// <summary>
        /// Initializes all the properties for this object.
        /// </summary>
        private void InitializeProperties()
        {
            var type = GetType();

            var catelTypeInfo = PropertyDataManager.RegisterProperties(type);

            foreach (var propertyDataKeyValuePair in catelTypeInfo.GetCatelProperties())
            {
                var propertyData = propertyDataKeyValuePair.Value;

                InitializeProperty(propertyData);
            }
        }
        /// <summary>
        /// Initializes all the properties for this object.
        /// </summary>
        private void InitializeProperties()
        {
            var type = GetType();

            var catelTypeInfo = PropertyDataManager.RegisterProperties(type);

            foreach (var propertyDataKeyValuePair in catelTypeInfo.GetCatelProperties())
            {
                var propertyData = propertyDataKeyValuePair.Value;

                InitializeProperty(propertyData);
            }

            lock (_initializedTypesLock)
            {
                // No need to check if already existing
                _initializedTypes.Add(type);
            }
        }