コード例 #1
0
 void DecorateLogoUrlWithSAS(UriBuilder uriBuilder, IHasLogoUrl hasLogo)
 {
     if (!String.IsNullOrWhiteSpace(hasLogo.LogoUrl))
     {
         uriBuilder.Path = string.Format("{0}/{1}", _containerName, hasLogo.LogoUrl);
         hasLogo.LogoUrl = uriBuilder.Uri.ToString();
     }
     else
     {
         hasLogo.LogoUrl = null;
     }
 }
コード例 #2
0
        public async Task DecorateLogoUrlWithSAS(IHasLogoUrl hasLogo)
        {
            try
            {
                var uriBuilder = await CreateFileDownloadUriBuilder(_containerName);

                if (uriBuilder == null)
                {
                    _logger.LogError("Unable to decorate logo urls");
                }
                else
                {
                    DecorateLogoUrlWithSAS(uriBuilder, hasLogo);
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"Unable to decorate Study item with logo url. Se exception info");
            }
        }