GetUsage() private method

private GetUsage ( ) : string
return string
Esempio n. 1
0
        static void Main(string[] args)
        {
            var options = new Options();
            if (Parser.Default.ParseArguments(args, options))
            {
                if (options.ShowHelp)
                {
                    Console.WriteLine(options.GetUsage());
                    return;
                }

                if (options.ShowVersion)
                {
                    Console.WriteLine("jieba.NET 0.38");
                    return;
                }

                if (string.IsNullOrWhiteSpace(options.FileName))
                {
                    Console.WriteLine("No file specified");
                    return;
                }

                SegmentFile(options);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var options = new Options();

            if (CommandLineParser.Default.ParseArguments(args, options))
            {
                if (options.ShowHelp)
                {
                    Console.WriteLine(options.GetUsage());
                    return;
                }

                if (options.ShowVersion)
                {
                    Console.WriteLine("jieba.NET 0.38");
                    return;
                }

                if (string.IsNullOrWhiteSpace(options.FileName))
                {
                    Console.WriteLine("No file specified");
                    return;
                }

                SegmentFile(options);
            }
        }
Esempio n. 3
0
        private static void RunOptions(Options options)
        {
            var seg = new JiebaSegmenter();

            if (options.ShowHelp)
            {
                Console.WriteLine(options.GetUsage());
                return;
            }

            if (options.ShowVersion)
            {
                Console.WriteLine("jieba.NET 0.41");
                return;
            }

            if (string.IsNullOrWhiteSpace(options.FileName))
            {
                Console.WriteLine("No file specified");
                return;
            }

            SegmentFile(options);
        }