private void fromJSONRequestedListings(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 RequestedListings of StockMarketConversationJSON is not an array."); } int count1 = json_array1.componentCount(); List <StockConversationRequestedListingJSON> vector_RequestedListings1 = new List <StockConversationRequestedListingJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { StockConversationRequestedListingJSON convert_classy = StockConversationRequestedListingJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_RequestedListings1.Add(convert_classy); } initRequestedListings(); for (int num3 = 0; num3 < vector_RequestedListings1.Count; ++num3) { appendRequestedListings(vector_RequestedListings1[num3]); } for (int num1 = 0; num1 < vector_RequestedListings1.Count; ++num1) { } }
protected void finish(StockConversationRequestedListingJSON result) { if (fieldGeneratorListingID.have_value) { result.setListingID(fieldGeneratorListingID.value); fieldGeneratorListingID.have_value = false; } else if ((!(result.hasListingID())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ListingID\" field was missing."); } 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 (fieldGeneratorNumShares.have_value) { result.setNumShares(fieldGeneratorNumShares.value); fieldGeneratorNumShares.have_value = false; } if (fieldGeneratorAlternateListingID.have_value) { result.setAlternateListingID(fieldGeneratorAlternateListingID.value); fieldGeneratorAlternateListingID.have_value = false; } }
public void appendRequestedListings(StockConversationRequestedListingJSON to_append) { if (!flagHasRequestedListings) { flagHasRequestedListings = true; storeRequestedListings.Clear(); } Debug.Assert(flagHasRequestedListings); storeRequestedListings.Add(to_append); }
protected override void finish() { StockConversationRequestedListingJSON result = new StockConversationRequestedListingJSON(); 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.extraStockConversationRequestedListingAppendPair(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 override void handle_result(StockConversationRequestedListingJSON result) { top.value.Add(result); }
protected override void handle_result(StockConversationRequestedListingJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(StockConversationRequestedListingJSON new_result);