public virtual bool HasChildrens() { if (IsDirty) { RebuildChildrens(); IsDirty = false; } return(Childrens.Any()); }
protected void ClearChildrens() { if (!Childrens.Any()) { return; } if (!HasDummyChild) { UiServices.SetBusyState(); foreach (var c in Childrens.ToList()) { c.Dispose(); } if (Event.SubEventsCount > 0) { Childrens.Add(DummyChild); } } }
public override string ToString() { var result = "{\r\n \"Max\": " + (Max == null ? "null" : Max.ToString().ToLower()) + ",\r\n" + "\"Eval\": " + Eval + ",\r\n" + "\"Choix\": \"" + Choix + "\",\r\n" + "\"Profondeur\": " + Profondeur + ",\r\n" + "\"Childrens\" : ["; if (Childrens != null && Childrens.Any()) { result += "\r\n"; foreach (var item in Childrens) { if (item != Childrens.First()) { result += ","; } result += item.ToString(); } } result += "] \r\n}\r\n"; return(result); }