Exemplo n.º 1
0
        public void SetTaskStates(IEnumerable <ITaskState> taskStates)
        {
            if (TaskStates == null)
            {
                TaskStates = new ObservableCollection <ITaskState>();
            }

            if (CheckableTaskStates == null)
            {
                CheckableTaskStates = new ObservableCollection <Checkable <ITaskState> >();
            }

            if (taskStates != null)
            {
                TaskStates.Clear();
                TaskStates.AddRange(taskStates);

                CheckableTaskStates.AddRange(Checkable.Create(taskStates, true));
            }
        }