public IResultWriter EndOutput(string endStr = "")
 {
     stdOut.Flush();
     VerboseOut.Flush();
     WarningOut.Flush();
     return(this);
 }
Beispiel #2
0
 public void Flush()
 {
     //stdOut.Flush();
     VerboseOut.Flush();
     ErrorOut.Flush();
     WarningOut.Flush();
 }
Beispiel #3
0
 public IResultWriter EndOutput(string endStr = "")
 {
     stdOut.WriteLine("}");
     VerboseOut.WriteLine("Ending output");
     stdOut.Flush();
     VerboseOut.Flush();
     return(this);
 }
 public IResultWriter EndContext(Globals.ResultWriterDestination dest = Globals.ResultWriterDestination.stdOut)
 {
     stdOut.Flush();
     VerboseOut.Flush();
     if (ContextStack.Count > 0)
     {
         CurrentContext = ContextStack.Pop();
     }
     return(this.DecreaseIndent());
 }
Beispiel #5
0
 public IResultWriter EndContext(Globals.ResultWriterDestination dest = Globals.ResultWriterDestination.stdOut)
 {
     Write("}", dest);
     stdOut.Flush();
     VerboseOut.Flush();
     if (ContextStack.Count > 0)
     {
         CurrentContext = ContextStack.Pop();
     }
     return(this);
 }
Beispiel #6
0
 public IResultWriter BeginContext(string context, Globals.ResultWriterDestination dest)
 {
     if (CurrentContext != null)
     {
         if (CurrentContext.ContextsWritten++ > 0)
         {
             stdOut.Write("," + Environment.NewLine);
         }
         ContextStack.Push(CurrentContext);
         CurrentContext = new ResultContext(context);
     }
     else
     {
         CurrentContext = new ResultContext(context, 1);
     }
     Write(context.DoubleQuote() + ": {", dest);
     VerboseOut.WriteLine("Beginning context " + CurrentContext.Name);
     return(this);
 }
Beispiel #7
0
        protected virtual void Dispose(bool disposing = true)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                stdOut.Close();
                VerboseOut.Close();
                ErrorOut.Close();
                WarningOut.Close();
                stdOut.Dispose();
                VerboseOut.Dispose();
                ErrorOut.Dispose();
                WarningOut.Dispose();
            }

            _disposed = true;
        }
Beispiel #8
0
        protected virtual void Dispose(bool disposing = true)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                stdOut.Close();
                VerboseOut.Close();
                ErrorOut.Close();
                WarningOut.Close();
                stdOut.Dispose();
                VerboseOut.Dispose();
                ErrorOut.Dispose();
                WarningOut.Dispose();
            }

            // release any unmanaged objects
            // set the object references to null

            _disposed = true;
        }
Beispiel #9
0
 public IResultWriter WriteVerbose(string line)
 {
     VerboseOut.WriteLine(line);
     return(this);
 }
Beispiel #10
0
 public IResultWriter BeginOutput(string beginStr = "")
 {
     stdOut.WriteLine("{");
     VerboseOut.WriteLine("Beginning output");
     return(this);
 }
 public IResultWriter WriteVerbose(string line)
 {
     VerboseOut.WriteLine(string.Concat(Enumerable.Repeat(Delimiter, IndentationLevel)) + line);
     return(this);
 }