コード例 #1
0
        public void Create()
        {
            ConsoleFactory factory = new ConsoleFactory();
            iOutputStream stream = factory.Create();

            Assert.IsNotNull(stream);

            stream.Standard("test");
            stream.Error("test");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: shidephen/gems-cli
        /// <summary>
        /// The main entry point for the example.
        /// </summary>
        /// <param name="pArgs">The arguments from the command line.</param>
        private static void Main(string[] pArgs)
        {
            WriteGreeting();

            CliOptions options = CliOptions.WindowsStyle;

            List<Description> descs = DescriptionFactory.Create(
                options, new HelpResource(Help.ResourceManager),
                "/echo [/mode:string#] /address:string /database:string /username:string [/password:string] filename [output:string]"
                );

            ConsoleFactory consoleFactory = new ConsoleFactory();

            if (pArgs.Length == 0)
            {
                OutputHelp outputHelp = new OutputHelp(options, consoleFactory.Create());
                outputHelp.Show(descs);
                return;
            }

            Request request = RequestFactory.Create(options, pArgs, descs, consoleFactory);
        }