private void _printCauseToken(Place place, Token token) { Func <int, string> spaces = null; spaces = (len) => len > 1 ? spaces(len - 1) + " " : " "; Console.WriteLine(place.ToString() + "(" + place.Count + ")\n " + token.toString( spaces(3) ) ); }
public static void dispatchToken(Token token) { ApiPlace api_place = null; if (api_places_mapping.TryGetValue(token.apiCallName, out api_place)) { api_place.putToken(token); } else { throw new Exception("Can not find API place_for the API call arrived:\n " + token.toString("----")); } }