public StateMachineState AddState(string id)
        {
            if (id == null) throw new ArgumentNullException(nameof(id));

            var state = new StateMachineState(id, this);
            States.Add(state);
            return state;
        }
        public StateMachineState AddState(string id)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            var state = new StateMachineState(id, this);

            States.Add(state);
            return(state);
        }