예제 #1
0
    private void  fromJSONEventCategories(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 EventCategories of SportsOlympicsEventSchedulesAndResultsArgumentEventCategoryJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field EventCategories of SportsOlympicsEventSchedulesAndResultsArgumentEventCategoryJSON has too few elements.");
        }
        List <SportsOlympicsEventCategoryJSON> vector_EventCategories1 = new List <SportsOlympicsEventCategoryJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsOlympicsEventCategoryJSON convert_classy = SportsOlympicsEventCategoryJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_EventCategories1.Add(convert_classy);
        }
        Debug.Assert(vector_EventCategories1.Count >= 1);
        initEventCategories();
        for (int num1 = 0; num1 < vector_EventCategories1.Count; ++num1)
        {
            appendEventCategories(vector_EventCategories1[num1]);
        }
        for (int num1 = 0; num1 < vector_EventCategories1.Count; ++num1)
        {
        }
    }
예제 #2
0
    private void  fromJSONEventCategory(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        SportsOlympicsEventCategoryJSON convert_classy = SportsOlympicsEventCategoryJSON.from_json(json_value, ignore_extras, true);

        setEventCategory(convert_classy);
    }
예제 #3
0
 public void setEventCategory(SportsOlympicsEventCategoryJSON new_value)
 {
     if (flagHasEventCategory)
     {
     }
     flagHasEventCategory = true;
     storeEventCategory   = new_value;
 }
예제 #4
0
 public void appendEventCategories(SportsOlympicsEventCategoryJSON to_append)
 {
     if (!flagHasEventCategories)
     {
         flagHasEventCategories = true;
         storeEventCategories.Clear();
     }
     Debug.Assert(flagHasEventCategories);
     storeEventCategories.Add(to_append);
 }
예제 #5
0
 public void appendEventCategories(string chars)
 {
     SportsOlympicsEventCategoryJSON.TypeValueKnownValues known     = SportsOlympicsEventCategoryJSON.stringToValue(chars);
     SportsOlympicsEventCategoryJSON.TypeValue            new_value = new SportsOlympicsEventCategoryJSON.TypeValue();
     if (known == SportsOlympicsEventCategoryJSON.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;
     }
     appendEventCategories(new_value);
 }