public void SimpleTrace_ParallelTaskTest() { RjkSimpleTrace st = new RjkSimpleTrace("c:\\temp\\x\\y\\z\\parallel.txt"); Action printVals = () => { int id = GetNextID(); RjkSimpleTrace stx = new RjkSimpleTrace(); for (int val = 0; val < 1000; val++) stx.WriteLine(string.Format("[{0}]:{1}", id, val)); }; Task tA = new Task(printVals); Task tB = new Task(printVals); Task tC = new Task(printVals); tA.Start(); tB.Start(); tC.Start(); tA.Wait(); tB.Wait(); tC.Wait(); st.FlushCache(); }
public void SimpleTrace_BasicFunctionality() { RjkSimpleTrace st = new RjkSimpleTrace("c:\\temp\\q\\r\\s\\trace1.txt"); st.WriteLine("a"); st.WriteLine("b"); st.WriteLine("c"); st.WriteLine("d"); st.WriteLine("e"); st.FlushCache(); }