Beispiel #1
0
 public static void AddLink(this IDictionary <string, HypermediaLink> dict, string name, string href, bool templated = false)
 {
     dict[name] = new HypermediaLink
     {
         Href      = href,
         Templated = templated
     };
 }
        public static async Task <ResolverResult <THco> > TryResolveAsync <THco>(
            this HypermediaLink <THco> link)
            where THco : HypermediaClientObject
        {
            if (link.Uri == null)
            {
                return(ResolverResult.Failed <THco>());
            }

            var result = await link.Resolver.ResolveLinkAsync <THco>(link.Uri);

            return(result);
        }