示例#1
0
        public override void Validate(List <ErrorInfo> errors)
        {
            base.Validate(errors);

            if (IsStruct && DerivedNodes.Any())
            {
                errors.AddError("Struct SimpleClass cannot have derived nodes", this);
            }
        }
示例#2
0
        public override void Validate(List <ErrorInfo> errors)
        {
            base.Validate(errors);

            if (IsStruct && DerivedNodes.Any())
            {
                errors.AddError("Struct Command cannot have derived nodes", this);
            }

            if (this.ReferenceOf <CommandsChildItem>() == null && !DerivedNodes.Any())
            {
                errors.AddError("This node must be linked to a Element Command or have derived nodes, if you want a generic command use a 'SimpleClass'.", this);
            }
        }