Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            IFileReader     textReader = new TextReader(Properties.Settings.Default.FilePath);
            List <TextLine> textLines  = (List <TextLine>)textReader.Read();

            if (textLines == null)
            {
                return;
            }

            List <Word> wordsInText = (TextLine.Parse(textLines));

            Console.WriteLine(Parser.GetCorcodance(wordsInText));
            try
            {
                Serializator.SerializeConcordance(wordsInText);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return;
            }
            wordsInText.Clear();
            try
            {
                wordsInText = Serializator.DeserializeConcordance();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return;
            }
        }