예제 #1
0
            public static HassiumProcess _new(VirtualMachine vm, HassiumObject self, SourceLocation location, params HassiumObject[] args)
            {
                HassiumProcess process = new HassiumProcess();

                process.StartInfo         = new ProcessStartInfo(args[0].ToString(vm, args[0], location).String, args[1].ToString(vm, args[1], location).String);
                process.Process           = new Process();
                process.Process.StartInfo = process.StartInfo;

                return(process);
            }
예제 #2
0
            public HassiumProcess exec(VirtualMachine vm, HassiumObject self, SourceLocation location, params HassiumObject[] args)
            {
                StringBuilder arguments = new StringBuilder();

                for (int i = 1; i < args.Length; i++)
                {
                    arguments.AppendFormat("{0} ", args[i].ToString(vm, args[i], location).String);
                }
                if (args.Length > 1)
                {
                    arguments.Remove(arguments.Length - 1, 1);
                }
                var proc = new HassiumProcess(Process.Start(args[0].ToString(vm, args[0], location).String, arguments.ToString()));

                return(proc);
            }