VSNDK.DebugEngine.AD7Property.ConstructDebugPropertyInfo C# (CSharp) Method

ConstructDebugPropertyInfo() public method

Construct a DEBUG_PROPERTY_INFO representing this local or parameter.
public ConstructDebugPropertyInfo ( enum_DEBUGPROP_INFO_FLAGS dwFields ) : DEBUG_PROPERTY_INFO
dwFields enum_DEBUGPROP_INFO_FLAGS A combination of flags from the DEBUGPROP_INFO_FLAGS enumeration that specifies which variables are /// to be filled in.
return DEBUG_PROPERTY_INFO
        public DEBUG_PROPERTY_INFO ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS dwFields)
        {
            DEBUG_PROPERTY_INFO propertyInfo = new DEBUG_PROPERTY_INFO();

            if (_variableInfo != null)
            {
                string name = _variableInfo._name;
                if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_FULLNAME) != 0)
                {
                    propertyInfo.bstrFullName = name;
                    propertyInfo.dwFields = (enum_DEBUGPROP_INFO_FLAGS)((uint)propertyInfo.dwFields | (uint)(DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_FULLNAME));
                }

                if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME) != 0)
                {
                    propertyInfo.bstrName = name;
                    propertyInfo.dwFields = (enum_DEBUGPROP_INFO_FLAGS)((uint)propertyInfo.dwFields | (uint)(DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME));
                }

                if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_TYPE) != 0)
                {
                    propertyInfo.bstrType = _variableInfo._type;
                    propertyInfo.dwFields = (enum_DEBUGPROP_INFO_FLAGS)((uint)propertyInfo.dwFields | (uint)(DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_TYPE));
                }

                if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE) != 0)
                {
                    propertyInfo.bstrValue = _variableInfo._value;
                    propertyInfo.dwFields = (enum_DEBUGPROP_INFO_FLAGS)((uint)propertyInfo.dwFields | (uint)(DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE));
                }

                if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_ATTRIB) != 0)
                {
                    if (_variableInfo._children != null)
                    {
                        propertyInfo.dwAttrib |= (enum_DBG_ATTRIB_FLAGS)DBG_ATTRIB_FLAGS.DBG_ATTRIB_OBJ_IS_EXPANDABLE;
                    }
                }

                // If the debugger has asked for the property, or the property has children (meaning it is a pointer in the sample)
                // then set the pProperty field so the debugger can call back when the chilren are enumerated.
                if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_PROP) != 0 || _variableInfo._children != null)
                {
                    propertyInfo.pProperty = (IDebugProperty2)this;
                    propertyInfo.dwFields = (enum_DEBUGPROP_INFO_FLAGS)((uint)propertyInfo.dwFields | (uint)(DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_PROP));
                }

            }
            return propertyInfo;
        }

Usage Example

Exemplo n.º 1
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the parameters collection only.
        private void CreateParameterProperties(enum_DEBUGPROP_INFO_FLAGS dwFields, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = (uint)_arguments.Count;
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[_arguments.Count];

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

            enumObject = new AD7PropertyInfoEnum(propInfo);
        }
All Usage Examples Of VSNDK.DebugEngine.AD7Property::ConstructDebugPropertyInfo