示例#1
0
        public IEnumerable <Guid> GetInheritanceTree(StateDefinition def)
        {
            List <Guid> result = new List <Guid>();

            GetInheritanceTree(def, result);
            return(result);
        }
示例#2
0
        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);
        }