Example #1
0
 internal void MergeLinkInfo(LinkInfo linkInfo)
 {
     if (this.relatedEntityLinks == null)
     {
         this.relatedEntityLinks = new Dictionary<string, LinkInfo>(StringComparer.Ordinal);
     }
     LinkInfo info = null;
     if (!this.relatedEntityLinks.TryGetValue(linkInfo.Name, out info))
     {
         this.relatedEntityLinks[linkInfo.Name] = linkInfo;
     }
     else
     {
         if (linkInfo.AssociationLink != null)
         {
             info.AssociationLink = linkInfo.AssociationLink;
         }
         if (linkInfo.NavigationLink != null)
         {
             info.NavigationLink = linkInfo.NavigationLink;
         }
     }
 }
Example #2
0
 internal bool TryGetLinkInfo(string propertyName, out LinkInfo linkInfo)
 {
     Util.CheckArgumentNullAndEmpty(propertyName, "propertyName");
     linkInfo = null;
     return (((this.TransientEntityDescriptor != null) && this.TransientEntityDescriptor.TryGetLinkInfo(propertyName, out linkInfo)) || ((this.relatedEntityLinks != null) && this.relatedEntityLinks.TryGetValue(propertyName, out linkInfo)));
 }
Example #3
0
 private LinkInfo GetLinkInfo(string propertyName)
 {
     if (this.relatedEntityLinks == null)
     {
         this.relatedEntityLinks = new Dictionary<string, LinkInfo>(StringComparer.Ordinal);
     }
     LinkInfo info = null;
     if (!this.relatedEntityLinks.TryGetValue(propertyName, out info))
     {
         info = new LinkInfo(propertyName);
         this.relatedEntityLinks[propertyName] = info;
     }
     return info;
 }