示例#1
0
        public static void SetCustomPropertyValue(this IAcSmComponent comp, string propName, object value)
        {
            var prop = comp.GetProperty(propName);

            if (prop == null)
            {
                throw new KeyNotFoundException($"Не найден параметр '{propName}'");
            }

            prop.SetValue(value);
        }
示例#2
0
        public static object GetCustomPropertyValue(this IAcSmComponent comp, string propName)
        {
            var prop = comp.GetProperty(propName);

            return(prop?.GetValue());
        }