예제 #1
0
        public static WebEditStudyHistoryRecord ReadEditRecord(StudyHistory historyRecord)
        {
            Platform.CheckTrue(historyRecord.StudyHistoryTypeEnum == StudyHistoryTypeEnum.WebEdited
                               || historyRecord.StudyHistoryTypeEnum == StudyHistoryTypeEnum.ExternalEdit,
                               "History record has invalid history record type");

            WebEditStudyHistoryRecord record = new WebEditStudyHistoryRecord
                                                   {
                                                       InsertTime = historyRecord.InsertTime,
                                                       StudyStorageLocation =
                                                           StudyStorageLocation.FindStorageLocations(
                                                               StudyStorage.Load(historyRecord.StudyStorageKey))[0],
                                                       UpdateDescription =
                                                           XmlUtils.Deserialize<WebEditStudyHistoryChangeDescription>(
                                                               historyRecord.ChangeDescription)
                                                   };
            return record;
        }
예제 #2
0
        public static WebEditStudyHistoryRecord ReadEditRecord(StudyHistory historyRecord)
        {
            Platform.CheckTrue(historyRecord.StudyHistoryTypeEnum == StudyHistoryTypeEnum.WebEdited ||
                               historyRecord.StudyHistoryTypeEnum == StudyHistoryTypeEnum.ExternalEdit,
                               "History record has invalid history record type");

            WebEditStudyHistoryRecord record = new WebEditStudyHistoryRecord
            {
                InsertTime           = historyRecord.InsertTime,
                StudyStorageLocation =
                    StudyStorageLocation.FindStorageLocations(
                        StudyStorage.Load(historyRecord.StudyStorageKey))[0],
                UpdateDescription =
                    XmlUtils.Deserialize <WebEditStudyHistoryChangeDescription>(
                        historyRecord.ChangeDescription)
            };

            return(record);
        }