提交 7b431891 编写于 作者: C Charles Stoner

Revert change to GetMemberValueDelegate

上级 a9f84c92
......@@ -598,7 +598,7 @@ class B
}
";
DkmClrRuntimeInstance runtime = null;
GetMemberValueDelegate getMemberValue = (v, n, t, p, i) => (n == "Q") ? CreateErrorValue(runtime.GetType("A"), "Function evaluation timed out") : null;
GetMemberValueDelegate getMemberValue = (v, m) => (m == "Q") ? CreateErrorValue(runtime.GetType("A"), "Function evaluation timed out") : null;
runtime = new DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlibAndSystemCore(GetAssembly(source)), getMemberValue: getMemberValue);
using (runtime.Load())
{
......
......@@ -2208,7 +2208,7 @@ public void NullableValue_Error()
}
}";
DkmClrRuntimeInstance runtime = null;
GetMemberValueDelegate getMemberValue = (v, n, t, p, i) => (n == "P") ? CreateErrorValue(runtime.GetType(typeof(int?)), "Function evaluation timed out") : null;
GetMemberValueDelegate getMemberValue = (v, m) => (m == "P") ? CreateErrorValue(runtime.GetType(typeof(int?)), "Function evaluation timed out") : null;
runtime = new DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlibAndSystemCore(GetAssembly(source)), getMemberValue: getMemberValue);
using (runtime.Load())
{
......
......@@ -520,9 +520,9 @@ internal int Q
}
}";
DkmClrRuntimeInstance runtime = null;
GetMemberValueDelegate getMemberValue = (v, n, t, p, i) =>
GetMemberValueDelegate getMemberValue = (v, m) =>
{
switch (n)
switch (m)
{
case "P":
return CreateErrorValue(runtime.GetType(typeof(System.Collections.ArrayList)), "Property 'P' evaluation timed out");
......
......@@ -1478,7 +1478,7 @@ internal ArrayList P
}
}";
DkmClrRuntimeInstance runtime = null;
GetMemberValueDelegate getMemberValue = (v, n, t, p, i) => (n == "P") ? CreateErrorValue(runtime.GetType(typeof(System.Collections.ArrayList)), "Function evaluation timed out") : null;
GetMemberValueDelegate getMemberValue = (v, m) => (m == "P") ? CreateErrorValue(runtime.GetType(typeof(System.Collections.ArrayList)), "Function evaluation timed out") : null;
runtime = new DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlibAndSystemCore(GetAssembly(source)), getMemberValue: getMemberValue);
using (runtime.Load())
{
......@@ -1514,7 +1514,7 @@ public IEnumerator GetEnumerator()
}
}";
DkmClrRuntimeInstance runtime = null;
GetMemberValueDelegate getMemberValue = (v, n, t, p, i) => (n == "Items") ? CreateErrorValue(runtime.GetType(typeof(object)).MakeArrayType(), string.Format("Unable to evaluate '{0}'", n)) : null;
GetMemberValueDelegate getMemberValue = (v, m) => (m == "Items") ? CreateErrorValue(runtime.GetType(typeof(object)).MakeArrayType(), string.Format("Unable to evaluate '{0}'", m)) : null;
runtime = new DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlibAndSystemCore(GetAssembly(source)), getMemberValue: getMemberValue);
using (runtime.Load())
{
......
......@@ -4,7 +4,6 @@
#endregion
using Microsoft.CodeAnalysis.ExpressionEvaluator;
using Microsoft.VisualStudio.Debugger.Evaluation;
using Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation;
using Microsoft.VisualStudio.Debugger.Symbols;
using System;
......@@ -14,12 +13,7 @@
namespace Microsoft.VisualStudio.Debugger.Clr
{
internal delegate DkmClrValue GetMemberValueDelegate(
DkmClrValue value,
string memberName,
int memberType,
string parentTypeName,
DkmInspectionContext inspectionContext);
internal delegate DkmClrValue GetMemberValueDelegate(DkmClrValue value, string memberName);
internal delegate DkmClrModuleInstance GetModuleDelegate(DkmClrRuntimeInstance runtime, Assembly assembly);
......
......@@ -356,7 +356,7 @@ public DkmClrValue GetMemberValue(string MemberName, int MemberType, string Pare
var getMemberValue = runtime.GetMemberValue;
if (getMemberValue != null)
{
var memberValue = getMemberValue(this, MemberName, MemberType, ParentTypeName, InspectionContext);
var memberValue = getMemberValue(this, MemberName);
if (memberValue != null)
{
return memberValue;
......
......@@ -122,7 +122,7 @@ Class C
End Function
End Class"
Dim runtime As DkmClrRuntimeInstance = Nothing
Dim getMemberValue As GetMemberValueDelegate = Function(v, n, t, p, i) If(n = "Items", CreateErrorValue(runtime.GetType(GetType(Object)).MakeArrayType(), String.Format("Unable to evaluate '{0}'", n)), Nothing)
Dim getMemberValue As GetMemberValueDelegate = Function(v, m) If(m = "Items", CreateErrorValue(runtime.GetType(GetType(Object)).MakeArrayType(), String.Format("Unable to evaluate '{0}'", m)), Nothing)
runtime = New DkmClrRuntimeInstance(ReflectionUtilities.GetMscorlibAndSystemCore(GetAssembly(source)), getMemberValue:=getMemberValue)
Using runtime.Load()
Dim type = runtime.GetType("C")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册