Esempio n. 1
0
 protected void finish(SportsOlympicsEventSchedulesAndResultsInformationNuggetJSON result)
 {
     if (fieldGeneratorQueryComponents.have_value)
     {
         result.initQueryComponents();
         int count = fieldGeneratorQueryComponents.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendQueryComponents(fieldGeneratorQueryComponents.value[num]);
         }
         fieldGeneratorQueryComponents.value.Clear();
         fieldGeneratorQueryComponents.have_value = false;
     }
     else if ((!(result.hasQueryComponents())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"QueryComponents\" field was missing.");
     }
     if (fieldGeneratorQueryResults.have_value)
     {
         result.initQueryResults();
         int count = fieldGeneratorQueryResults.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendQueryResults(fieldGeneratorQueryResults.value[num]);
         }
         fieldGeneratorQueryResults.value.Clear();
         fieldGeneratorQueryResults.have_value = false;
     }
     else if ((!(result.hasQueryResults())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"QueryResults\" field was missing.");
     }
     if (fieldGeneratorEventInstances.have_value)
     {
         result.initEventInstances();
         int count = fieldGeneratorEventInstances.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendEventInstances(fieldGeneratorEventInstances.value[num]);
         }
         fieldGeneratorEventInstances.value.Clear();
         fieldGeneratorEventInstances.have_value = false;
     }
     base.finish(result);
 }
Esempio n. 2
0
        protected override void finish()
        {
            if (!(getSportsOlympicsInformationNuggetJSONKey().Equals("SportsOlympicsEventSchedulesAndResultsInformationNugget")))
            {
                throw new Exception("The key field has a value other than `SportsOlympicsEventSchedulesAndResultsInformationNugget'.");
            }
            SportsOlympicsEventSchedulesAndResultsInformationNuggetJSON result = new SportsOlympicsEventSchedulesAndResultsInformationNuggetJSON();

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