ArcGISWindowsPhoneSDK.GeoRSS.UseLinq C# (CSharp) Метод

UseLinq() приватный Метод

private UseLinq ( Stream s ) : void
s Stream
Результат void
        private void UseLinq(Stream s)
        {
            GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
            graphicsLayer.ClearGraphics();

            XDocument doc = XDocument.Load(s);
            XNamespace geo = "http://www.w3.org/2003/01/geo/wgs84_pos#";

            var rssGraphics = from rssgraphic in doc.Descendants("item")
                              select new RssGraphic
                              {
                                  Geometry = new MapPoint(
                                      Convert.ToDouble(rssgraphic.Element(geo + "long").Value, System.Globalization.CultureInfo.InvariantCulture),
                                      Convert.ToDouble(rssgraphic.Element(geo + "lat").Value, System.Globalization.CultureInfo.InvariantCulture),
                                      new SpatialReference(4326)),
                                  Symbol = LayoutRoot.Resources["QuakePictureSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol,
                                  RssAttributes = new Dictionary<string, object>() { { "MAGNITUDE", rssgraphic.Element("title").Value } }
                              };

            foreach (RssGraphic rssGraphic in rssGraphics)
            {
                foreach (KeyValuePair<string, object> rssAttribute in rssGraphic.RssAttributes)
                {
                    rssGraphic.Attributes.Add(rssAttribute.Key, rssAttribute.Value);
                }
                graphicsLayer.Graphics.Add((Graphic)rssGraphic);
            }
        }