private void fromJSONInvalidListings(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 InvalidListings of StockQueryBlockJSON is not an array."); } int count1 = json_array1.componentCount(); List <StockInvalidListingJSON> vector_InvalidListings1 = new List <StockInvalidListingJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { StockInvalidListingJSON convert_classy = StockInvalidListingJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_InvalidListings1.Add(convert_classy); } initInvalidListings(); for (int num3 = 0; num3 < vector_InvalidListings1.Count; ++num3) { appendInvalidListings(vector_InvalidListings1[num3]); } for (int num1 = 0; num1 < vector_InvalidListings1.Count; ++num1) { } }
public void appendInvalidListings(StockInvalidListingJSON to_append) { if (!flagHasInvalidListings) { flagHasInvalidListings = true; storeInvalidListings.Clear(); } Debug.Assert(flagHasInvalidListings); storeInvalidListings.Add(to_append); }
protected override void finish() { StockInvalidListingJSON result = new StockInvalidListingJSON(); 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.extraStockInvalidListingAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); handle_result(result); }
protected abstract void handle_result(StockInvalidListingJSON new_result);
protected void finish(StockInvalidListingJSON result) { if (fieldGeneratorSymbol.have_value) { result.setSymbol(fieldGeneratorSymbol.value); fieldGeneratorSymbol.have_value = false; } else if ((!(result.hasSymbol())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Symbol\" field was missing."); } if (fieldGeneratorShortName.have_value) { result.setShortName(fieldGeneratorShortName.value); fieldGeneratorShortName.have_value = false; } if (fieldGeneratorShortPossessiveName.have_value) { result.setShortPossessiveName(fieldGeneratorShortPossessiveName.value); fieldGeneratorShortPossessiveName.have_value = false; } if (fieldGeneratorMediumName.have_value) { result.setMediumName(fieldGeneratorMediumName.value); fieldGeneratorMediumName.have_value = false; } if (fieldGeneratorLongName.have_value) { result.setLongName(fieldGeneratorLongName.value); fieldGeneratorLongName.have_value = false; } if (fieldGeneratorListingRequestType.have_value) { result.setListingRequestType(fieldGeneratorListingRequestType.value); fieldGeneratorListingRequestType.have_value = false; } else if ((!(result.hasListingRequestType())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ListingRequestType\" field was missing."); } if (fieldGeneratorExchangeExplicit.have_value) { result.setExchangeExplicit(fieldGeneratorExchangeExplicit.value); fieldGeneratorExchangeExplicit.have_value = false; } else if ((!(result.hasExchangeExplicit())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ExchangeExplicit\" field was missing."); } if (fieldGeneratorRequestedStockExchangeShortName.have_value) { result.setRequestedStockExchangeShortName(fieldGeneratorRequestedStockExchangeShortName.value); fieldGeneratorRequestedStockExchangeShortName.have_value = false; } if (fieldGeneratorRequestedStockExchangeLongName.have_value) { result.setRequestedStockExchangeLongName(fieldGeneratorRequestedStockExchangeLongName.value); fieldGeneratorRequestedStockExchangeLongName.have_value = false; } if (fieldGeneratorRequestedStockExchangeSymbol.have_value) { result.setRequestedStockExchangeSymbol(fieldGeneratorRequestedStockExchangeSymbol.value); fieldGeneratorRequestedStockExchangeSymbol.have_value = false; } if (fieldGeneratorAlternateListing.have_value) { result.setAlternateListing(fieldGeneratorAlternateListing.value); fieldGeneratorAlternateListing.have_value = false; } }
protected override void handle_result(StockInvalidListingJSON result) { top.value.Add(result); }
protected override void handle_result(StockInvalidListingJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }