private void EnumLocals(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) { ObjectValue[] locals = _monoStackFrame.GetLocalVariables(EvaluationOptions.DefaultOptions); elementsReturned = (uint)locals.Length; DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[locals.Length]; for (int i = 0; i < propInfo.Length; i++) { MonoProperty property = new MonoProperty(null, locals[i], locals[i].Name); propInfo[i] = property.CreatePropertyInfo((uint)enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD); } enumObject = new MonoPropertyEnumerator(propInfo); }
private void EnumLocalsAndArgs(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) { elementsReturned = 0; ObjectValue[] locals = _monoStackFrame.GetLocalVariables(EvaluationOptions.DefaultOptions); int offset = 0; if (locals != null) { elementsReturned = (uint)locals.Length; offset = locals.Length; } ObjectValue[] parameters = _monoStackFrame.GetParameters(EvaluationOptions.DefaultOptions); if (parameters != null) { elementsReturned += (uint)parameters.Length; } var propInfo = new DEBUG_PROPERTY_INFO[elementsReturned]; if (locals != null) { for (int i = 0; i < locals.Length; i++) { MonoProperty property = new MonoProperty(null, locals[i], locals[i].Name); propInfo[i] = property.CreatePropertyInfo((uint)enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD); } } if (parameters != null) { for (int i = 0; i < parameters.Length; i++) { MonoProperty property = new MonoProperty(null, parameters[i], parameters[i].Name); propInfo[offset + i] = property.CreatePropertyInfo((uint)enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD); } } enumObject = new MonoPropertyEnumerator(propInfo); }
/// <summary> /// Enumerates the children of a property. /// </summary> /// <param name="fields">The fields.</param> /// <param name="radix">The radix.</param> /// <param name="guidFilter">The unique identifier filter.</param> /// <param name="attributeFilter">The attribute filter.</param> /// <param name="filter">The filter.</param> /// <param name="timeout">The timeout.</param> /// <param name="enumerator">The enumerator.</param> /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns> public int EnumChildren(enum_DEBUGPROP_INFO_FLAGS fields, uint radix, ref Guid guidFilter, enum_DBG_ATTRIB_FLAGS attributeFilter, string filter, uint timeout, out IEnumDebugPropertyInfo2 enumerator) { enumerator = null; if (_value.HasChildren) { var children = _value.GetAllChildren(); var properties = new DEBUG_PROPERTY_INFO[children.Length]; for (var i = 0; i < children.Length; i++) { var child = children[i]; properties[i] = new MonoProperty(_expression, child, this).ConstructDebugPropertyInfo(fields); } enumerator = new MonoPropertyEnumerator(properties); return(S_OK); } return(S_FALSE); }
public int EnumChildren(uint dwFields, uint dwRadix, ref Guid guidFilter, ulong dwAttribFilter, string pszNameFilter, uint dwTimeout, out IEnumDebugPropertyInfo2 ppEnum) { ppEnum = null; ObjectValue[] children = _value.GetAllChildren(); if (!_value.HasChildren && children.Length > 0) { return(S_FALSE); } DEBUG_PROPERTY_INFO[] props = new DEBUG_PROPERTY_INFO[children.Length]; for (var i = 0; i < children.Length; i++) { MonoProperty monoProp = new MonoProperty(this, children[i], _expression); props[i] = monoProp.CreatePropertyInfo(dwFields); } ppEnum = new MonoPropertyEnumerator(props); return(S_OK); }