Ejemplo n.º 1
0
        public static int Main(string[] args)
        {
            var serviceProvider = new WixToolsetServiceProvider();
            var listener        = new ConsoleMessageListener("WXCP", "wixcop.exe");

            serviceProvider.AddService <IMessageListener>((x, y) => listener);
            serviceProvider.AddService <IWixCopCommandLineParser>((x, y) => new WixCopCommandLineParser(x));

            var program = new Program();

            return(program.Run(serviceProvider, args));
        }
Ejemplo n.º 2
0
        public static WixCopRunnerResult Execute(string[] args)
        {
            var listener = new TestMessageListener();

            var serviceProvider = new WixToolsetServiceProvider();

            serviceProvider.AddService <IMessageListener>((x, y) => listener);
            serviceProvider.AddService <IWixCopCommandLineParser>((x, y) => new WixCopCommandLineParser(x));

            var exitCode = Execute(serviceProvider, args);

            return(new WixCopRunnerResult
            {
                ExitCode = exitCode,
                Messages = listener.Messages.ToArray()
            });
        }