public IEnumerable <Guid> GetInheritanceTree(StateDefinition def) { List <Guid> result = new List <Guid>(); GetInheritanceTree(def, result); return(result); }
public void GetInheritanceTree(StateDefinition def, List <Guid> result) { result.Add(def.Guid); foreach (StateDefinition state in States.Where(x => x.ParentGuid == def.Guid)) { GetInheritanceTree(state, result); } }
public static StateDefinition Default() { StateDefinition s; s = new StateDefinition(); s.Guid = Guid.NewGuid(); s.Enabled = true; return(s); }