internal WfActivityLevelGroupCollection GetAllLevels(bool autoCalcaulatePath, IWfProcess process) { List <IWfActivityDescriptor> alreadyScanedActivities = new List <IWfActivityDescriptor>(); FindNextStepActivityDescriptor(this.InitialActivity, autoCalcaulatePath, process, alreadyScanedActivities); WfActivityLevelGroupCollection result = new WfActivityLevelGroupCollection(alreadyScanedActivities); //寻找那些在线上不能达到,但是又属于某个环节的 foreach (IWfActivityDescriptor actDesp in this.Activities) { try { WfActivityLevelGroup group = result[actDesp.LevelName]; if (group.Data.Exists(actInGroup => actInGroup.Key == actDesp.Key) == false) { group.Data.Add(actDesp); } } catch (KeyNotFoundException) { } } return(result); }
internal WfActivityLevelGroupCollection GetAllBranchesLevels(bool autoCalcaulatePath, IWfProcess process) { List <IWfActivityDescriptor> alreadyScanedActivities = new List <IWfActivityDescriptor>(); FindAllNextStepActivityDescriptor(this.InitialActivity, autoCalcaulatePath, process, alreadyScanedActivities); WfActivityLevelGroupCollection result = new WfActivityLevelGroupCollection(alreadyScanedActivities); return(result); }