Beispiel #1
0
        protected override void finish()
        {
            SunriseSunsetTimeConversationStateJSON result = new SunriseSunsetTimeConversationStateJSON();

            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.extraSunriseSunsetTimeConversationStateAppendPair(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);
        }
Beispiel #2
0
 protected abstract void handle_result(SunriseSunsetTimeConversationStateJSON new_result);
Beispiel #3
0
 protected void finish(SunriseSunsetTimeConversationStateJSON result)
 {
     if (fieldGeneratorDateAndTimeKind.have_value)
     {
         result.setDateAndTimeKind();
         fieldGeneratorDateAndTimeKind.have_value = false;
     }
     else if ((!(result.hasDateAndTimeKind())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DateAndTimeKind\" field was missing.");
     }
     if (fieldGeneratorMapLocation.have_value)
     {
         result.setMapLocation(fieldGeneratorMapLocation.value);
         fieldGeneratorMapLocation.have_value = false;
     }
     else if ((!(result.hasMapLocation())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"MapLocation\" field was missing.");
     }
     if (fieldGeneratorRequestedType.have_value)
     {
         result.setRequestedType(fieldGeneratorRequestedType.value);
         fieldGeneratorRequestedType.have_value = false;
     }
     else if ((!(result.hasRequestedType())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"RequestedType\" field was missing.");
     }
     if (fieldGeneratorDateTimeRangeSpec.have_value)
     {
         result.setDateTimeRangeSpec(fieldGeneratorDateTimeRangeSpec.value);
         fieldGeneratorDateTimeRangeSpec.have_value = false;
     }
     else if ((!(result.hasDateTimeRangeSpec())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DateTimeRangeSpec\" field was missing.");
     }
     if (fieldGeneratorIsDateTimeRequested.have_value)
     {
         result.setIsDateTimeRequested(fieldGeneratorIsDateTimeRequested.value);
         fieldGeneratorIsDateTimeRequested.have_value = false;
     }
     else if ((!(result.hasIsDateTimeRequested())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"IsDateTimeRequested\" field was missing.");
     }
     if (fieldGeneratorFutureRequested.have_value)
     {
         result.setFutureRequested(fieldGeneratorFutureRequested.value);
         fieldGeneratorFutureRequested.have_value = false;
     }
     else if ((!(result.hasFutureRequested())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"FutureRequested\" field was missing.");
     }
     if (fieldGeneratorPastRequested.have_value)
     {
         result.setPastRequested(fieldGeneratorPastRequested.value);
         fieldGeneratorPastRequested.have_value = false;
     }
     else if ((!(result.hasPastRequested())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"PastRequested\" field was missing.");
     }
 }
Beispiel #4
0
 protected override void handle_result(SunriseSunsetTimeConversationStateJSON result)
 {
     top.value.Add(result);
 }
Beispiel #5
0
        protected override void handle_result(SunriseSunsetTimeConversationStateJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }