Example #1
0
        /// <summary>
        /// Updates image review status
        /// </summary>
        /// <param name="storageConsistencyMode">Storage consistency mode</param>
        /// <param name="appHandle">App handle</param>
        /// <param name="userHandle">User handle</param>
        /// <param name="blobHandle">Blob handle</param>
        /// <param name="reviewStatus">Review status</param>
        /// <param name="imageMetadataEntity">Image metadata entity</param>
        /// <returns>Update image review status task</returns>
        public async Task UpdateImageReviewStatus(StorageConsistencyMode storageConsistencyMode, string appHandle, string userHandle, string blobHandle, ReviewStatus reviewStatus, IImageMetadataEntity imageMetadataEntity)
        {
            CTStore store = await this.tableStoreManager.GetStore(ContainerIdentifier.Images);

            ObjectTable table        = this.tableStoreManager.GetTable(ContainerIdentifier.Images, TableIdentifier.ImagesMetadata) as ObjectTable;
            string      partitionKey = this.GetPartitionKey(appHandle, userHandle);

            imageMetadataEntity.ReviewStatus = reviewStatus;

            Operation operation = Operation.Replace(table, partitionKey, blobHandle, imageMetadataEntity as ImageMetadataEntity);
            await store.ExecuteOperationAsync(operation, storageConsistencyMode.ToConsistencyMode());
        }
Example #2
0
 /// <summary>
 /// Update image review status
 /// </summary>
 /// <param name="appHandle">App handle</param>
 /// <param name="userHandle">User handle</param>
 /// <param name="blobHandle">Blob handle</param>
 /// <param name="reviewStatus">Review status</param>
 /// <param name="imageMetadataEntity">Image metadata entity</param>
 /// <returns>Update image metadata task</returns>
 public async Task UpdateImageReviewStatus(string appHandle, string userHandle, string blobHandle, ReviewStatus reviewStatus, IImageMetadataEntity imageMetadataEntity)
 {
     await this.blobsMetadataStore.UpdateImageReviewStatus(StorageConsistencyMode.Strong, appHandle, userHandle, blobHandle, reviewStatus, imageMetadataEntity);
 }