Esempio n. 1
0
 public static SentenseWorker GetInstanse(string content)
 {
     if (instance == null)
     {
         instance = new SentenseWorker(content);
     }
     return(instance);
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Input text or file path:");
            string lineFromConsole = Console.ReadLine();

            if (File.Exists(lineFromConsole))
            {
                lineFromConsole = File.ReadAllText(lineFromConsole);
            }
            SentenseWorker sworker = SentenseWorker.GetInstanse(lineFromConsole);

            sworker.Do();
            Console.WriteLine(sworker.Text);

            Console.ReadLine();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Input text or file path:");
            string lineFromConsole = Console.ReadLine();

            if (File.Exists(lineFromConsole))
            {
                lineFromConsole = File.ReadAllText(lineFromConsole);
                //обработка того, что файл для только чтения
            }
            SentenseWorker sworker = SentenseWorker.GetInstanse(lineFromConsole);

            sworker.Do();
            Console.WriteLine(sworker.Text);

            Console.WriteLine("Press any key to continue...");
            Console.ReadLine();
        }