/// <summary>
 /// Parses the Service document and builds a Dictionary of entity set name to Uri 
 /// </summary>
 /// <param name="serviceDocument">The Service Document of an OData compliant service</param>
 /// <returns>A Dictionary of entity set name to Uri </returns>
 public IEntitySetResolver ParseServiceDocument(XElement serviceDocument)
 {
     this.entitySetLinks = new Dictionary<string, Uri>();
     this.ParseInternal(serviceDocument);
     ServiceDocumentBasedEntitySetResolver entitySetResolver = new ServiceDocumentBasedEntitySetResolver(this.entitySetLinks);
     return entitySetResolver;
 }
        /// <summary>
        /// Parses the Service document and builds a Dictionary of entity set name to Uri
        /// </summary>
        /// <param name="serviceDocument">The Service Document of an OData compliant service</param>
        /// <returns>A Dictionary of entity set name to Uri </returns>
        public IEntitySetResolver ParseServiceDocument(XElement serviceDocument)
        {
            this.entitySetLinks = new Dictionary <string, Uri>();
            this.ParseInternal(serviceDocument);
            ServiceDocumentBasedEntitySetResolver entitySetResolver = new ServiceDocumentBasedEntitySetResolver(this.entitySetLinks);

            return(entitySetResolver);
        }