Exemple #1
0
 public static void RemoveAll(this SadConsole.ConsoleCollection _thisCliClec)
 {
     foreach (SadConsole.Console cli in _thisCliClec.ToList())
     {
         _thisCliClec.Remove(cli);
     }
 }
Exemple #2
0
 public static void RemoveAll <T>(this SadConsole.ConsoleCollection _thisCliClec) where T : SadConsole.Console
 {
     foreach (SadConsole.Console cli in _thisCliClec.ToList())
     {
         if (cli is T cliAsT)
         {
             _thisCliClec.Remove(cliAsT);
         }
     }
 }
Exemple #3
0
        public static void RemoveAll <T>(this SadConsole.ConsoleCollection _thisCliClec, out IEnumerable <T> removedElements) where T : SadConsole.Console
        {
            var removed = new List <T>();

            foreach (SadConsole.Console cli in _thisCliClec.ToList())
            {
                if (cli is T cliAsT)
                {
                    removed.Add(cliAsT);
                    _thisCliClec.Remove(cli);
                }
            }

            removedElements = removed;
        }
Exemple #4
0
 public static void RemoveAll(this SadConsole.ConsoleCollection _thisCliClec, out ICollection <SadConsole.Console> removedElements)
 {
     removedElements = _thisCliClec.ToList();
     RemoveAll(_thisCliClec);
 }
Exemple #5
0
 public static void RemoveAll(this SadConsole.ConsoleCollection _thisCliClec, out IEnumerable <SadConsole.Console> removedElements)
 {
     removedElements = _thisCliClec.AsEnumerable();
     RemoveAll(_thisCliClec);
 }
Exemple #6
0
 public static void RemoveAll <T>(this SadConsole.ConsoleCollection _thisCliClec, out ICollection <T> removedElements) where T : SadConsole.Console
 {
     RemoveAll <T>(_thisCliClec, out IEnumerable <T> removedByType);
     removedElements = removedByType.ToList();
 }