예제 #1
0
        public void Execute(string[] args)
        {
            var pArgs = ProcessArguments(Console.Out, args);
            if (pArgs == null)
                return;

            var host = new CmdLineHost();
            var ldr = new Loader(services);
            object defaultTo;
            if (pArgs.TryGetValue("--default-to", out defaultTo))
            {
                ldr.DefaultToFormat = (string)defaultTo;
            }
            var dec = new DecompilerDriver(ldr, host, services);

            if (OverridesRequested(pArgs))
            {
                DecompileRawImage(dec, pArgs);
            }
            else if (pArgs.ContainsKey("filename"))
            {
                dec.Decompile((string)pArgs["filename"]);
            }
            else
            {
                Usage(Console.Out);
            }
        }
예제 #2
0
        public void Execute(string[] args)
        {
            var pArgs = ProcessArguments(Console.Out, args);

            if (pArgs == null)
            {
                return;
            }

            var    host = new CmdLineHost();
            var    ldr  = new Loader(services);
            object defaultTo;

            if (pArgs.TryGetValue("--default-to", out defaultTo))
            {
                ldr.DefaultToFormat = (string)defaultTo;
            }
            var dec = new DecompilerDriver(ldr, host, services);

            if (OverridesRequested(pArgs))
            {
                DecompileRawImage(dec, pArgs);
            }
            else if (pArgs.ContainsKey("filename"))
            {
                dec.Decompile((string)pArgs["filename"]);
            }
            else
            {
                Usage(Console.Out);
            }
        }