Ejemplo n.º 1
0
            public static string GetImageUrl(WebApi.File file, string size)
            {
                var keyGuid           = file.Key.Split('.').First();
                var keyExtension      = file.Key.Split('.').Last();
                var keySizeIdentifier = size.Split('/').First();

                var key = string.Format("{0}_{1}.{2}", keyGuid, keySizeIdentifier, keyExtension);

                _container = MvcApplication.GetBlobContainer(file.Container);

                if (_container.GetBlockBlobReference(key)
                    .Exists())
                {
                    return(_container.GetBlockBlobReference(key).Uri.ToString());
                }

                return(_container.GetBlockBlobReference(file.Key).Uri.ToString());
            }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the Url of the given File object
        /// </summary>
        public static string GetFileUrl(WebApi.File file)
        {
            _container = MvcApplication.GetBlobContainer(file.Container);

            return(_container.GetBlockBlobReference(file.Key).Uri.ToString());
        }
Ejemplo n.º 3
0
 private void CreateReportProxy()
 {
     _reportProxy = new Proxy <Report>(MvcApplication.GetApiUrl() + "reports");
 }