/// <summary> /// Map ID as an asynchronous operation. /// </summary> /// <param name="link">A link returned in a MapId response.</param> /// <returns>The task object representing the asynchronous operation.</returns> public async Task <Model.MapId.Response> MapIdAsync(Model.MapId.Link link) { if (link == null) { throw new ArgumentNullException(nameof(link)); } Uri requestUri = link.Href; var response = await GetResponseAsync <Model.MapId.Response>(link, requestUri); return(response); }
/// <summary> /// Map ID. /// </summary> /// <param name="link">A link returned in a MapId response.</param> /// <returns>MapId response.</returns> public Model.MapId.Response MapId(Model.MapId.Link link) { try { return(MapIdAsync(link).Result); } catch (Exception e) { if (e.InnerException != null) { throw e.InnerException; } throw; } }