public override void FormatType(DbgEvaluationInfo evalInfo, IDbgTextWriter output, DbgValue value, DbgValueFormatterTypeOptions 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.FormatType(evalInfo, output, valueImpl.EngineValue, options, cultureInfo); } catch (Exception ex) when(ExceptionUtils.IsInternalDebuggerError(ex)) { WriteError(output); } }
public override void FormatType(DbgEvaluationContext context, ITextColorWriter output, DbgValue value, DbgValueFormatterTypeOptions options, CultureInfo cultureInfo, CancellationToken cancellationToken) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (!(context is DbgEvaluationContextImpl)) { throw new ArgumentException(); } if (context.Language != Language) { throw new ArgumentException(); } if (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.FormatType(context, output, valueImpl.EngineValue, options, cultureInfo, cancellationToken); }