Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public static object GetCustomPropertyValue(this IAcSmComponent comp, string propName)
        {
            var prop = comp.GetProperty(propName);

            return(prop?.GetValue());
        }