Dictionary string List string stateConversions new Dictionary string L

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
Dictionary<string, List<string>> stateConversions = new Dictionary<string, List<string>>();
stateConversions.Add("Enclosed", new List<string> { "AwaitingActivation" });
stateConversions.Add("Active", new List<string> { "Frozen", "Cancellation", "Violation" });
stateConversions.Add("AwaitingActivation", new List<string> { "Active" });
stateConversions.Add("Frozen", new List<string> { "Active" });
stateConversions.Add("Cancellation", new List<string> { "Active", "Cancelled" });
if (stateConversions[CurState.First()].Contains(newState.Name))
{
return true;
}
else
{
return false;
}