コード例 #1
0
 internal static AscentRelease.Link getLink(AscentRelease.Links arLinks, String linkName)
 {
     try
     {
         object oLinkToGet = (object)linkName;
         return(arLinks.get_Item(ref oLinkToGet));
     }
     catch (Exception e)
     {
         // if the link does not exist just return null
         return(null);
     }
 }
コード例 #2
0
        internal static String getLinkDestination(AscentRelease.Links arLinks, String linkName)
        {
            try
            {
                foreach (AscentRelease.Link link in arLinks)
                {
                    if (link.Source.Equals(linkName))
                    {
                        return(link.Destination);
                    }
                }

                // no need to check for null as the get_item throws exception if not found
                return(null);
            }
            catch (Exception e)
            {
                // if the link does not exist just return null
                return(null);
            }
        }