// Construct an instance of IEnumDebugPropertyInfo2 for the parameters collection only. private void CreateParameterProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) { elementsReturned = (uint)mParams.Length; var propInfo = new DEBUG_PROPERTY_INFO[mParams.Length]; for (int i = 0; i < propInfo.Length; i++) { var property = new AD7Property(mParams[i], mProcess, this); propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD); } propInfo = propInfo.OrderBy(i => i.bstrName).ToArray(); enumObject = new AD7PropertyInfoEnum(propInfo); }
// Construct an instance of IEnumDebugPropertyInfo2 for the combined locals and parameters. private void CreateLocalsPlusArgsProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) { elementsReturned = 0; int localsLength = 0; if (mLocals != null) { localsLength = mLocals.Length; elementsReturned += (uint)localsLength; } if (mParams != null) { elementsReturned += (uint)mParams.Length; } var propInfo = new DEBUG_PROPERTY_INFO[elementsReturned]; if (mLocals != null) { for (int i = 0; i < mLocals.Length; i++) { var property = new AD7Property(mLocals[i], mProcess, this); propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD); } } if (mParams != null) { for (int i = 0; i < mParams.Length; i++) { var property = new AD7Property(mParams[i], mProcess, this); propInfo[localsLength + i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD); } } propInfo = propInfo.OrderBy(i => i.bstrName).ToArray(); enumObject = new AD7PropertyInfoEnum(propInfo); }
// This method evaluates the expression synchronously. int IDebugExpression2.EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult) { ppResult = new AD7Property(m_var, Process, StackFrame); return(VSConstants.S_OK); }