Closed Vyeche closed 9 years ago
Can you clarify this a bit for me?
If you want just one quote, you should be able to do something like this:
var google_quote = quote_service.Quote("GOOG").Return(/*Quote Parameters*/).First();
var name = google_quote.Name;
var price = google_quote.LatestTradePrice;
//etc...
Why do you need "Google Inc." to access the properties?
Oh, do you mean all the properties are coming back with "Google Inc." in them? There could be a problem with the parsing. Could you give me an example of this happening?
I'll try to explain, First issue, the properties were coming back with extra characters. - "\"Google Inc.\""
Where symbol is string[] or new {"GOOG"} var quotes = quoteService.Quote(symbol).Return(QuoteReturnParameter.Symbol, QuoteReturnParameter.Name, QuoteReturnParameter.LatestTradePrice, QuoteReturnParameter.LatestTradeTime);
The results look like this inside the return_parameter_dictionary (non-public): {{Symbol, "GOOG"}} -> "\"GOOG\"" {{Name, "Google Inc"}} -> "\"Google Inc.\"" {{LatestTradePrice, 557.35}} -> "557.35" {{LatestTradeTime, "4:00pm"}} -> "\"4:00pm\"" When I try to use this as json, it wont work because the extra quote level. Do you see what I mean?
I'm cleaning it with as a temp solution: var r = new Regex(@"[\""]");
Second issue. can you convert them to a list of string instead of Generic IEnumberable
The quotes should be removed now.
Hi,
I'm trying to access the properties without the "\"Google Inc.\"" characters. I noticed that the IEnumerable returns a hidden dictionary. Is it possible that those can be cleaned?
Will it be possible to just ask for one quote and get its properties, instead of asking for multiple?