Example #1
0
 public IResultWriter EndContext(Globals.ResultWriterDestination dest = Globals.ResultWriterDestination.stdOut)
 {
     if (ContextStack.Count > 0)
     {
         CurrentContext = ContextStack.Pop();
     }
     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());
 }
Example #3
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);
 }
Example #4
0
 public IResultWriter BeginContext(string context, Globals.ResultWriterDestination dest)
 {
     //if (CurrentContext != null && CurrentContext.ContextsWritten++ > 0)
     //IncreaseIndent();
     if (CurrentContext != null)
     {
         ContextStack.Push(CurrentContext);
     }
     CurrentContext = new ResultContext(context);
     Write(context, dest);
     return(this);
 }
 public IResultWriter BeginContext(string context, Globals.ResultWriterDestination dest)
 {
     //if (CurrentContext != null && CurrentContext.ContextsWritten++ > 0)
     //IncreaseIndent();
     if (CurrentContext != null)
     {
         ContextStack.Push(CurrentContext);
     }
     CurrentContext = new ResultContext(context);
     Write(string.Concat(Enumerable.Repeat(Delimiter, IndentationLevel)) + context, dest);
     return(this.IncreaseIndent());
 }
Example #6
0
 public IResultWriter BeginContext(string context, Globals.ResultWriterDestination dest)
 {
     if (CurrentContext != null)
     {
         ContextStack.Push(CurrentContext);
     }
     CurrentContextName    = context.Replace(".", "_");
     CurrentContextName   += String.Join("_", ContextStack.Select(x => x.Name));
     CurrentContext        = new ResultContext(context);
     TableIsCreated        = false;
     ContextColumnIsQuoted = new Dictionary <string, bool>();
     //stdOut.WriteLine(string.Concat(Enumerable.Repeat(Delimiter, IndentationLevel)) + context);
     return(this);
 }
Example #7
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);
 }