Example #1
0
        private void  fromJSONArguments(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 Arguments of TypeStatRequestsJSON is not an array.");
            }
            int count1 = json_array1.componentCount();

            if (count1 < 1)
            {
                throw new Exception("The value for field Arguments of TypeStatRequestsJSON has too few elements.");
            }
            List <SportsStatsArgumentArrayJSON> vector_Arguments1 = new List <SportsStatsArgumentArrayJSON>(count1);

            for (int num1 = 0; num1 < count1; ++num1)
            {
                SportsStatsArgumentArrayJSON convert_classy = SportsStatsArgumentArrayJSON.from_json(json_array1.component(num1), ignore_extras, true);
                vector_Arguments1.Add(convert_classy);
            }
            Debug.Assert(vector_Arguments1.Count >= 1);
            initArguments();
            for (int num1 = 0; num1 < vector_Arguments1.Count; ++num1)
            {
                appendArguments(vector_Arguments1[num1]);
            }
            for (int num1 = 0; num1 < vector_Arguments1.Count; ++num1)
            {
            }
        }
Example #2
0
 public void appendArguments(SportsStatsArgumentArrayJSON to_append)
 {
     if (!flagHasArguments)
     {
         flagHasArguments = true;
         storeArguments.Clear();
     }
     Debug.Assert(flagHasArguments);
     storeArguments.Add(to_append);
 }
Example #3
0
        protected void finish()
        {
            Debug.Assert(have_value);
            SportsStatsArgumentArrayJSON result = new SportsStatsArgumentArrayJSON();

            result.initValue();
            int count = value.Count;

            for (int num = 0; num < count; ++num)
            {
                result.appendValue(value[num]);
            }
            handle_result(result);
        }
Example #4
0
 protected override void handle_result(SportsStatsArgumentArrayJSON result)
 {
     top.value.Add(result);
 }
Example #5
0
        protected override void handle_result(SportsStatsArgumentArrayJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Example #6
0
 protected abstract void handle_result(SportsStatsArgumentArrayJSON new_result);