VSNDK.DebugEngine.AD7StackFrame.CreateLocalsPlusArgsProperties C# (CSharp) Method

CreateLocalsPlusArgsProperties() public method

Construct an instance of IEnumDebugPropertyInfo2 for the combined locals and parameters.
public CreateLocalsPlusArgsProperties ( enum_DEBUGPROP_INFO_FLAGS dwFields, uint &elementsReturned, IEnumDebugPropertyInfo2 &enumObject ) : void
dwFields enum_DEBUGPROP_INFO_FLAGS A combination of flags from the DEBUGPROP_INFO_FLAGS enumeration that specifies which fields in /// the enumObject are to be filled in.
elementsReturned uint Returns the number of elements in the enumeration.
enumObject IEnumDebugPropertyInfo2 Returns an IEnumDebugPropertyInfo2 object containing a list of the desired properties.
return void
        public void CreateLocalsPlusArgsProperties(enum_DEBUGPROP_INFO_FLAGS dwFields, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = 0;
            int localsLength = 0;

            if (_locals != null)
            {
                localsLength = _locals.Count;
                elementsReturned += (uint)localsLength;
            }

            if (_arguments != null)
            {
                elementsReturned += (uint)_arguments.Count;
            }
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[elementsReturned];

            if (_locals != null)
            {
                int i = 0;
                foreach(VariableInfo var in _locals)
                {
                    AD7Property property = new AD7Property(var);
                    propInfo[i] = property.ConstructDebugPropertyInfo(dwFields);
                    i++;
                }
            }

            if (_arguments != null)
            {
                int i = 0;
                foreach (VariableInfo arg in _arguments)
                {
                    AD7Property property = new AD7Property(arg);
                    propInfo[localsLength + i] = property.ConstructDebugPropertyInfo(dwFields);
                    i++;
                }
            }

            enumObject = new AD7PropertyInfoEnum(propInfo);
        }