/// <summary>
 /// Creates the materializer link with a feed.
 /// </summary>
 /// <param name="link">The link.</param>
 /// <param name="feed">The feed.</param>
 /// <returns>The materializer link.</returns>
 public static MaterializerNavigationLink CreateLink(ODataNavigationLink link, ODataFeed feed)
 {
     Debug.Assert(link.GetAnnotation<MaterializerNavigationLink>() == null, "there should be no MaterializerNavigationLink annotation on the feed link yet");
     MaterializerNavigationLink materializedNavigationLink = new MaterializerNavigationLink(link, feed);
     link.SetAnnotation<MaterializerNavigationLink>(materializedNavigationLink);
     return materializedNavigationLink;
 }
 private static void AddLinkMetadata(DeferredLink payloadElement, ODataNavigationLink link)
 {
     AtomLinkMetadata metadata = CreateLinkMetadata(payloadElement.Annotations.OfType<XmlTreeAnnotation>());
     if (metadata != null)
     {
         link.SetAnnotation<AtomLinkMetadata>(metadata);
     }
 }