コード例 #1
0
    private void  fromJSONValues(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 Values of RandomNumberGeneratorDiceRollRequestResultJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Values of RandomNumberGeneratorDiceRollRequestResultJSON has too few elements.");
        }
        List <BigInteger> vector_Values1 = new List <BigInteger>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BigInteger       extracted_integer;
            JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
            if (json_integer == null)
            {
                JSONRationalValue json_rational = json_array1.component(num1).rational_value();
                if (json_rational == null)
                {
                    throw new Exception("The value for an element of field Values of RandomNumberGeneratorDiceRollRequestResultJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field Values of RandomNumberGeneratorDiceRollRequestResultJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_Values1.Add(extracted_integer);
        }
        Debug.Assert(vector_Values1.Count >= 1);
        initValues();
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
            appendValues(vector_Values1[num1]);
        }
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
        }
    }
コード例 #2
0
    private void  fromJSONAwayGoals(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 AwayGoals of SportsSeriesStatusJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 2)
        {
            throw new Exception("The value for field AwayGoals of SportsSeriesStatusJSON has too few elements.");
        }
        List <BigInteger> vector_AwayGoals1 = new List <BigInteger>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BigInteger       extracted_integer;
            JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
            if (json_integer == null)
            {
                JSONRationalValue json_rational = json_array1.component(num1).rational_value();
                if (json_rational == null)
                {
                    throw new Exception("The value for an element of field AwayGoals of SportsSeriesStatusJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field AwayGoals of SportsSeriesStatusJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_AwayGoals1.Add(extracted_integer);
        }
        Debug.Assert(vector_AwayGoals1.Count >= 2);
        initAwayGoals();
        for (int num2 = 0; num2 < vector_AwayGoals1.Count; ++num2)
        {
            appendAwayGoals(vector_AwayGoals1[num2]);
        }
        for (int num1 = 0; num1 < vector_AwayGoals1.Count; ++num1)
        {
        }
    }
コード例 #3
0
    private void  fromJSONValues(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 Values of RandomNumberGeneratorNumberRequestResultJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Values of RandomNumberGeneratorNumberRequestResultJSON has too few elements.");
        }
        List <Double> vector_Values1 = new List <Double>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONRationalValue json_rational = json_array1.component(num1).rational_value();
            double            the_double;
            if (json_rational != null)
            {
                the_double = json_rational.getDouble();
            }
            else
            {
                JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
                if (json_integer != null)
                {
                    the_double = json_integer.getLongInt();
                }
                else
                {
                    throw new Exception("The value for an element of field Values of RandomNumberGeneratorNumberRequestResultJSON is not a number.");
                }
            }
            vector_Values1.Add(the_double);
        }
        Debug.Assert(vector_Values1.Count >= 1);
        initValues();
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
            appendValues(vector_Values1[num1]);
        }
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
        }
    }
コード例 #4
0
    private void  fromJSONTracks(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 Tracks of MusicAlbumJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Tracks of MusicAlbumJSON has too few elements.");
        }
        List <MusicTrackBaseJSON> vector_Tracks1 = new List <MusicTrackBaseJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            MusicTrackBaseJSON convert_classy = MusicTrackBaseJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Tracks1.Add(convert_classy);
        }
        Debug.Assert(vector_Tracks1.Count >= 1);
        initTracks();
        for (int num2 = 0; num2 < vector_Tracks1.Count; ++num2)
        {
            appendTracks(vector_Tracks1[num2]);
        }
        for (int num1 = 0; num1 < vector_Tracks1.Count; ++num1)
        {
        }
    }
コード例 #5
0
    private void  fromJSONOutputValue(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 OutputValue of UnitConverterQueryStateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <MeasuredAmountJSON> vector_OutputValue1 = new List <MeasuredAmountJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            MeasuredAmountJSON convert_classy = MeasuredAmountJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_OutputValue1.Add(convert_classy);
        }
        initOutputValue();
        for (int num2 = 0; num2 < vector_OutputValue1.Count; ++num2)
        {
            appendOutputValue(vector_OutputValue1[num2]);
        }
        for (int num1 = 0; num1 < vector_OutputValue1.Count; ++num1)
        {
        }
    }
コード例 #6
0
    private void  fromJSONValue(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 Value of ContactListJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <OneContactJSON> vector_Value1 = new List <OneContactJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            OneContactJSON convert_classy = OneContactJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Value1.Add(convert_classy);
        }
        initValue();
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
            appendValue(vector_Value1[num1]);
        }
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
        }
    }
    private void  fromJSONConversions(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 Conversions of CurrencyConverterInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <CurrencyConversionJSON> vector_Conversions1 = new List <CurrencyConversionJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            CurrencyConversionJSON convert_classy = CurrencyConversionJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Conversions1.Add(convert_classy);
        }
        initConversions();
        for (int num1 = 0; num1 < vector_Conversions1.Count; ++num1)
        {
            appendConversions(vector_Conversions1[num1]);
        }
        for (int num1 = 0; num1 < vector_Conversions1.Count; ++num1)
        {
        }
    }
コード例 #8
0
    private void  fromJSONStockListings(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 StockListings of StockMarketConversationJSON is not an array.");
        }
        int           count1 = json_array1.componentCount();
        List <string> vector_StockListings1 = new List <string>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field StockListings of StockMarketConversationJSON is not a string.");
            }
            vector_StockListings1.Add(json_string.getData());
        }
        initStockListings();
        for (int num2 = 0; num2 < vector_StockListings1.Count; ++num2)
        {
            appendStockListings(vector_StockListings1[num2]);
        }
        for (int num1 = 0; num1 < vector_StockListings1.Count; ++num1)
        {
        }
    }
コード例 #9
0
    private void  fromJSONChoices(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 Choices of WhichContactChoicesJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 2)
        {
            throw new Exception("The value for field Choices of WhichContactChoicesJSON has too few elements.");
        }
        List <TypeChoicesJSON> vector_Choices1 = new List <TypeChoicesJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            TypeChoicesJSON convert_classy = TypeChoicesJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Choices1.Add(convert_classy);
        }
        Debug.Assert(vector_Choices1.Count >= 2);
        initChoices();
        for (int num3 = 0; num3 < vector_Choices1.Count; ++num3)
        {
            appendChoices(vector_Choices1[num3]);
        }
        for (int num1 = 0; num1 < vector_Choices1.Count; ++num1)
        {
        }
    }
コード例 #10
0
    private void  fromJSONValues(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 Values of RandomNumberGeneratorCoinFlipRequestResultJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Values of RandomNumberGeneratorCoinFlipRequestResultJSON has too few elements.");
        }
        List <TypeValues> vector_Values1 = new List <TypeValues>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field Values of RandomNumberGeneratorCoinFlipRequestResultJSON is not a string.");
            }
            TypeValues the_enum;
            switch (json_string.getData()[0])
            {
            case 'H':
                if ((String.Compare(json_string.getData(), 1, "eads", 0, 4, false) == 0) && (json_string.getData().Length == 5))
                {
                    the_enum = TypeValues.Values_Heads;
                    goto enum_is_done;
                }
                break;

            case 'T':
                if ((String.Compare(json_string.getData(), 1, "ails", 0, 4, false) == 0) && (json_string.getData().Length == 5))
                {
                    the_enum = TypeValues.Values_Tails;
                    goto enum_is_done;
                }
                break;

            default:
                break;
            }
            throw new Exception("The value for an element of field Values of RandomNumberGeneratorCoinFlipRequestResultJSON is not one of the legal strings.");
            enum_is_done :;
            vector_Values1.Add(the_enum);
        }
        Debug.Assert(vector_Values1.Count >= 1);
        initValues();
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
            appendValues(vector_Values1[num1]);
        }
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
        }
    }
コード例 #11
0
    private void  fromJSONDisambiguationOrderedList(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 DisambiguationOrderedList of SMSClientStateJSON is not an array.");
        }
        int           count1 = json_array1.componentCount();
        List <string> vector_DisambiguationOrderedList1 = new List <string>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field DisambiguationOrderedList of SMSClientStateJSON is not a string.");
            }
            vector_DisambiguationOrderedList1.Add(json_string.getData());
        }
        initDisambiguationOrderedList();
        for (int num1 = 0; num1 < vector_DisambiguationOrderedList1.Count; ++num1)
        {
            appendDisambiguationOrderedList(vector_DisambiguationOrderedList1[num1]);
        }
        for (int num1 = 0; num1 < vector_DisambiguationOrderedList1.Count; ++num1)
        {
        }
    }
コード例 #12
0
    private void  fromJSONHotelSearchResults(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 HotelSearchResults of HotelSearchConversationStateElementJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <HotelJSON> vector_HotelSearchResults1 = new List <HotelJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            HotelJSON convert_classy = HotelJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_HotelSearchResults1.Add(convert_classy);
        }
        initHotelSearchResults();
        for (int num1 = 0; num1 < vector_HotelSearchResults1.Count; ++num1)
        {
            appendHotelSearchResults(vector_HotelSearchResults1[num1]);
        }
        for (int num1 = 0; num1 < vector_HotelSearchResults1.Count; ++num1)
        {
        }
    }
    private void  fromJSONFlightProducts(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 FlightProducts of FlightBookingInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <FlightProductJSON> vector_FlightProducts1 = new List <FlightProductJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            FlightProductJSON convert_classy = FlightProductJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_FlightProducts1.Add(convert_classy);
        }
        initFlightProducts();
        for (int num1 = 0; num1 < vector_FlightProducts1.Count; ++num1)
        {
            appendFlightProducts(vector_FlightProducts1[num1]);
        }
        for (int num1 = 0; num1 < vector_FlightProducts1.Count; ++num1)
        {
        }
    }
コード例 #14
0
    private void  fromJSONNutrients(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 Nutrients of FoodJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <NutrientJSON> vector_Nutrients1 = new List <NutrientJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            NutrientJSON convert_classy = NutrientJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Nutrients1.Add(convert_classy);
        }
        initNutrients();
        for (int num2 = 0; num2 < vector_Nutrients1.Count; ++num2)
        {
            appendNutrients(vector_Nutrients1[num2]);
        }
        for (int num1 = 0; num1 < vector_Nutrients1.Count; ++num1)
        {
        }
    }
コード例 #15
0
    private void  fromJSONBlockDetails(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 BlockDetails of TerrierUploadReadCommandJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <TerrierUploadBlockJSON> vector_BlockDetails1 = new List <TerrierUploadBlockJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            TerrierUploadBlockJSON convert_classy = TerrierUploadBlockJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_BlockDetails1.Add(convert_classy);
        }
        initBlockDetails();
        for (int num2 = 0; num2 < vector_BlockDetails1.Count; ++num2)
        {
            appendBlockDetails(vector_BlockDetails1[num2]);
        }
        for (int num1 = 0; num1 < vector_BlockDetails1.Count; ++num1)
        {
        }
    }
コード例 #16
0
    private void  fromJSONAliases(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 Aliases of OneInstalledAppJSON is not an array.");
        }
        int           count1          = json_array1.componentCount();
        List <string> vector_Aliases1 = new List <string>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field Aliases of OneInstalledAppJSON is not a string.");
            }
            vector_Aliases1.Add(json_string.getData());
        }
        initAliases();
        for (int num1 = 0; num1 < vector_Aliases1.Count; ++num1)
        {
            appendAliases(vector_Aliases1[num1]);
        }
        for (int num1 = 0; num1 < vector_Aliases1.Count; ++num1)
        {
        }
    }
コード例 #17
0
    private void  fromJSONPhoneNumbers(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 PhoneNumbers of PhoneNumberDisambiguationCandidateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <TypePhoneNumbersJSON> vector_PhoneNumbers1 = new List <TypePhoneNumbersJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            TypePhoneNumbersJSON convert_classy = TypePhoneNumbersJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_PhoneNumbers1.Add(convert_classy);
        }
        initPhoneNumbers();
        for (int num1 = 0; num1 < vector_PhoneNumbers1.Count; ++num1)
        {
            appendPhoneNumbers(vector_PhoneNumbers1[num1]);
        }
        for (int num1 = 0; num1 < vector_PhoneNumbers1.Count; ++num1)
        {
        }
    }
コード例 #18
0
    private void  fromJSONSeriesGames(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 SeriesGames of SportsPlayoffTriviaSeriesJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <SportsGameJSON> vector_SeriesGames1 = new List <SportsGameJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsGameJSON convert_classy = SportsGameJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_SeriesGames1.Add(convert_classy);
        }
        initSeriesGames();
        for (int num1 = 0; num1 < vector_SeriesGames1.Count; ++num1)
        {
            appendSeriesGames(vector_SeriesGames1[num1]);
        }
        for (int num1 = 0; num1 < vector_SeriesGames1.Count; ++num1)
        {
        }
    }
コード例 #19
0
    private void  fromJSONSpokenHints(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 SpokenHints of FlightBookingModeJSON is not an array.");
        }
        int           count1 = json_array1.componentCount();
        List <string> vector_SpokenHints1 = new List <string>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field SpokenHints of FlightBookingModeJSON is not a string.");
            }
            vector_SpokenHints1.Add(json_string.getData());
        }
        initSpokenHints();
        for (int num3 = 0; num3 < vector_SpokenHints1.Count; ++num3)
        {
            appendSpokenHints(vector_SpokenHints1[num3]);
        }
        for (int num1 = 0; num1 < vector_SpokenHints1.Count; ++num1)
        {
        }
    }
コード例 #20
0
    private void  fromJSONPlaylists(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 Playlists of MusicClientStateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <PlaylistStateItemJSON> vector_Playlists1 = new List <PlaylistStateItemJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            PlaylistStateItemJSON convert_classy = PlaylistStateItemJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Playlists1.Add(convert_classy);
        }
        initPlaylists();
        for (int num4 = 0; num4 < vector_Playlists1.Count; ++num4)
        {
            appendPlaylists(vector_Playlists1[num4]);
        }
        for (int num1 = 0; num1 < vector_Playlists1.Count; ++num1)
        {
        }
    }
コード例 #21
0
    private void  fromJSONEnabledLeagues(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 EnabledLeagues of SportsLeagueControlJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field EnabledLeagues of SportsLeagueControlJSON has too few elements.");
        }
        List <SportsLeagueCodeJSON> vector_EnabledLeagues1 = new List <SportsLeagueCodeJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsLeagueCodeJSON convert_classy = SportsLeagueCodeJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_EnabledLeagues1.Add(convert_classy);
        }
        Debug.Assert(vector_EnabledLeagues1.Count >= 1);
        initEnabledLeagues();
        for (int num1 = 0; num1 < vector_EnabledLeagues1.Count; ++num1)
        {
            appendEnabledLeagues(vector_EnabledLeagues1[num1]);
        }
        for (int num1 = 0; num1 < vector_EnabledLeagues1.Count; ++num1)
        {
        }
    }
コード例 #22
0
    private void  fromJSONLabeledPhoneNumbers(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 LabeledPhoneNumbers of SMSContactJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <LabeledPhoneNumberJSON> vector_LabeledPhoneNumbers1 = new List <LabeledPhoneNumberJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            LabeledPhoneNumberJSON convert_classy = LabeledPhoneNumberJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_LabeledPhoneNumbers1.Add(convert_classy);
        }
        initLabeledPhoneNumbers();
        for (int num1 = 0; num1 < vector_LabeledPhoneNumbers1.Count; ++num1)
        {
            appendLabeledPhoneNumbers(vector_LabeledPhoneNumbers1[num1]);
        }
        for (int num1 = 0; num1 < vector_LabeledPhoneNumbers1.Count; ++num1)
        {
        }
    }
コード例 #23
0
    private void  fromJSONStandings(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 Standings of SportsStandingsInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Standings of SportsStandingsInformationNuggetJSON has too few elements.");
        }
        List <SportsStandingsJSON> vector_Standings1 = new List <SportsStandingsJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsStandingsJSON convert_classy = SportsStandingsJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Standings1.Add(convert_classy);
        }
        Debug.Assert(vector_Standings1.Count >= 1);
        initStandings();
        for (int num2 = 0; num2 < vector_Standings1.Count; ++num2)
        {
            appendStandings(vector_Standings1[num2]);
        }
        for (int num1 = 0; num1 < vector_Standings1.Count; ++num1)
        {
        }
    }
コード例 #24
0
    private void  fromJSONerrors(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 errors of GenericUberErrorResponseJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field errors of GenericUberErrorResponseJSON has too few elements.");
        }
        List <GenericUberErrorJSON> vector_errors1 = new List <GenericUberErrorJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            GenericUberErrorJSON convert_classy = GenericUberErrorJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_errors1.Add(convert_classy);
        }
        Debug.Assert(vector_errors1.Count >= 1);
        initerrors();
        for (int num1 = 0; num1 < vector_errors1.Count; ++num1)
        {
            appenderrors(vector_errors1[num1]);
        }
        for (int num1 = 0; num1 < vector_errors1.Count; ++num1)
        {
        }
    }
コード例 #25
0
    private void  fromJSONVideos(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 Videos of MusicChartsCommandNativeDataJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <MusicVideoJSON> vector_Videos1 = new List <MusicVideoJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            MusicVideoJSON convert_classy = MusicVideoJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Videos1.Add(convert_classy);
        }
        initVideos();
        for (int num1 = 0; num1 < vector_Videos1.Count; ++num1)
        {
            appendVideos(vector_Videos1[num1]);
        }
        for (int num1 = 0; num1 < vector_Videos1.Count; ++num1)
        {
        }
    }
コード例 #26
0
    private void  fromJSONContacts(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 Contacts of CallExactContactCommandJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Contacts of CallExactContactCommandJSON has too few elements.");
        }
        List <OneContactJSON> vector_Contacts1 = new List <OneContactJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            OneContactJSON convert_classy = OneContactJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Contacts1.Add(convert_classy);
        }
        Debug.Assert(vector_Contacts1.Count >= 1);
        initContacts();
        for (int num1 = 0; num1 < vector_Contacts1.Count; ++num1)
        {
            appendContacts(vector_Contacts1[num1]);
        }
        for (int num1 = 0; num1 < vector_Contacts1.Count; ++num1)
        {
        }
    }
コード例 #27
0
    private void  fromJSONFundamentals(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 Fundamentals of StockFundamentalsSetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <StockFundamentalJSON> vector_Fundamentals1 = new List <StockFundamentalJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            StockFundamentalJSON convert_classy = StockFundamentalJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Fundamentals1.Add(convert_classy);
        }
        initFundamentals();
        for (int num1 = 0; num1 < vector_Fundamentals1.Count; ++num1)
        {
            appendFundamentals(vector_Fundamentals1[num1]);
        }
        for (int num1 = 0; num1 < vector_Fundamentals1.Count; ++num1)
        {
        }
    }
コード例 #28
0
    private void  fromJSONShipLocations(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 ShipLocations of BattleshipPlayerDataJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <BattleshipShipTypeJSON> vector_ShipLocations1 = new List <BattleshipShipTypeJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BattleshipShipTypeJSON convert_classy = BattleshipShipTypeJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_ShipLocations1.Add(convert_classy);
        }
        initShipLocations();
        for (int num2 = 0; num2 < vector_ShipLocations1.Count; ++num2)
        {
            appendShipLocations(vector_ShipLocations1[num2]);
        }
        for (int num1 = 0; num1 < vector_ShipLocations1.Count; ++num1)
        {
        }
    }
コード例 #29
0
    private void  fromJSONRoomsList(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 RoomsList of RobotSetKnownRoomsCommandIntentJSON is not an array.");
        }
        int             count1            = json_array1.componentCount();
        List <RoomJSON> vector_RoomsList1 = new List <RoomJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            RoomJSON convert_classy = RoomJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_RoomsList1.Add(convert_classy);
        }
        initRoomsList();
        for (int num1 = 0; num1 < vector_RoomsList1.Count; ++num1)
        {
            appendRoomsList(vector_RoomsList1[num1]);
        }
        for (int num1 = 0; num1 < vector_RoomsList1.Count; ++num1)
        {
        }
    }
コード例 #30
0
    private void  fromJSONItems(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 Items of VerticalTemplateListTemplateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Items of VerticalTemplateListTemplateJSON has too few elements.");
        }
        List <TypeItemsJSON> vector_Items1 = new List <TypeItemsJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            TypeItemsJSON convert_classy = TypeItemsJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Items1.Add(convert_classy);
        }
        Debug.Assert(vector_Items1.Count >= 1);
        initItems();
        for (int num1 = 0; num1 < vector_Items1.Count; ++num1)
        {
            appendItems(vector_Items1[num1]);
        }
        for (int num1 = 0; num1 < vector_Items1.Count; ++num1)
        {
        }
    }