protected override IList <TaskItemViewModel> FillTasks(IEnumerable <ContactItemViewModel> contacts)
        {
            var result = TaskGenerator.GenerateTasks(contacts.ToList());

            ReleaseDataIfNeeded();
            return(result);
        }
예제 #2
0
        public static IList <TaskItemViewModel> GenerateTasks(IList <ContactItemViewModel> contacts, int contactsCount = 10)
        {
            var contactsForTaskGenerator    = SelectRandomContacts(contacts, contactsCount);
            List <TaskItemViewModel> result = new List <TaskItemViewModel>();

            foreach (var contact in contactsForTaskGenerator)
            {
                foreach (string s in OfficeTasks)
                {
                    result.Add(GenerateTask(s, TaskCategory.Work, contact));
                }
            }
            foreach (string s in HouseTasks)
            {
                result.Add(TaskGenerator.GenerateTask(s, TaskCategory.HouseChores, null));
            }
            foreach (string s in ShoppingTasks)
            {
                result.Add(GenerateTask(s, TaskCategory.Shopping, null));
            }

            return(result);
        }
예제 #3
0
 protected override IList <TaskItemViewModel> FillTasks(IEnumerable <ContactItemViewModel> contacts)
 {
     return(TaskGenerator.GenerateTasks(contacts.ToList()));
 }