static GetPricesAndStock.response SerializeResponseContent(Stream content) { XmlSerializer serializer = new XmlSerializer(typeof(GetPricesAndStock.response)); serializer.UnknownNode += new XmlNodeEventHandler(serializer_UnknownNode); serializer.UnknownAttribute += new XmlAttributeEventHandler(serializer_UnknownAttribute); GetPricesAndStock.response Response = (GetPricesAndStock.response)serializer.Deserialize(content); return(Response); }
static void PrintResults(GetPricesAndStock.response response) { if (response == null) { return; } foreach (var p in response.Data.ProductList) { Console.WriteLine(p.Symbol); Console.WriteLine(); foreach (var price in p.PriceList) { Console.WriteLine(price.Amount + "; " + price.PriceValue); } Console.WriteLine(); Console.WriteLine(String.Format("W magazynie: {0}", p.Amount.ToString())); Console.WriteLine("\n"); } }