Пример #1
0
        public static ConfigItemProperty <T> AddProperty <T, THolder>(this IConfigItemContainer c, THolder o, Expression <Func <THolder, T> > prop)
        {
            ConfigItemProperty <T> p = new ConfigItemProperty <T>(c.ConfigManager, o, ReflectionHelper.GetPropertyInfo(prop));

            c.Items.Add(p);
            return(p);
        }
Пример #2
0
        public static ConfigItemProperty <T> AddProperty <T, THolder>(this IConfigItemContainer c, string displayName, string description, THolder o, Expression <Func <THolder, T> > prop)
        {
            ConfigItemProperty <T> p = new ConfigItemProperty <T>(c.ConfigManager, o, ReflectionHelper.GetPropertyInfo(o, prop));

            p.DisplayName = displayName;
            p.Description = description;
            c.Items.Add(p);
            return(p);
        }