示例#1
0
 void IScriptGlobalsHelper.Print(ScriptGlobals globals, CachedWriter writer, object color, Exception ex)
 {
     if (!IsCurrentScript(globals))
     {
         return;
     }
     writer.Write(Format(ex), color);
 }
示例#2
0
 void IScriptGlobalsHelper.Print(ScriptGlobals globals, CachedWriter writer, object color, PrintOptionsImpl printOptions, object value)
 {
     if (!IsCurrentScript(globals))
     {
         return;
     }
     ObjectOutput(writer, color, printOptions, value);
 }
示例#3
0
        void ObjectOutput(CachedWriter writer, object color, PrintOptionsImpl printOptions, object value)
        {
            var writable = GetOutputWritable(printOptions, value);

            if (writable != null)
            {
                writable.WriteTo(writer);
            }
            else
            {
                writer.Write(Format(value, printOptions.RoslynPrintOptions), color);
            }
        }
示例#4
0
 public void PrintLine(CachedWriter cw, object value, object color)
 {
     Print(cw, value, color);
     PrintLine();
 }
示例#5
0
 public void PrintLine(CachedWriter cw, Exception ex, object color)
 {
     Print(cw, ex, color);
     PrintLine();
 }
示例#6
0
 public void Print(CachedWriter cw, object value, object color) => owner.Print(this, cw, color, cw.PrintOptions, value);
示例#7
0
 public void Print(CachedWriter cw, Exception ex, object color) => owner.Print(this, cw, color, ex);