Exemplo n.º 1
0
        private void EnumLocals(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            ObjectValue[] locals = _monoStackFrame.GetLocalVariables(EvaluationOptions.DefaultOptions);

            elementsReturned = (uint)locals.Length;
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[locals.Length];

            for (int i = 0; i < propInfo.Length; i++)
            {
                MonoProperty property = new MonoProperty(null, locals[i], locals[i].Name);
                propInfo[i] = property.CreatePropertyInfo((uint)enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
            }

            enumObject = new MonoPropertyEnumerator(propInfo);
        }
Exemplo n.º 2
0
        private void EnumLocalsAndArgs(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = 0;

            ObjectValue[] locals = _monoStackFrame.GetLocalVariables(EvaluationOptions.DefaultOptions);

            int offset = 0;

            if (locals != null)
            {
                elementsReturned = (uint)locals.Length;
                offset           = locals.Length;
            }

            ObjectValue[] parameters = _monoStackFrame.GetParameters(EvaluationOptions.DefaultOptions);
            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(null, locals[i], locals[i].Name);
                    propInfo[i] = property.CreatePropertyInfo((uint)enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
                }
            }

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

            enumObject = new MonoPropertyEnumerator(propInfo);
        }
Exemplo n.º 3
0
        public int EnumChildren(uint dwFields, uint dwRadix, ref Guid guidFilter, ulong dwAttribFilter, string pszNameFilter, uint dwTimeout, out IEnumDebugPropertyInfo2 ppEnum)
        {
            ppEnum = null;

            ObjectValue[] children = _value.GetAllChildren();

            if (!_value.HasChildren && children.Length > 0)
            {
                return(S_FALSE);
            }

            DEBUG_PROPERTY_INFO[] props = new DEBUG_PROPERTY_INFO[children.Length];

            for (var i = 0; i < children.Length; i++)
            {
                MonoProperty monoProp = new MonoProperty(this, children[i], _expression);

                props[i] = monoProp.CreatePropertyInfo(dwFields);
            }

            ppEnum = new MonoPropertyEnumerator(props);

            return(S_OK);
        }
Exemplo n.º 4
0
 public MonoProperty(MonoProperty parent, ObjectValue value, string expression)
 {
     _parentProperty = parent;
     _value          = value;
     _expression     = expression;
 }
Exemplo n.º 5
0
        public int EvaluateSync(uint dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult)
        {
            ppResult = new MonoProperty(null, _value, _expression);

            return(S_OK);
        }