public void TestConstructAndRun() { string inputFile = @"\TestUtils\HpcInput.txt"; string outputFile = @"\TestUtils\results.txt"; string assemblypath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase).Substring(6); string inputFilePath = assemblypath + inputFile; FileInfo fileInfo = new FileInfo(assemblypath + outputFile); if (fileInfo.Exists) { fileInfo.Delete(); } string[] args = { "-InputFile", "InputFile((\"" + inputFilePath + "\"))", "-Operator", "Sum" }; CommandArguments.ConstructAndRun <AggregateNumbers>(args); FileStream fs = fileInfo.OpenRead(); byte[] buffer = new byte[2]; fs.Read(buffer, 0, 2); System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); Assert.AreEqual(enc.GetString(buffer), "15"); }
public void ValidateConstructAndRunT() { string fileName = Path.GetTempFileName(); fileName = fileName.Replace(Path.GetTempPath(), ""); string[] args = { fileName, "Sum" }; CommandArguments.ConstructAndRun <AggregateNumbers>(args); }
static void Main(string[] args) { try { Console.WriteLine(args.StringJoin(" ")); CommandArguments.ConstructAndRun <Distribute>(args); } catch (Exception e) { Console.Error.WriteLine(e); Environment.ExitCode = -532462766; // general failure. } }
/// <summary> /// Main method /// Sample args :-InputFile InputFile("(C:\Temp\hpc.fasta)") /// Sample args with distribute: -Distribute OnHpcAndWait(MSR-L25-DEV29,26,Priority:AboveNormal,IsExclusive:True) -InputFile InputFile("(\\MSR-L25-DEV29\scratch\Bio.HPC\hpc.fasta)") /// </summary> /// <param name="args"></param> static void Main(string[] args) { Console.Error.WriteLine(Properties.Resources.SampleClusterApp_Splash); try { CommandArguments.ConstructAndRun <SequenceContent>(args, false); } catch (HelpException) { Console.Error.WriteLine(Properties.Resources.SampleClusterApp_Help); Environment.ExitCode = 10022; } catch (Exception e) { Console.Error.WriteLine(e); Environment.ExitCode = -532462766; // general failure. } }
/// <summary> /// main method /// </summary> /// <param name="args">arguments</param> static void Main(string[] args) { Console.Error.WriteLine(Resources.DistributeApp_SplashScreen); try { CommandArguments.ConstructAndRun <Distribute>(args, false); } catch (HelpException) { Console.Error.WriteLine(Properties.Resources.DistributeApp_Help); Environment.ExitCode = 10022; } catch (Exception e) { Console.Error.WriteLine(e); Environment.ExitCode = -532462766; // general failure. } }
/// <summary> /// Main method /// Sample args :-InputFile InputFile("(C:\Temp\hpc.fasta)") /// Sample args with distribute: -Distribute OnHpcAndWait(MSR-L25-DEV29,26,Priority:AboveNormal,IsExclusive:True) -InputFile InputFile("(\\MSR-L25-DEV29\scratch\Bio.HPC\hpc.fasta)") /// </summary> /// <param name="args"></param> static void Main(string[] args) { Console.WriteLine(SplashString()); CommandArguments.ConstructAndRun <SequenceContent>(args); }
static void Main(string[] args) { CommandArguments.ConstructAndRun <AggregateNumbers>(args); }
static void Main(string[] args) { CommandArguments.ConstructAndRun <ConPADE>(args); }