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

        setLocation(convert_classy);
    }
        protected override void finish()
        {
            if (!(keyGenerator.have_value))
            {
                throw new Exception("The `LocationIntentKind' field is missing.");
            }
            LocationIntentJSON result = createForKey(keyGenerator.value, unknownFieldGenerator.index);

            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.extraLocationIntentAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]);
            }
            unknownFieldGenerator.field_names.Clear();
            unknownFieldGenerator.field_values.Clear();
            unknownFieldGenerator.index = new Dictionary <string, JSONValue>();
            if (!allow_incomplete)
            {
                string missing_field_error = result.missing_field_error(allow_unpolished);
                if (missing_field_error != null)
                {
                    error(missing_field_error);
                }
            }
            handle_result(result);
        }
Ejemplo n.º 3
0
 public void setLocation(LocationIntentJSON new_value)
 {
     if (flagHasLocation)
     {
     }
     flagHasLocation = true;
     storeLocation   = new_value;
 }
 protected override void handle_result(LocationIntentJSON new_result)
 {
     handle_result((MapLocationIntentJSON )new_result);
 }
 protected override void handle_result(LocationIntentJSON result)
 {
     top.value.Add(result);
 }
        protected override void handle_result(LocationIntentJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
 protected abstract void handle_result(LocationIntentJSON new_result);
 protected void finish(LocationIntentJSON result)
 {
 }
Ejemplo n.º 9
0
 protected override void handle_result(LocationIntentJSON new_result)
 {
     handle_result((UserCurrentLocationIntentJSON )new_result);
 }