public IResultWriter EndOutput(string endStr = "")
 {
     stdOut.Flush();
     VerboseOut.Flush();
     WarningOut.Flush();
     return(this);
 }
Пример #2
0
 public void Flush()
 {
     //stdOut.Flush();
     VerboseOut.Flush();
     ErrorOut.Flush();
     WarningOut.Flush();
 }
Пример #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());
 }
Пример #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);
 }
Пример #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);
 }
Пример #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;
        }
Пример #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;
        }
Пример #9
0
 public IResultWriter WriteVerbose(string line)
 {
     VerboseOut.WriteLine(line);
     return(this);
 }
Пример #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);
 }