コード例 #1
0
        public bool Validate(T data)
        {
            var results = RootRule.Validate(data).Where(r => !r.IsPositive);

            ValidationResult = results.Any() ? new ValidationResult(results) : ValidationResult.Empty;

            return(ValidationResult.IsValid);
        }
コード例 #2
0
        public RuleTreeController(TreeView nodeTree)
        {
            _nodeTree = nodeTree;

            InitializeIconRegistry();
            ShowVirtualRoot = true;

            _rootData = new RootRule();

            RefreshTree();
        }