private void  fromJSONExcludes(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONArrayValue json_array1 = json_value.array_value();

        if (json_array1 == null)
        {
            throw new Exception("The value for field Excludes of CabinClassFilterJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Excludes of CabinClassFilterJSON has too few elements.");
        }
        List <CabinClassJSON> vector_Excludes1 = new List <CabinClassJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            CabinClassJSON convert_classy = CabinClassJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Excludes1.Add(convert_classy);
        }
        Debug.Assert(vector_Excludes1.Count >= 1);
        initExcludes();
        for (int num2 = 0; num2 < vector_Excludes1.Count; ++num2)
        {
            appendExcludes(vector_Excludes1[num2]);
        }
        for (int num1 = 0; num1 < vector_Excludes1.Count; ++num1)
        {
        }
    }
    private void  fromJSONCabinClass(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        CabinClassJSON convert_classy = CabinClassJSON.from_json(json_value, ignore_extras, true);

        setCabinClass(convert_classy);
    }
Пример #3
0
        protected override void handle_result(TypeValue new_value)
        {
            CabinClassJSON result = new CabinClassJSON();

            result.setValue(new_value);
            handle_result(result);
        }
 public void setCabinClass(CabinClassJSON new_value)
 {
     if (flagHasCabinClass)
     {
     }
     flagHasCabinClass = true;
     storeCabinClass   = new_value;
 }
 public void appendExcludes(CabinClassJSON to_append)
 {
     if (!flagHasExcludes)
     {
         flagHasExcludes = true;
         storeExcludes.Clear();
     }
     Debug.Assert(flagHasExcludes);
     storeExcludes.Add(to_append);
 }
 public void setCabinClass(string chars)
 {
     CabinClassJSON.TypeValueKnownValues known     = CabinClassJSON.stringToValue(chars);
     CabinClassJSON.TypeValue            new_value = new CabinClassJSON.TypeValue();
     if (known == CabinClassJSON.TypeValueKnownValues.Value__none)
     {
         new_value.in_known_list = false;
         new_value.string_value  = chars;
     }
     else
     {
         new_value.in_known_list = true;
         new_value.list_value    = known;
     }
     setCabinClass(new_value);
 }
Пример #7
0
 protected override void handle_result(CabinClassJSON result)
 {
     top.value.Add(result);
 }
Пример #8
0
        protected override void handle_result(CabinClassJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Пример #9
0
 protected abstract void handle_result(CabinClassJSON new_result);