public ReviewItemViewModel(ReviewItemModel reviewItemModel) { ChangesetId = reviewItemModel.ChangesetId; Comment = reviewItemModel.Comment; CreationDate = reviewItemModel.CreationDate; Committer = reviewItemModel.Committer; ServerItem = reviewItemModel.ServerItem; Change = reviewItemModel.Change; LocalFilePath = reviewItemModel.LocalFilePath; }
void OnChangesetVisit(object sender, ChangesetVisitEventArgs e) { foreach (Change change in e.Changeset.Changes) { var reviewItemModel = new ReviewItemModel(e); reviewItemModel.LocalFilePath = e.Workspace.TryGetLocalItemForServerItem(change.Item.ServerItem); reviewItemModel.ServerItem = change.Item.ServerItem; reviewItemModel.Change = (change.ChangeType & (~ChangeType.Encoding)).ToString(); if (this.filter == null || this.filter.IsIncluded(reviewItemModel)) { items.Add(reviewItemModel); } } }