public override void Validate(List <ErrorInfo> errors) { base.Validate(errors); if (Name.ToLower() == "startstate") { errors.AddError("StartState is reserved", this, () => { Name = Graph.Name + "StartState"; }); } if (StartStateOutputSlot == null) { return; } if (StartStateOutputSlot.OutputTo <StateNode>() == null) { errors.AddError("State Machine requires a start state.", this); } }
public override void Validate(List <ErrorInfo> errors) { base.Validate(errors); if (Name.ToLower() == "startstate") { errors.AddError("StartState is reserved", Identifier, () => { Name = Graph.Name + "StartState"; }); } //if (this.ReferenceOf<PropertiesChildItem>() == null) //{ // errors.AddWarning(string.Format("StateMachine {0} is not used.", Name), this.Identifier); //} if (StartStateOutputSlot == null) { return; } if (StartStateOutputSlot.OutputTo <StateNode>() == null) { errors.AddError("State Machine requires a start state.", this.Identifier); } }