public override int Validate() { if (RightChild == null) { FunctionGraphValidationMessageLogger.LogError("Right child is not defined"); return(1); } else { int ret = RightChild.Validate(); if (ret > 0) { return(ret); } } if (LeftChild == null) { FunctionGraphValidationMessageLogger.LogError("Left child is not defined"); return(1); } else { int ret = LeftChild.Validate(); if (ret > 0) { return(ret); } } return(ValidateSelf()); }
public override int Validate() { if (Child == null) { FunctionGraphValidationMessageLogger.LogError("No Child defined"); return(1); } return(ValidateSelf()); }
public int ValidateGraph(ILogger l) { FunctionGraphValidationMessageLogger.Mode = FunctionGraphValidationMessageLogger.LoggerMode.NotificationNoCollect; FunctionGraphValidationMessageLogger.RegisterForMessageNotifications((m) => m.Log(l)); if (RootNode == null) { FunctionGraphValidationMessageLogger.LogError("No Root Node defined!"); return(1); } return(RootNode.Validate()); }
public override int Validate() { for (int i = 0; i < childNodes.Length; i++) { if (childNodes[i] == null) { FunctionGraphValidationMessageLogger.LogError($"Child {i} is undefined"); return(1); } int ret = childNodes[i].Validate(); if (ret > 0) { return(ret); } } return(ValidateSelf()); }
public override int Validate() { if (children == null || children.Count == 0) { FunctionGraphValidationMessageLogger.LogError("There are no children defined"); } else { for (int i = children.Count - 1; i >= 0; i--) { if (children[i] == null) { children.RemoveAt(i); continue; } int ret = children[i].Validate(); if (ret > 0) { return(ret); } } } return(ValidateSelf()); }