Esempio n. 1
0
        /// <summary>
        /// Update reply
        /// </summary>
        /// <param name="storageConsistencyMode">Storage consistency mode</param>
        /// <param name="replyHandle">Reply handle</param>
        /// <param name="replyEntity">Reply entity</param>
        /// <returns>Update reply task</returns>
        public async Task UpdateReply(
            StorageConsistencyMode storageConsistencyMode,
            string replyHandle,
            IReplyEntity replyEntity)
        {
            CTStore store = await this.tableStoreManager.GetStore(ContainerIdentifier.Replies);

            ObjectTable table     = this.tableStoreManager.GetTable(ContainerIdentifier.Replies, TableIdentifier.RepliesObject) as ObjectTable;
            Operation   operation = Operation.Replace(table, replyHandle, replyHandle, replyEntity as ReplyEntity);
            await store.ExecuteOperationAsync(operation, storageConsistencyMode.ToConsistencyMode());
        }
        /// <summary>
        /// Update a reply
        /// </summary>
        /// <param name="processType">Process type</param>
        /// <param name="replyHandle">Reply handle</param>
        /// <param name="text">Reply text</param>
        /// <param name="language">Comment language</param>
        /// <param name="reviewStatus">Review status</param>
        /// <param name="lastUpdatedTime">Last updated time</param>
        /// <param name="replyEntity">Reply entity</param>
        /// <returns>Update reply task</returns>
        public async Task UpdateReply(
            ProcessType processType,
            string replyHandle,
            string text,
            string language,
            ReviewStatus reviewStatus,
            DateTime lastUpdatedTime,
            IReplyEntity replyEntity)
        {
            replyEntity.Text            = text;
            replyEntity.Language        = language;
            replyEntity.ReviewStatus    = reviewStatus;
            replyEntity.LastUpdatedTime = lastUpdatedTime;

            await this.repliesStore.UpdateReply(StorageConsistencyMode.Strong, replyHandle, replyEntity);
        }