Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Enumerates the children of a property.
        /// </summary>
        /// <param name="fields">The fields.</param>
        /// <param name="radix">The radix.</param>
        /// <param name="guidFilter">The unique identifier filter.</param>
        /// <param name="attributeFilter">The attribute filter.</param>
        /// <param name="filter">The filter.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="enumerator">The enumerator.</param>
        /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
        public int EnumChildren(enum_DEBUGPROP_INFO_FLAGS fields, uint radix, ref Guid guidFilter,
                                enum_DBG_ATTRIB_FLAGS attributeFilter, string filter, uint timeout, out IEnumDebugPropertyInfo2 enumerator)
        {
            enumerator = null;

            if (_value.HasChildren)
            {
                var children   = _value.GetAllChildren();
                var properties = new DEBUG_PROPERTY_INFO[children.Length];
                for (var i = 0; i < children.Length; i++)
                {
                    var child = children[i];
                    properties[i] = new MonoProperty(_expression, child, this).ConstructDebugPropertyInfo(fields);
                }
                enumerator = new MonoPropertyEnumerator(properties);
                return(S_OK);
            }

            return(S_FALSE);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
 public MonoProperty(string expression, ObjectValue value, MonoProperty parent = null)
 {
     _expression = expression;
     _value      = value;
     _parent     = parent;
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Evaluates this expression synchronously.
 /// </summary>
 /// <param name="flags">The flags.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="callback">The callback.</param>
 /// <param name="result">The result.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
 public int EvaluateSync(enum_EVALFLAGS flags, uint timeout, IDebugEventCallback2 callback,
                         out IDebugProperty2 result)
 {
     result = new MonoProperty(Expression, _value);
     return(S_OK);
 }