Ejemplo n.º 1
0
        protected WorkList(IWorkItemRepository repository, string name)
        {
            Repository = repository;

            Name = name ?? string.Empty;

            Visibility     = WorkItemVisibility.Todo;
            AreaOfInterest = null;
            CurrentIndex   = repository.GetCurrentIndex();

            foreach (IWorkItem item in Repository.GetItems())
            {
                _items.Add(item);

                if (!_rowMap.ContainsKey(item.Proxy))
                {
                    _rowMap.Add(item.Proxy, item);
                }
                else
                {
                    // todo daro: warn
                }
            }

            // initializes the state repository if no states for
            // the work items are read yet
            Repository.UpdateVolatileState(_items);

            // todo daro: EnvelopeBuilder as parameter > do not iterate again over items
            //			  look old work item implementation
            Extent = GetExtentFromItems(_items);
        }