protected void finish(SportsStandingsArgumentDivisionalJSON result) { if (fieldGeneratorArgumentType.have_value) { result.setArgumentType(); fieldGeneratorArgumentType.have_value = false; } else if ((!(result.hasArgumentType())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ArgumentType\" field was missing."); } }
protected override void finish() { SportsStandingsArgumentDivisionalJSON result = new SportsStandingsArgumentDivisionalJSON(); Debug.Assert(result != null); finish(result); int extra_count = unknownFieldGenerator.field_names.Count; Debug.Assert(extra_count == unknownFieldGenerator.field_values.Count); for (int extra_num = 0; extra_num < extra_count; ++extra_num) { result.extraSportsStandingsArgumentDivisionalAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); handle_result(result); }
protected override void handle_result(SportsStandingsArgumentDivisionalJSON result) { top.value.Add(result); }
protected override void handle_result(SportsStandingsArgumentDivisionalJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(SportsStandingsArgumentDivisionalJSON new_result);
private void fromJSONArgumentData(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); TypeArgumentData or_result = new TypeArgumentData(); bool or_done = false; if (!or_done) { try { SportsStandingsArgumentWildCardJSON convert_classy = SportsStandingsArgumentWildCardJSON.from_json(json_value, ignore_extras, true); or_result.u.choice0 = convert_classy; or_result.key = 0; or_done = true; } catch (Exception) { } } if (!or_done) { try { SportsSeasonJSON convert_classy = SportsSeasonJSON.from_json(json_value, ignore_extras, true); or_result.u.choice1 = convert_classy; or_result.key = 1; or_done = true; } catch (Exception) { } } if (!or_done) { try { SportsStandingsArgumentConferenceJSON convert_classy = SportsStandingsArgumentConferenceJSON.from_json(json_value, ignore_extras, true); or_result.u.choice2 = convert_classy; or_result.key = 2; or_done = true; } catch (Exception) { } } if (!or_done) { try { SportsStandingsArgumentDivisionalJSON convert_classy = SportsStandingsArgumentDivisionalJSON.from_json(json_value, ignore_extras, true); or_result.u.choice3 = convert_classy; or_result.key = 3; or_done = true; } catch (Exception) { } } if (!or_done) { throw new Exception("The value for field ArgumentData of SportsStandingsArgumentJSON is not one of the allowed values."); } setArgumentData(or_result); switch (or_result.key) { case 0: break; case 1: break; case 2: break; case 3: break; default: Debug.Assert(false); break; } }