private void fromJSONTeams(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); JSONArrayValue json_array1 = json_value.array_value(); if (json_array1 == null) { throw new Exception("The value for field Teams of SportsSeriesStatusJSON is not an array."); } int count1 = json_array1.componentCount(); if (count1 < 2) { throw new Exception("The value for field Teams of SportsSeriesStatusJSON has too few elements."); } List <SportsTeamJSON> vector_Teams1 = new List <SportsTeamJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { SportsTeamJSON convert_classy = SportsTeamJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_Teams1.Add(convert_classy); } Debug.Assert(vector_Teams1.Count >= 2); initTeams(); for (int num1 = 0; num1 < vector_Teams1.Count; ++num1) { appendTeams(vector_Teams1[num1]); } for (int num1 = 0; num1 < vector_Teams1.Count; ++num1) { } }
public void appendTeams(SportsTeamJSON to_append) { if (!flagHasTeams) { flagHasTeams = true; storeTeams.Clear(); } Debug.Assert(flagHasTeams); storeTeams.Add(to_append); }