Esempio n. 1
0
 protected void finish(SportsStandingsArgumentWildCardJSON 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.");
     }
 }
Esempio n. 2
0
        protected override void finish()
        {
            SportsStandingsArgumentWildCardJSON result = new SportsStandingsArgumentWildCardJSON();

            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.extraSportsStandingsArgumentWildCardAppendPair(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);
        }
Esempio n. 3
0
    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;
        }
    }
Esempio n. 4
0
 protected override void handle_result(SportsStandingsArgumentWildCardJSON result)
 {
     top.value.Add(result);
 }
Esempio n. 5
0
        protected override void handle_result(SportsStandingsArgumentWildCardJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Esempio n. 6
0
 protected abstract void handle_result(SportsStandingsArgumentWildCardJSON new_result);