Пример #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 (int i = 0; i < propInfo.Length; i++)
            {
                MonoProperty property = new MonoProperty(parameters[i].Name, parameters[i]);
                propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
            }

            enumObject = new MonoPropertyInfoEnum(propInfo);
        }
Пример #2
0
        // 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 (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 (int i = 0; i < locals.Length; i++)
                {
                    MonoProperty property = new MonoProperty(locals[i].Name, locals[i]);
                    propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
                }
            }

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

            enumObject = new MonoPropertyInfoEnum(propInfo);
        }