예제 #1
0
 private static int Main(string[] args)
 {
     return(ConsoleApplication.Execute
            <TaskConsoleParameters>(
                args,
                _ => new TaskProcess().Execute(_)
                ));
 }
예제 #2
0
 public static int Main(string[] args)
 {
     if (args.Contains("--debug"))
     {
         Debugger.Launch();
     }
     return(ConsoleApplication.Execute <ServerParameters>(args, Execute, true));
 }
예제 #3
0
        static void Main(string[] args)
        {
            Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();

            Console.Title = string.Format("{0} v{1}", Helper.GetAssemblyTitle(thisAssembly), Helper.GetProductVersion(thisAssembly));
            Console.WriteLine(Console.Title);
            Console.WriteLine(Helper.GetAssemblyDescription(thisAssembly));
            int exitCode = ConsoleApplication.Execute <IssueWatcherApplication>(args);

            Environment.Exit(exitCode);
        }
예제 #4
0
 /// <summary/>
 public static int Main(string[] args)
 {
     return(ConsoleApplication.Execute(args, (XsltConsoleParameters _) => {
         var xsl = new XslCompiledTransform();
         _.Log.Debug("Loading xslt...");
         xsl.Load(_.XsltFile, XsltSettings.TrustedXslt, new XmlUrlResolver());
         _.Log.Debug("Xslt ok...");
         using (var s = string.IsNullOrWhiteSpace(_.OutFile) ? Console.Out : new StreamWriter(_.OutFile)) {
             _.Log.Debug("Prepare args...");
             var xargs = new XsltArgumentList();
             foreach (var p in _.XsltParameters)
             {
                 xargs.AddParam(p.Key, "", p.Value);
             }
             xargs.AddExtensionObject("qorpent://std", new XsltStdExtensions());
             _.Log.Debug("Args ok...");
             _.Log.Debug("Start transform...");
             xsl.Transform(_.SourceFile, xargs, s);
             s.Flush();
             _.Log.Debug("Transform ok...");
         }
         return 0;
     }));
 }