public Substate CreateSubstate(string nameArg) { if (ContainSubstateName(nameArg)) { return(null); } Substate sub = new Substate(nameArg); substates.Add(sub); return(sub); }
public void QuickBindSubstate(string stateName, params string[] substateNames) { State state = GetState(stateName); if (state == null) { return; } foreach (string ssn in substateNames) { Substate sub = GetSubstate(ssn); if (sub == null) { sub = CreateSubstate(ssn); } state.AddSubstate(sub.name); } }