Пример #1
0
        protected bool CanExecute(IPluginContext context)
        {
            var canExecute = true;
            if (context.IsCreate() || context.IsUpdate())
            {
                var target = context.GetInputParameter<Entity>(InputParameters.Target);

                if (target.Contains("pchmcs_disableplugins") && target.GetAttributeValue<bool>("pchmcs_disableplugins"))
                {
                    canExecute = false;
                }
            }

            return canExecute;
        }