public void StartCommand()
        {
            var people = SelectPersonByParallel.GetListPerson();

            var result = from person in people.AsParallel() where person.City == "Seattle" select person;

            foreach (var person in result)
            {
                Console.WriteLine(person.Name);
            }

            Console.WriteLine("Finished processing. Press a key to end.");
            Console.ReadKey();
        }
        public void StartCommand()
        {
            var people = SelectPersonByParallel.GetListPerson();
            var result = from
                         person in people
                         .AsParallel()
                         .AsOrdered()
                         where person.City == "Seattle" select person;

            foreach (Person person in result)
            {
                Console.WriteLine(person.Name);
            }

            Console.ReadKey();
        }
        public void StartCommand()
        {
            var people = SelectPersonByParallel.GetListPerson();
            var result = from
                         person in people
                         .AsParallel()
                         .WithDegreeOfParallelism(4)
                         .WithExecutionMode(ParallelExecutionMode.ForceParallelism)
                         where person.City == "Seattle" select person;

            foreach (Person person in result)
            {
                Console.WriteLine(person.Name);
            }

            //result.ForAll(element => Console.WriteLine(element.City));

            Console.ReadKey();
        }