Example #1
0
 public override DbgObjectId?GetObjectId(DbgValue value)
 {
     if (value is null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     return(GetRuntimeObjectIdService(value.Runtime).GetObjectId(value));
 }
Example #2
0
 public override bool CanCreateObjectId(DbgValue value)
 {
     if (value == null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     return(GetRuntimeObjectIdService(value.Runtime).CanCreateObjectId(value));
 }
 public override bool Equals(DbgObjectId objectId, DbgValue value)
 {
     if (objectId == null)
     {
         throw new ArgumentNullException(nameof(objectId));
     }
     if (value == null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     return(GetRuntimeObjectIdService(objectId.Runtime).Equals(objectId, value));
 }
Example #4
0
 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();
     }
     engineValueFormatter.FormatType(context, output, valueImpl.EngineValue, options, cultureInfo, cancellationToken);
 }
Example #5
0
 public abstract DbgObjectId GetObjectId(DbgValue value);
Example #6
0
 public abstract bool CanCreateObjectId(DbgValue value);
 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);
     }
 }
Example #8
0
 public abstract bool Equals(DbgObjectId objectId, DbgValue value);
Example #9
0
 public abstract bool CanCreateObjectId(DbgValue value, CreateObjectIdOptions options);
Example #10
0
 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();
     }
     engineFormatter.FormatValue(evalInfo, output, valueImpl.EngineValue, options, cultureInfo);
 }