public static IList <Link> ParseLinkHeader(this Link link, string linkHeader, LinkFactory linkRegistry) { var parser = new LinkHeaderParser(linkRegistry); return(parser.Parse(link.Target, linkHeader)); }
public static List <Link> ParseLinkHeaders(this HttpResponseMessage responseMessage, LinkFactory linkRegistry) { return(ParseLinkHeaders(responseMessage.Headers, responseMessage.RequestMessage.RequestUri, linkRegistry)); }
public static List <Link> ParseLinkHeaders(this HttpHeaders headers, Uri baseUri, LinkFactory linkRegistry) { var list = new List <Link>(); var parser = new LinkHeaderParser(linkRegistry); var linkHeaders = headers.GetValues("Link"); foreach (var linkHeader in linkHeaders) { list.AddRange(parser.Parse(baseUri, linkHeader)); } return(list); }
public LinkHeaderParser(LinkFactory linkFactory) { _linkFactory = linkFactory; }