Ejemplo n.º 1
0
            // Token: 0x060001E0 RID: 480 RVA: 0x00006ABC File Offset: 0x00004CBC
            public int EnumChildren(enum_DEBUGPROP_INFO_FLAGS dwFields, uint dwRadix, ref Guid guidFilter, enum_DBG_ATTRIB_FLAGS dwAttribFilter, string pszNameFilter, uint dwTimeout, out IEnumDebugPropertyInfo2 ppEnum)
            {
                if (this.Value == null || !this.Value.HasChildren)
                {
                    ppEnum = null;
                    return(1);
                }
                EvaluationOptions evaluationOptions = this.Frame.Session.EvaluationOptions;

                evaluationOptions.AllowMethodEvaluation   = true;
                evaluationOptions.AllowTargetInvoke       = true;
                evaluationOptions.AllowToStringCalls      = false;
                evaluationOptions.EvaluationTimeout       = (int)dwTimeout;
                evaluationOptions.MemberEvaluationTimeout = (int)dwTimeout;
                EvaluationOptions evaluationOptions2 = this.Frame.Session.EvaluationOptions;

                if (evaluationOptions2 != null)
                {
                    evaluationOptions.EvaluationTimeout       = evaluationOptions2.EvaluationTimeout;
                    evaluationOptions.MemberEvaluationTimeout = evaluationOptions2.MemberEvaluationTimeout;
                }
                if (dwRadix == 16U)
                {
                    evaluationOptions.IntegerDisplayFormat = IntegerDisplayFormat.Hexadecimal;
                }
                else
                {
                    evaluationOptions.IntegerDisplayFormat = IntegerDisplayFormat.Decimal;
                }
                ObjectValue[] allChildren = this.Value.GetAllChildren(evaluationOptions);
                WaitHandle[]  handles     = (from x in allChildren
                                             select x.WaitHandle).ToArray <WaitHandle>();
                StackFrame.WaitAll(handles, (uint)evaluationOptions.MemberEvaluationTimeout);
                DEBUG_PROPERTY_INFO[] array = new DEBUG_PROPERTY_INFO[allChildren.Length];
                for (int i = 0; i < allChildren.Length; i++)
                {
                    this.Frame.CreateProperty(ref array[i], this.ObjectPath, allChildren[i]);
                }
                ppEnum = new AD7PropertyInfoEnum(array);
                return(0);
            }
Ejemplo n.º 2
0
        // Token: 0x060000E6 RID: 230 RVA: 0x000046DC File Offset: 0x000028DC
        public int EnumProperties(enum_DEBUGPROP_INFO_FLAGS dwFields, uint nRadix, ref Guid guidFilter, uint dwTimeout, out uint pcelt, out IEnumDebugPropertyInfo2 ppEnum)
        {
            EvaluationOptions evaluationOptions = this.Session.EvaluationOptions;

            evaluationOptions.EvaluationTimeout       = (int)dwTimeout;
            evaluationOptions.MemberEvaluationTimeout = (int)dwTimeout;
            EvaluationOptions evaluationOptions2 = this.Session.EvaluationOptions;

            if (evaluationOptions2 != null)
            {
                evaluationOptions.EvaluationTimeout       = evaluationOptions2.EvaluationTimeout;
                evaluationOptions.MemberEvaluationTimeout = evaluationOptions2.MemberEvaluationTimeout;
            }
            if (nRadix == 16U)
            {
                evaluationOptions.IntegerDisplayFormat = IntegerDisplayFormat.Hexadecimal;
            }
            else
            {
                evaluationOptions.IntegerDisplayFormat = IntegerDisplayFormat.Decimal;
            }
            List <ObjectValue> list = new List <ObjectValue>();
            var exception           = this.Frame.GetException(evaluationOptions);

            if (exception != null)
            {
                list.Add(exception.Instance);
            }
            ObjectValue thisReference = this.Frame.GetThisReference(evaluationOptions);

            if (thisReference != null)
            {
                list.Add(thisReference);
            }
            if (guidFilter == Guids.guidFilterLocals)
            {
                list.AddRange(this.Frame.GetLocalVariables(evaluationOptions));
            }
            else if (guidFilter == Guids.guidFilterArgs)
            {
                list.AddRange(this.Frame.GetParameters(evaluationOptions));
            }
            else if (guidFilter == Guids.guidFilterLocalsPlusArgs)
            {
                list.AddRange(this.Frame.GetParameters(evaluationOptions));
                list.AddRange(this.Frame.GetLocalVariables(evaluationOptions));
            }
            if (list.Count == 0)
            {
                ppEnum = new AD7PropertyEnum(new DEBUG_PROPERTY_INFO[0]);
                pcelt  = 0U;
                return(1);
            }
            StackFrame.WaitAll((from x in list
                                select x.WaitHandle).ToArray <WaitHandle>(), (uint)evaluationOptions.EvaluationTimeout);
            DEBUG_PROPERTY_INFO[] array = new DEBUG_PROPERTY_INFO[list.Count];
            for (int i = 0; i < list.Count; i++)
            {
                this.CreateProperty(ref array[i], null, list[i]);
            }
            ppEnum = new AD7PropertyInfoEnum(array);
            pcelt  = (uint)array.Length;
            return(0);
        }