예제 #1
0
        public List <KeyValuePair <int, List <PerformanceTaskNameFormatted> > > GetRowLevelPerformanceTaskList()
        {
            Dictionary <int, List <PerformanceTaskNameFormatted> > aRow = new Dictionary <int, List <PerformanceTaskNameFormatted> >();
            IDictionaryEnumerator enumerator = RowLevelPerformanceTasks.GetEnumerator();

            int counter = 0;

            while (enumerator.MoveNext())
            {
                PerformanceTaskInformation info1        = enumerator.Value as PerformanceTaskInformation;
                int workerRowCounter                    = (int)(info1.PerformanceTaskName.Split("|".ToCharArray())[1]).ParseInt();
                List <PerformanceTaskNameFormatted> lst = GetList(aRow, workerRowCounter);
                PerformanceTaskNameFormatted        tnf = new PerformanceTaskNameFormatted(workerRowCounter, counter, info1.PerformanceTaskName.Split("|".ToCharArray())[0], info1.Duration);
                lst.Add(tnf);
                if (aRow.ContainsKey(workerRowCounter))
                {
                    aRow[workerRowCounter] = lst;
                }
                else
                {
                    aRow.Add(workerRowCounter, lst);
                }
                counter++;
            }
            List <KeyValuePair <int, List <PerformanceTaskNameFormatted> > > aRowList = (from r in aRow
                                                                                         orderby r.Key
                                                                                         select r).ToList();

            return(aRowList);
        }
예제 #2
0
 public bool ContainsKey(object key)
 {
     return(RowLevelPerformanceTasks.ContainsKey(key));
 }