Example #1
0
        public void Sort()
        {
            SortStrategy.Sort(_list);

            foreach (string item in _list)
            {
                Console.WriteLine(" {0} \n", item);
            }
        }
Example #2
0
 public void Sort()
 {
     _sortStrategy.Sort(_list);
     foreach (var name in _list)
     {
         Console.WriteLine(" " + name);
     }
     Console.WriteLine();
 }
        public void Sort()
        {
            _sortedStrategy.Sort(_list);

            foreach (var item in _list)
            {
                Console.WriteLine($" {item}");
            }
        }
Example #4
0
        public void Sort()
        {
            _sortStrategy.Sort(_list);

            foreach (string name in _list)
            {
                Console.WriteLine($" {name}\n");
            }
        }
Example #5
0
        public void Sort()
        {
            _sortStrategy.Sort(_list);

            foreach (string name in _list)
            {
                Console.WriteLine(" {0}", name);
            }
            Console.WriteLine();
        }
Example #6
0
 public void Sort()
 {
     _sortstrategy.Sort(_list);
     // Iterate over list and display results
     foreach (string name in _list)
     {
         Console.WriteLine(" " + name);
     }
     Console.WriteLine();
 }
Example #7
0
        public void Sort()
        {
            _sortStrategy.Sort(_list);

            foreach (var item in _list)
            {
                Console.WriteLine($"Itens {item}");
            }

            Console.Read();
        }
Example #8
0
        public void Sort()
        {
            sortStrategy.Sort(this.list);

            foreach (string name in this.list)
            {
                Console.WriteLine(" " + name);
            }

            Console.WriteLine();
        }
Example #9
0
        public void Sort()
        {
            _sortstrategy.Sort(_list);

            // Iterar sobre la lista y mostrar resultados

            foreach (string name in _list)
            {
                Console.WriteLine(" " + name);
            }
            Console.WriteLine();
        }
Example #10
0
        public void Sort()
        {
            var watch = System.Diagnostics.Stopwatch.StartNew();

            _sortstrategy.Sort(_list);
            watch.Stop();
            var elapsedMs = watch.Elapsed;

            foreach (int cnt in _list)
            {
                Console.Write(" " + cnt);
            }
            Console.WriteLine(elapsedMs);
        }
        // The Context
        void ButtonClick(object sender, EventArgs e)
        {
            Button           control  = sender as Button;
            SortStrategy <T> strategy = SelectStrategy(control.Name);
            IEnumerable <T>  newlist  = Generator();

            DrawGraph(newlist);
            if (strategy == null)
            {
                return;
            }

            // DrawGraph will be invoked during sorting when the UpdateUI event is triggered
            strategy.UpdateUI += new Action <IEnumerable <T> >(DrawGraph);
            strategy.Sort(newlist);
        }
Example #12
0
 public void Sort()
 {
     sortstrategy.Sort(list);
 }
Example #13
0
 public void Sort()
 {
     _sortStrategy.Sort(_list);
 }
Example #14
0
 public void Sort()
 {
     sortStrategy.Sort(ref array);
 }