public static cape.ProcessLauncher forSelf() { var exe = cape.CurrentProcess.getExecutableFile(); if (!(exe != null)) { return(null); } var v = new cape.ProcessLauncher(); v.setFile(exe); return(v); }
/// <summary> /// Creates a launcher for the given executable file. If the file does not exist, /// this method returns a null object instead. /// </summary> public static cape.ProcessLauncher forFile(cape.File file, object[] @params = null) { if (file == null || file.isFile() == false) { return(null); } var v = new cape.ProcessLauncher(); v.setFile(file); if (@params != null) { var n = 0; var m = @params.Length; for (n = 0; n < m; n++) { var param = @params[n] as string; if (param != null) { v.addToParams(param); } } } return(v); }