public override void FormatValue(DbgEvaluationInfo evalInfo, IDbgTextWriter output, DbgValue value, DbgValueFormatterOptions options, CultureInfo cultureInfo)
 {
     if (evalInfo == null)
     {
         throw new ArgumentNullException(nameof(evalInfo));
     }
     if (!(evalInfo.Context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     if (output == null)
     {
         throw new ArgumentNullException(nameof(output));
     }
     if (value == null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     if (!(value is DbgValueImpl valueImpl))
     {
         throw new ArgumentException();
     }
     if (value.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     try {
         engineFormatter.FormatValue(evalInfo, output, valueImpl.EngineValue, options, cultureInfo);
     }
     catch (Exception ex) when(ExceptionUtils.IsInternalDebuggerError(ex))
     {
         WriteError(output);
     }
 }
Example #2
0
 public override void FormatValue(DbgEvaluationInfo evalInfo, ITextColorWriter output, DbgValue value, DbgValueFormatterOptions options, CultureInfo cultureInfo)
 {
     if (evalInfo == null)
     {
         throw new ArgumentNullException(nameof(evalInfo));
     }
     if (!(evalInfo.Context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     if (output == null)
     {
         throw new ArgumentNullException(nameof(output));
     }
     if (value == null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     if (!(value is DbgValueImpl valueImpl))
     {
         throw new ArgumentException();
     }
     if (value.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     engineFormatter.FormatValue(evalInfo, output, valueImpl.EngineValue, options, cultureInfo);
 }