本文整理汇总了C#中IDebugProperty2.EnumChildren方法的典型用法代码示例。如果您正苦于以下问题:C# IDebugProperty2.EnumChildren方法的具体用法?C# IDebugProperty2.EnumChildren怎么用?C# IDebugProperty2.EnumChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDebugProperty2
的用法示例。
在下文中一共展示了IDebugProperty2.EnumChildren方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReportResult
private void ReportResult(IDebugProperty2 property)
{
var infos = new DEBUG_PROPERTY_INFO[1];
int hr = property.GetPropertyInfo(
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_ATTRIB |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NO_NONPUBLIC_MEMBERS |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_TYPE |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE_AUTOEXPAND,
RequestRadix,
RequestTimeout,
null,
0,
infos);
if (hr != VSConstants.S_OK)
{
return;
}
var info = infos[0];
_output.WriteLine("[{0}, {1}]", info.bstrValue, info.bstrType);
// If expandable, expand the first level. This matches
// the Dev12 Immediate Window behavior.
if (((info.dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_ATTRIB) != 0) &&
(info.dwAttrib & enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_OBJ_IS_EXPANDABLE) != 0)
{
IEnumDebugPropertyInfo2 children;
var filter = default(Guid);
property.EnumChildren(
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_ATTRIB |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_TYPE |
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE,
RequestRadix,
ref filter,
enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_ACCESS_ALL,
null,
RequestTimeout,
out children);
if (hr != VSConstants.S_OK)
{
return;
}
uint n;
hr = children.GetCount(out n);
if (hr != VSConstants.S_OK)
{
return;
}
n = Math.Min(n, MaxChildren);
infos = new DEBUG_PROPERTY_INFO[n];
hr = children.Next(n, infos, out n);
if (hr != VSConstants.S_OK)
{
return;
}
for (int i = 0; i < n; i++)
{
info = infos[i];
_output.WriteLine("[{0}, {1}, {2}]", info.bstrName, info.bstrValue, info.bstrType);
}
}
}