Ejemplo n.º 1
0
        public void Error(string id, bool success, string data)
        {
            IRule rule = RulesFactory.FindRule(id, data, this);

            if (rule != null)
            {
                // Force/fake the success flag if a specific validation is disabled
                if (id == "microdata" && !Settings.WESettings.Instance.Html.EnableMicrodataValidation)
                {
                    success = true;
                }

                CreateTask(id, rule, success);
                ErrorList.Tasks.Clear();

                if (_tasks.Count > 0)
                {
                    ErrorList.SuspendRefresh();

                    foreach (string key in _tasks.Keys)
                    {
                        ErrorList.Tasks.Add(_tasks[key]);
                    }

                    ErrorList.ResumeRefresh();
                }
            }
        }
Ejemplo n.º 2
0
        public void Error(string id, bool success, string data)
        {
            IRule rule = RulesFactory.FindRule(id, data, this);

            if (rule != null)
            {
                CreateTask(id, rule, success);
                ErrorList.Tasks.Clear();

                if (_tasks.Count > 0)
                {
                    ErrorList.SuspendRefresh();

                    foreach (string key in _tasks.Keys)
                    {
                        ErrorList.Tasks.Add(_tasks[key]);
                    }

                    ErrorList.ResumeRefresh();
                }
            }
        }