Пример #1
0
 protected void finish(SimpleTextTemplateJSON result)
 {
     if (fieldGeneratorTitle.have_value)
     {
         result.setTitle(fieldGeneratorTitle.value);
         fieldGeneratorTitle.have_value = false;
     }
     if (fieldGeneratorSubtitle.have_value)
     {
         result.setSubtitle(fieldGeneratorSubtitle.value);
         fieldGeneratorSubtitle.have_value = false;
     }
     if (fieldGeneratorFooter.have_value)
     {
         result.setFooter(fieldGeneratorFooter.value);
         fieldGeneratorFooter.have_value = false;
     }
     if (fieldGeneratorActionAndroidIntent.have_value)
     {
         result.setActionAndroidIntent(fieldGeneratorActionAndroidIntent.value);
         fieldGeneratorActionAndroidIntent.have_value = false;
     }
     if (fieldGeneratorActionURIs.have_value)
     {
         result.initActionURIs();
         int count = fieldGeneratorActionURIs.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendActionURIs(fieldGeneratorActionURIs.value[num]);
         }
         fieldGeneratorActionURIs.value.Clear();
         fieldGeneratorActionURIs.have_value = false;
     }
     base.finish(result);
 }
Пример #2
0
        protected override void finish()
        {
            if (!(getTemplateJSONKey().Equals("SimpleText")))
            {
                throw new Exception("The key field has a value other than `SimpleText'.");
            }
            SimpleTextTemplateJSON result = new SimpleTextTemplateJSON();

            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.extraSimpleTextTemplateAppendPair(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);
        }
Пример #3
0
 protected abstract void handle_result(SimpleTextTemplateJSON new_result);
Пример #4
0
 protected override void handle_result(SimpleTextTemplateJSON result)
 {
     top.value.Add(result);
 }
Пример #5
0
        protected override void handle_result(SimpleTextTemplateJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }