Beispiel #1
0
        public WorkItemWithHistory AddWorkItemMessage(TaskProgressCallbackMessage value,
                                                      ObservableCollection <WorkItemWithHistory> parents, int inRouteIndex)
        {
            WorkItemId          rootId = value.RouteToChild[inRouteIndex];
            WorkItemWithHistory parent = parents.FirstOrDefault(workItem => workItem.Id == rootId.Id);

            if (parent == null)
            {
                parent = new WorkItemWithHistory
                {
                    Id           = rootId.Id,
                    Name         = rootId.Name,
                    WorkItemType = rootId.WorkItemType
                };
                parents.Add(parent);
            }

            if (inRouteIndex != value.RouteToChild.Count - 1)
            {
                return(AddWorkItemMessage(value, parent.Children, inRouteIndex + 1));
            }

            ProcessProgressMessage(value, parent);
            return(parent);
        }
        public async Task Execute(Contracts.ReassignWorkItem task)
        {
            using (unitOfWork)
            {
                var workItem = await writeRepository.GetByIdAsync(WorkItemId.FromGuid(task.WorkItemId));

                workItem.Reassign(task.BrokerId);

                eventSubscriber.Subscribe <WorkItemReassignedEvent>(async x =>
                                                                    await HandleAsync(workItemReassignedHandlers, x));

                await writeRepository.SaveAsync(workItem);
            }
        }
Beispiel #3
0
        internal static WorkItemIdWrapper GetInstance()
        {
            WorkItemId real = default(WorkItemId);

            RealInstanceFactory(ref real);
            var instance = (WorkItemIdWrapper)WorkItemIdWrapper.GetWrapper(real);

            InstanceFactory(ref instance);
            if (instance == null)
            {
                Assert.Inconclusive("Could not Create Test Instance");
            }
            return(instance);
        }
Beispiel #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = WorkItemId.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)QueryType;
         hashCode = (hashCode * 397) ^ MyWorkItems.GetHashCode();
         hashCode = (hashCode * 397) ^ (ProjectName != null ? ProjectName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (WorkItemType != null ? WorkItemType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AssignedTo != null ? AssignedTo.GetHashCode() : 0);
         return(hashCode);
     }
 }
Beispiel #5
0
 public override int GetHashCode()
 {
     return(WorkItemId.GetHashCode());
 }
Beispiel #6
0
 static partial void RealInstanceFactory(ref WorkItemId real, [CallerMemberName] string callerName = "");
Beispiel #7
0
 protected bool Equals(Task other)
 {
     return(WorkItemId.Equals(other.WorkItemId));
 }