Example #1
0
        private static void AddGroupToList(IStorePropertyBag row, Dictionary <Guid, TaskGroupInfo> guidToGroupMapping, TaskGroupInfoList taskGroups)
        {
            TaskGroupInfo taskGroupInfoFromRow = TaskGroup.GetTaskGroupInfoFromRow(row);

            if (taskGroupInfoFromRow == null)
            {
                return;
            }
            TaskGroupInfo taskGroupInfo;

            if (guidToGroupMapping.TryGetValue(taskGroupInfoFromRow.GroupClassId, out taskGroupInfo))
            {
                if (taskGroupInfo.LastModifiedTime.CompareTo(taskGroupInfoFromRow.LastModifiedTime) > 0)
                {
                    taskGroups.DuplicateNodes.Add(taskGroupInfoFromRow);
                    return;
                }
                guidToGroupMapping[taskGroupInfoFromRow.GroupClassId] = taskGroupInfoFromRow;
                taskGroups.DuplicateNodes.Add(taskGroupInfo);
                taskGroups.Remove(taskGroupInfo);
                if (taskGroups.DefaultGroups.ContainsKey(taskGroupInfoFromRow.GroupType))
                {
                    taskGroups.DefaultGroups[taskGroupInfoFromRow.GroupType] = taskGroupInfoFromRow;
                }
            }
            else
            {
                guidToGroupMapping.Add(taskGroupInfoFromRow.GroupClassId, taskGroupInfoFromRow);
                if (taskGroupInfoFromRow.GroupType != TaskGroupType.Normal)
                {
                    taskGroups.DefaultGroups.Add(taskGroupInfoFromRow.GroupType, taskGroupInfoFromRow);
                }
            }
            taskGroups.Add(taskGroupInfoFromRow);
        }
Example #2
0
 public TaskGroupInfo GetTaskGroupInfo()
 {
     return(TaskGroup.GetTaskGroupInfoFromRow(this));
 }