Ejemplo n.º 1
0
    private void  fromJSONUberProductsSpec(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        UberProductsSpecJSON convert_classy = UberProductsSpecJSON.from_json(json_value, ignore_extras, true);

        setUberProductsSpec(convert_classy);
    }
Ejemplo n.º 2
0
 public void setUberProductsSpec(UberProductsSpecJSON new_value)
 {
     if (flagHasUberProductsSpec)
     {
     }
     flagHasUberProductsSpec = true;
     storeUberProductsSpec   = new_value;
 }
Ejemplo n.º 3
0
        protected override void finish()
        {
            if (!(getUberSpecJSONKey().Equals("UberProductsSpec")))
            {
                throw new Exception("The key field has a value other than `UberProductsSpec'.");
            }
            UberProductsSpecJSON result = new UberProductsSpecJSON();

            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.extraUberProductsSpecAppendPair(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);
        }
Ejemplo n.º 4
0
 protected void finish(UberProductsSpecJSON result)
 {
     if (fieldGeneratorPreferredProduct.have_value)
     {
         result.setPreferredProduct(fieldGeneratorPreferredProduct.value);
         fieldGeneratorPreferredProduct.have_value = false;
     }
     else if ((!(result.hasPreferredProduct())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"PreferredProduct\" field was missing.");
     }
     if (fieldGeneratorPickupLocation.have_value)
     {
         result.setPickupLocation(fieldGeneratorPickupLocation.value);
         fieldGeneratorPickupLocation.have_value = false;
     }
     else if ((!(result.hasPickupLocation())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"PickupLocation\" field was missing.");
     }
     if (fieldGeneratorQueryTypes.have_value)
     {
         result.initQueryTypes();
         int count = fieldGeneratorQueryTypes.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendQueryTypes(fieldGeneratorQueryTypes.value[num]);
         }
         fieldGeneratorQueryTypes.value.Clear();
         fieldGeneratorQueryTypes.have_value = false;
     }
     else if ((!(result.hasQueryTypes())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"QueryTypes\" field was missing.");
     }
     base.finish(result);
 }
Ejemplo n.º 5
0
 protected override void handle_result(UberProductsSpecJSON result)
 {
     top.value.Add(result);
 }
Ejemplo n.º 6
0
        protected override void handle_result(UberProductsSpecJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Ejemplo n.º 7
0
 protected abstract void handle_result(UberProductsSpecJSON new_result);