Пример #1
0
        internal Property CreateProperty(String type, String name, String group, String text)
        {
            IPropertyCreator creator = null;

            this.propertyCreators.TryGetValue(type, out creator);

            if (null == creator)
            {
                return(null);
            }

            return(creator.CreateProperty(name, group, text));
        }
Пример #2
0
        /// <summary>
        /// Registers property creator. Use IPropertyCreatorTemplate class.
        /// </summary>
        /// <param name="creator">creator.</param>
        /// <param name="type">property type.</param>
        public void RegisterPropertyCreator(IPropertyCreator creator, String type)
        {
            IPropertyCreator ex = null;

            if (true == this.propertyCreators.TryGetValue(type, out ex))
            {
                throw new Exception("Property creator already exists");
            }

            if (null != creator)
            {
                this.propertyCreators[type] = creator;
            }
        }
Пример #3
0
 internal SettingsClassGenerator(ITypePropertiesExtractor typePropertiesExtractor,
                                 IPropertyCreator propertyCreator)
 {
     _typePropertiesExtractor = typePropertiesExtractor;
     _propertyCreator         = propertyCreator;
 }