예제 #1
0
 private static CloudBlob processImageContent(Image image, string targetContentRootLocation, Dictionary<string, string> categoryMap, CategoryCollection targetCategoryCollection, string processID)
 {
     var owner = InformationContext.CurrentOwner;
     var sourceCategories = image.Categories;
     var targetItemCategories = GetTargetItemCategories(sourceCategories, targetCategoryCollection, categoryMap);
     image.Categories = targetItemCategories;
     image.RelativeLocation = StorageSupport.GetOwnerContentLocation(owner,
                                                                           string.Format("{0}AaltoGlobalImpact.OIP/Image/{1}", targetContentRootLocation, image.ID));
     image.GeneratedByProcessID = processID;
     if (image.ImageData != null)
     {
         image.ImageData.FixCurrentOwnerLocation();
     }
     if (image.Locations != null)
         image.Locations.CollectionContent.ForEach(location => location.FixCurrentOwnerLocation());
     var storedBlob = image.StoreInformationMasterFirst(owner, true, overwriteIfExists: true);
     return storedBlob;
 }