public static List<ILink> ParseLinkHeaders(this HttpHeaders headers, Uri baseUri, ILinkFactory linkRegistry)
 {
     var list = new List<ILink>();
     var parser = new LinkHeaderParser(linkRegistry);
     var linkHeaders = headers.GetValues("Link");
     foreach (var linkHeader in linkHeaders)
     {
         list.AddRange(parser.Parse(baseUri, linkHeader));
     }
     return list;
 }
Exemple #2
0
        public static List <ILink> ParseLinkHeaders(this HttpHeaders headers, Uri baseUri, ILinkFactory linkRegistry)
        {
            var list        = new List <ILink>();
            var parser      = new LinkHeaderParser(linkRegistry);
            var linkHeaders = headers.GetValues("Link");

            foreach (var linkHeader in linkHeaders)
            {
                list.AddRange(parser.Parse(baseUri, linkHeader));
            }
            return(list);
        }
Exemple #3
0
        public static IList <ILink> ParseLinkHeader(this ILink link, string linkHeader, ILinkFactory linkRegistry)
        {
            var parser = new LinkHeaderParser(linkRegistry);

            return(parser.Parse(link.Target, linkHeader));
        }
 public static IList<ILink> ParseLinkHeader(this ILink link, string linkHeader, ILinkFactory linkRegistry)
 {
     var parser = new LinkHeaderParser(linkRegistry);
     return parser.Parse(link.Target, linkHeader);
 }