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 (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);
        }
        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(VSConstants.S_OK);
            }

            return(VSConstants.S_FALSE);
        }
Example #3
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);
        }
 public int GetParent(out IDebugProperty2 parent)
 {
     parent = this.parent;
     return(parent == null ? VSConstants.S_FALSE : VSConstants.S_OK);
 }
 public MonoProperty(string expression, ObjectValue value, MonoProperty parent = null)
 {
     this.expression = expression;
     this.value      = value;
     this.parent     = parent;
 }
Example #6
0
 public int EvaluateSync(enum_EVALFLAGS flags, uint timeout, IDebugEventCallback2 callback, out IDebugProperty2 result)
 {
     result = new MonoProperty(Expression, value);
     return(VSConstants.S_OK);
 }