EndPattern() private méthode

private EndPattern ( string _e, byte numberOfChar, List charsetSelecting ) : List
_e string
numberOfChar byte
charsetSelecting List
Résultat List
        public int EndPattern(string[] args)
        {
            Utility           tools   = new Utility();
            CLI               options = new CLI();
            CommandLineParser parser  = new CommandLineParser(options);

            parser.Parse();

            if (options.EndBlock)
            {
                string s = null;
                for (int i = 0; i < args.Length; i++)
                {
                    if (args[i].ToString().ToLower() == "-e" | args[i].ToString().ToLower() == "--end")
                    {
                        s = args[i + 1];
                    }
                }

                tools.EndPattern(s, Parameter.NumberOfChar, Parameter.CharsetSelecting);
            }
            else if (parser.HasErrors)
            {
                Console.WriteLine(parser.UsageInfo.ToString(78, true));
                return(-1);
            }

            // No errors present and all arguments correct
            // Do work according to arguments
            return(0);
        }
        public int EndPattern(string[] args)
        {
            Utility tools = new Utility();
            CLI options = new CLI();
            CommandLineParser parser = new CommandLineParser(options);
            parser.Parse();

            if (options.EndBlock)
            {
                string s = null;
                for (int i = 0; i < args.Length; i++)
                {
                    
                    if (args[i].ToString().ToLower() == "-e" | args[i].ToString().ToLower() == "--end")
                    {
                        s = args[i + 1];
                    }                    
                }

                tools.EndPattern(s, Parameter.NumberOfChar, Parameter.CharsetSelecting);
            }
            else if (parser.HasErrors)
            {
                Console.WriteLine(parser.UsageInfo.ToString(78, true));
                return -1;
            }

            // No errors present and all arguments correct
            // Do work according to arguments
            return 0;
        }
        } // End Fonction

        internal List<string> ChangeEndblockPattern(List<string> charsetSelecting, byte numberOfChar)
        {
            Utility obj = new Utility();
            bool b = true;

            while (b)
            {
                SetColorThemes();
                Console.Write(lang.GetString("ChangeEndblockPattern"));
                
                SetColorAsk();
                try
                {
                    Console.ForegroundColor = ConsoleColor.DarkGreen;
                    ConsoleKeyInfo info = Console.ReadKey(true);
                    Console.ResetColor();

                    if (info.Key == ConsoleKey.Y)
                    {

                        Console.Write(lang.GetString("ChangeEndblockPattern1"));

                        Console.ForegroundColor = ConsoleColor.DarkGreen;
                        string s = Console.ReadLine();
                        Console.ResetColor();

                        if (s.Length >= 2 | s != null)
                        {
                            obj.EndPattern(s, numberOfChar, charsetSelecting);
                            b = false;
                        }
                    }
                    if (info.Key == ConsoleKey.N)
                    {
                        b = false;
                    }
                }

                catch (Exception e)
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("\n {0} \n", e.Message);
                    Console.ResetColor();
                }
            }

            return charsetSelecting;

        } // End Fonction