Example #1
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the parameters collection only.
        private void CreateParameterProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = (uint)_parameters.Length;
            var propInfo = new DEBUG_PROPERTY_INFO[_parameters.Length];

            for (var i = 0; i < propInfo.Length; i++)
            {
                var property = new MonoProperty(_parameters[i].Name, _parameters[i]);
                propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
            }

            enumObject = new MonoPropertyInfoEnumerator(propInfo);
        }
Example #2
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the combined locals and parameters.
        private void CreateLocalsPlusArgsProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = 0;

            var localsLength = 0;

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

            if (_parameters != null)
            {
                elementsReturned += (uint)_parameters.Length;
            }
            var propInfo = new DEBUG_PROPERTY_INFO[elementsReturned];

            if (_locals != null)
            {
                for (var i = 0; i < _locals.Length; i++)
                {
                    var property = new MonoProperty(_locals[i].Name, _locals[i]);
                    propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
                }
            }

            if (_parameters != null)
            {
                for (var i = 0; i < _parameters.Length; i++)
                {
                    var property = new MonoProperty(_parameters[i].Name, _parameters[i]);
                    propInfo[localsLength + i] =
                        property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
                }
            }

            enumObject = new MonoPropertyInfoEnumerator(propInfo);
        }