SuperMap.Web.OGC.GetWFSCapabilities.ParseSuccessResult C# (CSharp) Méthode

ParseSuccessResult() private méthode

private ParseSuccessResult ( System.Xml.Linq.XDocument document, string originResult, object userState ) : void
document System.Xml.Linq.XDocument
originResult string
userState object
Résultat void
        internal override void ParseSuccessResult(XDocument document, string originResult, object userState)
        {
            List<WFSFeatureType> features = new List<WFSFeatureType>();
            if (document != null && document.Root != null)
            {
                string ns = document.Root.Name.NamespaceName;
                foreach (var item in (from itemType in document.Root.Element(XName.Get("FeatureTypeList", ns)).Elements(XName.Get("FeatureType", ns))
                                      select new WFSFeatureType
                                      {
                                          TypeName = itemType.Element(XName.Get("Name", ns)) != null ? itemType.Element(XName.Get("Name", ns)).Value : string.Empty,
                                          Title = itemType.Element(XName.Get("Title", ns)) != null ? itemType.Element(XName.Get("Title", ns)).Value : string.Empty,
                                          SRS = GetCRS(itemType, ns),
                                          Bounds = GetBounds(itemType.Element(XName.Get("LatLongBoundingBox", ns)).Attributes()),
                                      }))
                {
                    features.Add(item);
                }
            }
            OnProcessComplated(features, originResult, userState);
        }