private void ParseCommandLineParameters()
        {
            if (CommandLineParameters != null)
            {
                char[] trimStart  = new char[] { '-', '/', ' ' };
                char[] trimQuotes = new char[] { '"', ' ' };

                for (int i = 0; i < CommandLineParameters.Length; i++)
                {
                    string parameter = CommandLineParameters[i].TrimStart(trimStart).ToLower();
                    switch (parameter)
                    {
                    case "i":
                    case "input":
                        InputFile = GetNextCommandLineParameter(i++).Trim(trimQuotes);
                        break;

                    case "o":
                    case "output":
                        OutputFile = GetNextCommandLineParameter(i++).Trim(trimQuotes);
                        break;

                    case "f":
                    case "searchandreplacefile":
                        SearchAndReplaceFile       = GetNextCommandLineParameter(i++);
                        SearchAndReplaceDataSource = SearchAndReplaceDataSource.FromFile;
                        break;

                    case "e":
                    case "existingset":
                        string existingSetCommandLineName = GetNextCommandLineParameter(i++);
                        int    existingSetInfoIndex       = SearchAndReplaceUtil.GetExistingSetInfoIndexByCommandLineName(existingSetCommandLineName);
                        if (existingSetInfoIndex < 0)
                        {
                            throw new Exception("Unknown set: " + existingSetCommandLineName);
                        }
                        SearchAndReplaceExistingSetInfo = SearchAndReplaceUtil.ExistingSets[existingSetInfoIndex];
                        SearchAndReplaceContent         = SearchAndReplaceUtil.GetExistingSetByCommandLineName(existingSetCommandLineName);
                        SearchAndReplaceDataSource      = SearchAndReplaceDataSource.ExistingSet;
                        break;

                    case "c":
                    case "custom":
                        SearchAndReplaceContent    = SearchAndReplaceUtil.GetSetFromCSV(GetNextCommandLineParameter(i++));
                        SearchAndReplaceDataSource = SearchAndReplaceDataSource.Custom;
                        break;

                    case "noui":
                        NoUI = true;
                        break;

                    default:
                        throw new Exception("Unknown parameter: " + parameter);
                    }
                }
            }
        }
        private void SetDefaults()
        {
            SearchAndReplaceMethod = SearchAndReplaceMethod.LineByLine;
            OutputFile             = "SearchAndReplaceOutput.txt";
            NoUI = false;

            // Remove Diacritics existing set
            SearchAndReplaceDataSource = SearchAndReplaceDataSource.ExistingSet;
            string existingSetCommandLineName = "RemoveDiacritics";

            SearchAndReplaceExistingSetInfo = SearchAndReplaceUtil.ExistingSets[SearchAndReplaceUtil.GetExistingSetInfoIndexByCommandLineName(existingSetCommandLineName)];
            SearchAndReplaceContent         = SearchAndReplaceUtil.GetExistingSetByCommandLineName(existingSetCommandLineName);
        }