Ejemplo n.º 1
0
        internal DkmClrValue(
            object value,
            object hostObjectValue,
            DkmClrType type,
            string alias,
            IDkmClrFormatter formatter,
            DkmEvaluationResultFlags evalFlags,
            DkmClrValueFlags valueFlags,
            DkmEvaluationResultCategory category = default(DkmEvaluationResultCategory),
            DkmEvaluationResultAccessType access = default(DkmEvaluationResultAccessType),
            ulong nativeComPointer = 0)
        {
            Debug.Assert(!type.GetLmrType().IsTypeVariables() || (valueFlags == DkmClrValueFlags.Synthetic));
            Debug.Assert((alias == null) || evalFlags.Includes(DkmEvaluationResultFlags.HasObjectId));
            // The "real" DkmClrValue will always have a value of zero for null pointers.
            Debug.Assert(!type.GetLmrType().IsPointer || (value != null));

            this.RawValue         = value;
            this.HostObjectValue  = hostObjectValue;
            this.Type             = type;
            _formatter            = formatter;
            this.Alias            = alias;
            this.EvalFlags        = evalFlags;
            this.ValueFlags       = valueFlags;
            this.Category         = category;
            this.Access           = access;
            this.NativeComPointer = nativeComPointer;
        }
Ejemplo n.º 2
0
        internal DkmClrValue(
            object value,
            object hostObjectValue,
            DkmClrType type,
            string alias,
            IDkmClrFormatter formatter,
            DkmEvaluationResultFlags evalFlags,
            DkmClrValueFlags valueFlags,
            DkmEvaluationResultCategory category = default(DkmEvaluationResultCategory),
            DkmEvaluationResultAccessType access = default(DkmEvaluationResultAccessType),
            ulong nativeComPointer = 0)
        {
            Debug.Assert((type == null) || !type.GetLmrType().IsTypeVariables() || (valueFlags == DkmClrValueFlags.Synthetic));
            Debug.Assert((alias == null) || evalFlags.Includes(DkmEvaluationResultFlags.HasObjectId));
            // The "real" DkmClrValue will always have a value of zero for null pointers.
            Debug.Assert((type == null) || !type.GetLmrType().IsPointer || (value != null));

            this.RawValue = value;
            this.HostObjectValue = hostObjectValue;
            this.Type = type;
            _formatter = formatter;
            this.Alias = alias;
            this.EvalFlags = evalFlags;
            this.ValueFlags = valueFlags;
            this.Category = category;
            this.Access = access;
            this.NativeComPointer = nativeComPointer;
        }
Ejemplo n.º 3
0
 internal DkmInspectionContext(IDkmClrFormatter formatter, DkmEvaluationFlags evaluationFlags, uint radix, DkmRuntimeInstance runtimeInstance = null)
 {
     _formatter           = formatter;
     this.EvaluationFlags = evaluationFlags;
     this.Radix           = radix;
     this.RuntimeInstance = runtimeInstance ?? DkmClrRuntimeInstance.DefaultRuntime;
 }
 internal DkmInspectionContext(IDkmClrFormatter formatter, DkmEvaluationFlags evaluationFlags, uint radix, DkmRuntimeInstance runtimeInstance = null)
 {
     _formatter = formatter;
     this.EvaluationFlags = evaluationFlags;
     this.Radix = radix;
     this.RuntimeInstance = runtimeInstance ?? DkmClrRuntimeInstance.DefaultRuntime;
 }
Ejemplo n.º 5
0
 internal static DkmInspectionContext CreateDkmInspectionContext(
     IDkmClrFormatter formatter,
     DkmEvaluationFlags flags,
     uint radix,
     DkmRuntimeInstance runtimeInstance = null)
 {
     return(new DkmInspectionContext(formatter, flags, radix, runtimeInstance));
 }
Ejemplo n.º 6
0
        protected ResultProviderTestBase(ResultProvider resultProvider, DkmInspectionContext defaultInspectionContext)
        {
            _formatter      = resultProvider.Formatter;
            _resultProvider = resultProvider;
            this.DefaultInspectionContext = defaultInspectionContext;

            // We never want to swallow Exceptions (generate a non-fatal Watson) when running tests.
            ExpressionEvaluatorFatalError.IsFailFastEnabled = true;
        }
Ejemplo n.º 7
0
        internal DkmClrValue(
            object value,
            object hostObjectValue,
            DkmClrType type,
            string alias,
            IDkmClrFormatter formatter,
            DkmEvaluationResultFlags evalFlags,
            DkmClrValueFlags valueFlags)
        {
            Debug.Assert(!type.GetLmrType().IsTypeVariables() || (valueFlags == DkmClrValueFlags.Synthetic));
            Debug.Assert((alias == null) || evalFlags.Includes(DkmEvaluationResultFlags.HasObjectId));
            // The "real" DkmClrValue will always have a value of zero for null pointers.
            Debug.Assert(!type.GetLmrType().IsPointer || (value != null));

            _rawValue            = value;
            this.HostObjectValue = hostObjectValue;
            this.Type            = type;
            _formatter           = formatter;
            this.Alias           = alias;
            this.EvalFlags       = evalFlags;
            this.ValueFlags      = valueFlags;
        }
Ejemplo n.º 8
0
        internal DkmClrValue(
            object value,
            object hostObjectValue,
            DkmClrType type,
            string alias,
            IDkmClrFormatter formatter,
            DkmEvaluationResultFlags evalFlags,
            DkmClrValueFlags valueFlags,
            DkmInspectionContext inspectionContext)
        {
            Debug.Assert(!type.GetLmrType().IsTypeVariables() || (valueFlags == DkmClrValueFlags.Synthetic));
            Debug.Assert((alias == null) || evalFlags.Includes(DkmEvaluationResultFlags.HasObjectId));
            // The "real" DkmClrValue will always have a value of zero for null pointers.
            Debug.Assert(!type.GetLmrType().IsPointer || (value != null));

            _rawValue = value;
            this.HostObjectValue = hostObjectValue;
            this.Type = type;
            _formatter = formatter;
            this.Alias = alias;
            this.EvalFlags = evalFlags;
            this.ValueFlags = valueFlags;
            this.InspectionContext = inspectionContext ?? new DkmInspectionContext(formatter, DkmEvaluationFlags.None, 10);
        }
Ejemplo n.º 9
0
 internal ResultProviderTestBase(ResultProvider resultProvider, DkmInspectionContext defaultInspectionContext)
 {
     _formatter      = resultProvider.Formatter;
     _resultProvider = resultProvider;
     this.DefaultInspectionContext = defaultInspectionContext;
 }
            private readonly IDkmClrFormatter _fallback; // Remove and dispatch calls through DkmInspectionContext.

            internal CustomFormatter(IDkmClrFormatter2 fallback)
            {
                _fallback = (IDkmClrFormatter)fallback;
            }
Ejemplo n.º 11
0
 internal DkmInspectionContext(IDkmClrFormatter formatter, DkmEvaluationFlags evaluationFlags, uint radix)
 {
     _formatter           = formatter;
     this.EvaluationFlags = evaluationFlags;
     this.Radix           = radix;
 }
Ejemplo n.º 12
0
            private readonly IDkmClrFormatter _fallback; // Remove and dispatch calls through DkmInspectionContext.

            internal CustomFormatter(IDkmClrFormatter2 fallback)
            {
                _fallback = (IDkmClrFormatter)fallback;
            }
Ejemplo n.º 13
0
 internal DkmInspectionContext(IDkmClrFormatter formatter, DkmEvaluationFlags evaluationFlags, uint radix)
 {
     _formatter = formatter;
     this.EvaluationFlags = evaluationFlags;
     this.Radix = radix;
 }
Ejemplo n.º 14
0
 internal static DkmInspectionContext CreateDkmInspectionContext(IDkmClrFormatter formatter, DkmEvaluationFlags flags, uint radix)
 {
     return(new DkmInspectionContext(formatter, flags, radix));
 }