private static string ResolveBinaryLink(TcmUri tcmUri, int localizationId = 0)
 {
     int publicationId = localizationId == 0 ? tcmUri.PublicationId : localizationId;
     BinaryLink linker = new BinaryLink(publicationId);
     Link link = linker.GetLink(tcmUri.ToString(), null, null, null, false);
     return link.IsResolved ? link.Url : null;
 }
        private static string ResolveBinaryLink(Tridion.ContentManager.TcmUri tcmUri, Localization localization)
        {
            BinaryLink linker = new BinaryLink(GetPublicationUri(tcmUri, localization));
            Link       link   = linker.GetLink(tcmUri.ToString(), null, null, null, false);

            return(link.IsResolved ? link.Url : null);
        }
Пример #3
0
 private static string ResolveBinaryLink(string uri, int localizationId = 0)
 {
     //TODO should we have a single (static) link object?
     var linker = new BinaryLink(localizationId == 0 ? GetPublicationIdFromUri(uri) : localizationId);
     var link = linker.GetLink(uri.StartsWith("tcm:") ? uri : "tcm:" + uri,null,null,null,false);
     return link.IsResolved ? link.Url : null;
 }
        private static string ResolveBinaryLink(TcmUri tcmUri, int localizationId = 0)
        {
            int        publicationId = localizationId == 0 ? tcmUri.PublicationId : localizationId;
            BinaryLink linker        = new BinaryLink(publicationId);
            Link       link          = linker.GetLink(tcmUri.ToString(), null, null, null, false);

            return(link.IsResolved ? link.Url : null);
        }