Currently my application takes in a text file/files, parses them into another file type and puts them on disk. I then call a secondary program (not mine) to process THAT text file into a third.
The foreign program basically does one thing:
program.exe --input:foo.txt --output:bar.txt
What I would like to know... could I replace the foo.txt and bar.txt with string[] in my "object".
Instead of pulling the information from the text file, and putting out into a new text file... I want to pull the info from the variable I have... into another variable I would make.
Basically I'm trying to save the process of creating two stacks of files via piping out of one variable into another. I'm just unsure of how to go about it.
What I have now (For the most part, with some fluff removed):
public bool _Out_Schema(string output)
{
clear(output); // clear output directory
// Assign schema name to path
string path = output + '\\' + lf.filename + ".schema";
using (StreamWriter SW = new StreamWriter(path))
{
SW.Write(lf._schema);
}
return true;
}
public bool _Out_UFD(string input, string output)
{
clear(output); // clear output directory
ProcessStartInfo SI = new ProcessStartInfo();
SI.CreateNoWindow = true;
SI.WindowStyle = ProcessWindowStyle.Hidden;
SI.FileName = "ufdschema.exe"; // foreign program
SI.Arguments = String.Format("--ischema={0}\\{2}.schema --oufd={1}\\{2}.ufd", input, output, (FI.Name.Split('.'))[0]);
using (Process P = Process.Start(SI)) { P.WaitForExit(); }
return true;
}
I'd like to take the lf.schema (string variable) as an input... and create something like lf.ufd as an output