Example #1
0
        public void AddState(TState stateId, IState stateObj)
        {
            ValidateDoesNotContainsStateId(stateId);
            ValidateStateObjectIsNotNull(stateObj);

            var node = new StateHierarchyNode(stateId, stateObj, _stateComparer);

            _states.Add(stateId, node);
            _roots.Add(stateId, node);

            if (StateCount == 1)
            {
                InitialState = stateId;
            }
        }
Example #2
0
 private bool HasParent(StateHierarchyNode node)
 {
     return(node.Parent != null);
 }