Beispiel #1
0
        public void ConvertWordLibrary(Predicate <WordLibrary> match)
        {
            int i = 0;

            using (var sr = new StreamReader(path, encoding))
            {
                try
                {
                    while (sr.Peek() != -1)
                    {
                        string          line = sr.ReadLine();
                        WordLibraryList wll  = import.ImportLine(line);
                        import.CurrentStatus = i++;
                        foreach (WordLibrary wl in wll)
                        {
                            if (wl != null && match(wl))
                            {
                                sw.WriteLine(export.ExportLine(wl));
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
#if DEBUG
                    throw ex;
#endif
                }
            }
        }