Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }