本文整理汇总了C#中Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.InstantiateProxyType方法的典型用法代码示例。如果您正苦于以下问题:C# DkmClrValue.InstantiateProxyType方法的具体用法?C# DkmClrValue.InstantiateProxyType怎么用?C# DkmClrValue.InstantiateProxyType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue
的用法示例。
在下文中一共展示了DkmClrValue.InstantiateProxyType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateExpansion
internal static Expansion CreateExpansion(
ResultProvider resultProvider,
DkmInspectionContext inspectionContext,
string name,
Type typeDeclaringMemberOpt,
Type declaredType,
DkmClrValue value,
bool childShouldParenthesize,
string fullName,
string childFullNamePrefix,
ReadOnlyCollection<string> formatSpecifiers,
DkmEvaluationResultFlags flags,
string editableValue)
{
Debug.Assert((inspectionContext.EvaluationFlags & DkmEvaluationFlags.NoExpansion) == 0);
// Note: The native EE uses the proxy type, even for
// null instances, so statics on the proxy type are
// displayed. That case is not supported currently.
if (!value.IsNull)
{
var proxyType = value.Type.GetProxyType();
if (proxyType != null)
{
if ((inspectionContext.EvaluationFlags & DkmEvaluationFlags.ShowValueRaw) != 0)
{
var rawView = CreateRawView(resultProvider, inspectionContext, declaredType, value);
Debug.Assert(rawView != null);
return rawView;
}
DkmClrValue proxyValue;
try
{
proxyValue = value.InstantiateProxyType(proxyType);
}
catch
{
proxyValue = null;
}
if (proxyValue != null)
{
return new DebuggerTypeProxyExpansion(
proxyValue,
name,
typeDeclaringMemberOpt,
declaredType,
value,
childShouldParenthesize,
fullName,
childFullNamePrefix,
formatSpecifiers,
flags,
editableValue,
resultProvider.Formatter);
}
}
}
return null;
}