public WorkItemTreeViewModel(WorkItem workItem) : base(workItem)
 {
     if (workItem.ParentId.HasValue)
     {
         Parent = new WorkItemTreeParentViewModel(workItem.Parent);
     }
     Children.AddRange(workItem.Children.Select(x => new WorkItemTreeViewModel(x)));
     Creater = new UserInfoViewModel(workItem.Creator);
 }
Beispiel #2
0
 public WorkItemTreeParentViewModel(WorkItem workItem)
 {
     Id   = workItem.Id;
     Name = workItem.Name;
     if (workItem.ParentId.HasValue)
     {
         Parent = new WorkItemTreeParentViewModel(workItem.Parent);
     }
 }