Пример #1
0
 private void DeleteBlob(HeroPhoto photo)
 {
     var cloud = new CloudDataAccess();
     cloud.DeleteBlob("images/hero", photo.HeroId.ToString(), photo.PhotoUri);
 }
Пример #2
0
 private void GetBlobs(IEnumerable<Hero> heros, CloudDataAccess cloud)
 {
     foreach (var item in heros)
     {
         GetBlobs(item, cloud);
     }
 }
Пример #3
0
 private void GetBlobs(Hero hero, CloudDataAccess cloud)
 {
     if (hero.HeroId.HasValue)
     {
         var baseUri = cloud.GetBaseUri("images/hero", hero.HeroId.ToString());
         GetBlobs(baseUri, hero.Photos);
     }
 }
Пример #4
0
 private void SaveBlobs(int heroId, IEnumerable<IPostedFile> photos)
 {
     var cloud = new CloudDataAccess();
     foreach (var item in photos)
     {
         cloud.AddBlob("images", string.Format("hero/{0}/{1}", heroId, Path.GetFileName(item.FileName)), item.Stream, item.ContentType);
     }
 }