• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDebugProperty2类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDebugProperty2的典型用法代码示例。如果您正苦于以下问题:C# IDebugProperty2类的具体用法?C# IDebugProperty2怎么用?C# IDebugProperty2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDebugProperty2类属于命名空间,在下文中一共展示了IDebugProperty2类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DebugPropertyCreateEvent

        public DebugPropertyCreateEvent(enum_EVENTATTRIBUTES attributes, IDebugProperty2 property)
            : base(attributes)
        {
            Contract.Requires<ArgumentNullException>(property != null, "property");

            _property = property;
        }
开发者ID:fjnogueira,项目名称:JavaForVS,代码行数:7,代码来源:DebugPropertyCreateEvent.cs


示例2: GetMethodProperty

        public int GetMethodProperty(IDebugSymbolProvider pSymbolProvider, IDebugAddress pAddress, IDebugBinder pBinder, int fIncludeHiddenLocals, out IDebugProperty2 ppProperty)
        {
            AD7Property method = new AD7Property(m_var);
            ppProperty = method;

            return VSConstants.S_OK;
        }
开发者ID:Strongc,项目名称:VSLua,代码行数:7,代码来源:AD7Expression.cs


示例3: DebugReturnValueEvent

        public DebugReturnValueEvent(enum_EVENTATTRIBUTES attributes, IDebugProperty2 returnValue)
            : base(attributes)
        {
            Contract.Requires<ArgumentNullException>(returnValue != null, "returnValue");

            _returnValue = returnValue;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:7,代码来源:DebugReturnValueEvent.cs


示例4: AutoResetEvent

        // This method evaluates the expression synchronously.
        int IDebugExpression2.EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult) {
            AutoResetEvent completion = new AutoResetEvent(false);
            PythonEvaluationResult result = null;
            _frame.StackFrame.ExecuteText(_expression, (obj) => {
                result = obj;
                completion.Set();
            });
            
            while (!_frame.StackFrame.Thread.Process.HasExited && !completion.WaitOne(Math.Min((int)dwTimeout, 100))) {
                if (dwTimeout <= 100) {
                    break;
                }
                dwTimeout -= 100;
            }

            if (_frame.StackFrame.Thread.Process.HasExited || result == null) {
                ppResult = null;
                return VSConstants.E_FAIL;
            } else if (result == null) {
                ppResult = null;
                return DebuggerConstants.E_EVALUATE_TIMEOUT;
            }
            ppResult = new AD7Property(_frame, result, _writable);

            return VSConstants.S_OK;
        }
开发者ID:omnimark,项目名称:PTVS,代码行数:27,代码来源:UncalculatedAD7Expression.cs


示例5: JavaDebugProperty

        public JavaDebugProperty(IDebugProperty2 parent, EvaluatedExpression evaluatedExpression)
        {
            Contract.Requires<ArgumentNullException>(evaluatedExpression != null, "evaluatedExpression");

            _parent = parent;
            _evaluatedExpression = evaluatedExpression;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:7,代码来源:JavaDebugProperty.cs


示例6: ConstructErrorPropertyInfo

        public static DEBUG_PROPERTY_INFO ConstructErrorPropertyInfo(enum_DEBUGPROP_INFO_FLAGS dwFields, string name, string error, IDebugProperty2 prop)
        {
            DEBUG_PROPERTY_INFO property = new DEBUG_PROPERTY_INFO(); ;

            if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME) != 0)
            {
                property.bstrName = name;
                property.dwFields |= enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME;
            }
            if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE) != 0)
            {
                property.bstrValue = error;
                property.dwFields |= enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_VALUE;
            }
            if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_ATTRIB) != 0)
            {
                property.dwAttrib |= enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_VALUE_ERROR;
            }
            if ((dwFields & enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_PROP) != 0)
            {
                property.pProperty = prop;
                property.dwFields |= enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_PROP;
            }
            return property;
        }
开发者ID:robindegen,项目名称:MIEngine,代码行数:25,代码来源:AD7Property.cs


示例7: DebugExpressionEvaluationCompleteEvent

        public DebugExpressionEvaluationCompleteEvent(enum_EVENTATTRIBUTES attributes, IDebugExpression2 expression, IDebugProperty2 property)
            : base(attributes)
        {
            Contract.Requires<ArgumentNullException>(expression != null, "expression");
            Contract.Requires<ArgumentNullException>(property != null, "property");

            _expression = expression;
            _property = property;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:9,代码来源:DebugExpressionEvaluationCompleteEvent.cs


示例8: EvaluateSync

        /// <summary>
        /// This method evaluates the expression synchronously.
        /// </summary>
        public int EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback,
            out IDebugProperty2 ppResult)
        {
            ppResult = null;
            int idx = _index;

            if (string.IsNullOrEmpty(_castExpr))
            {
                var reg = _stackFrame.GetRegistersAsync().Await((int) dwTimeout)
                                     .FirstOrDefault(r => r.Name == _registerType + _index);
                if (reg != null)
                {
                    ppResult = new DebugStackFrameValueProperty(reg, null, _stackFrame);
                    return VSConstants.S_OK;
                }
            }
            else
            {
                var tag = GetTagFromString(_castExpr);

                if (!tag.IsPrimitive() && (dwFlags & enum_EVALFLAGS.EVAL_NOSIDEEFFECTS) != 0)
                {
                    // this evaluation has "side effects" in that it might crash the VM
                    // if the cast is to "object" or "string", but the register does not 
                    // hold an object or string.
                    ppResult = new DebugConstProperty(_expression, "(this cast might crash the VM if the register is not of the casted type)", _castExpr, null)
                                                     { HasSideEffects = true };
                    return VSConstants.E_FAIL;
                }

                var isParam = _registerType == "p";

                if (isParam)
                {
                    var loc = _stackFrame.GetDocumentLocationAsync().Await((int) dwTimeout);
                    if (loc == null)
                        return VSConstants.E_FAIL;
                    var methodDiss = _stackFrame.Thread.Program.DisassemblyProvider.GetFromLocation(loc);
                    if (methodDiss == null)
                        return VSConstants.E_FAIL;
                    idx += methodDiss.Method.Body.Registers.Count - methodDiss.Method.Body.IncomingArguments;
                }

                var reg = _stackFrame.GetRegistersAsync(false, tag, idx).Await((int) dwTimeout);

                if (reg != null && reg.Count > 0)
                {
                    ppResult = new DebugStackFrameValueProperty(reg[0], null, _stackFrame, _expression)
                    {
                        HasSideEffects = !tag.IsPrimitive()
                    };
                    return VSConstants.S_OK;
                }
            }

            return VSConstants.E_FAIL;
        }
开发者ID:jakesays,项目名称:dot42,代码行数:60,代码来源:DebugRegisterExpression.cs


示例9: EvaluateSync

 /// <summary>
 /// This method evaluates the expression synchronously.
 /// </summary>
 /// <param name="dwFlags">A combination of flags from the EVALFLAGS enumeration that control expression evaluation.</param>
 /// <param name="dwTimeout">Maximum time, in milliseconds, to wait before returning from this method. Use INFINITE to wait indefinitely.</param>
 /// <param name="pExprCallback">This parameter is always a null value.</param>
 /// <param name="ppResult">Returns the IDebugProperty2 object that contains the result of the expression evaluation.</param>
 /// <returns>
 /// If successful, returns S_OK; otherwise returns an error code. Some typical error codes are:
 /// Error                               Description
 /// E_EVALUATE_BUSY_WITH_EVALUATION     Another expression is currently being evaluated, and simultaneous expression evaluation is not supported.
 /// E_EVALUATE_TIMEOUT                  Evaluation timed out.
 /// </returns>
 /// <remarks>For synchronous evaluation, it is not necessary to send an event back to Visual Studio upon completion of the evaluation.</remarks>
 public int EvaluateSync( enum_EVALFLAGS dwFlags,
     uint dwTimeout,
     IDebugEventCallback2 pExprCallback,
     out IDebugProperty2 ppResult)
 {
     Logger.Debug( string.Empty );
     ppResult = null;
     return VSConstants.E_NOTIMPL;
 }
开发者ID:IntelliTect,项目名称:PowerStudio,代码行数:23,代码来源:DebugExpression.cs


示例10: JavaDebugStaticMembersPseudoProperty

        public JavaDebugStaticMembersPseudoProperty(IDebugProperty2 parent, IReferenceType referenceType, IEnumerable<IField> fields)
        {
            Contract.Requires<ArgumentNullException>(parent != null, "parent");
            Contract.Requires<ArgumentNullException>(referenceType != null, "referenceType");

            _parent = parent;
            _referenceType = referenceType;
            if (fields != null)
                _fields = fields.ToArray();
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:10,代码来源:JavaDebugStaticMembersPseudoProperty.cs


示例11: EvaluateSync

        /// <summary>
        /// This method evaluates the expression synchronously.
        /// </summary>
        /// <param name="dwFlags">[in] A combination of flags from the EVALFLAGS enumeration that control expression evaluation.</param>
        /// <param name="dwTimeout">[in] Maximum time, in milliseconds, to wait before returning from this method. Use INFINITE to wait indefinitely.</param>
        /// <param name="pExprCallback">[in]This parameter is always a null value.</param>
        /// <param name="ppResult">[out] Returns the IDebugProperty2 object that contains the result of the expression evaluation.</param>
        /// <returns>
        /// If successful, returns S_OK; otherwise returns an error code. Some typical error codes are:
        ///  * E_EVALUATE_BUSY_WITH_EVALUATION  Another expression is currently being evaluated, and simultaneous
        ///                                     expression evaluation is not supported.
        ///  * E_EVALUATE_TIMEOUT               Evaluation timed out.
        /// </returns>
        /// <remarks>
        /// For synchronous evaluation, it is not necessary to send an event back to Visual Studio upon completion of the evaluation.
        /// </remarks>
        public int EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult)
        {
            ppResult = null;

            Task<IDebugProperty2> task = Task.Factory.StartNew(() => EvaluateImpl(dwFlags)).HandleNonCriticalExceptions();
            if (!task.Wait((int)dwTimeout))
                return AD7Constants.E_EVALUATE_TIMEOUT;

            if (task.Status != TaskStatus.RanToCompletion || task.Result == null)
                return VSConstants.E_FAIL;

            ppResult = task.Result;
            return VSConstants.S_OK;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:30,代码来源:JavaDebugExpression.cs


示例12: EvaluateSync

        /// <summary>
        /// This method evaluates the expression synchronously.
        /// </summary>
        public int EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback,
            out IDebugProperty2 ppResult)
        {
            ppResult = null;

            if (string.IsNullOrEmpty(_castExpr))
            {
                var reg = _stackFrame.GetRegistersAsync().Await((int) dwTimeout)
                                     .FirstOrDefault(r => r.Name == _registerType + _index);
                if (reg != null)
                {
                    ppResult = new DebugStackFrameValueProperty(reg, null, _stackFrame);
                    return VSConstants.S_OK;
                }
            }
            else
            {
                var tag = GetTagFromString(_castExpr);

                if (!tag.IsPrimitive() && (dwFlags & enum_EVALFLAGS.EVAL_NOSIDEEFFECTS) != 0)
                {
                    // this evaluation has "side effects" in that it might crash the VM
                    // if the cast is to "object" or "string", but the register does not
                    // hold an object or string.
                    ppResult = new DebugConstProperty(_expression, "(this cast might crash a DalvikVM if the register is not of the casted type)", _castExpr, null)
                                                     { HasSideEffects = true };
                    return VSConstants.E_FAIL;
                }

                var regNames = _stackFrame.GetRegisterNamesAsync().Await((int)dwTimeout);
                var vmIdx = regNames.GetVmIndex(_registerType == "p", _index);

                if (vmIdx < 0)
                    return VSConstants.E_FAIL;

                var reg = _stackFrame.GetRegistersAsync(false, tag, vmIdx).Await((int)dwTimeout);

                if (reg != null && reg.Count > 0)
                {
                    ppResult = new DebugStackFrameValueProperty(reg[0], null, _stackFrame, _expression)
                    {
                        HasSideEffects = !tag.IsPrimitive()
                    };
                    return VSConstants.S_OK;
                }
            }

            return VSConstants.E_FAIL;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:52,代码来源:DebugRegisterExpression.cs


示例13: AD7Property

 int IDebugExpression2.EvaluateSync(
   enum_EVALFLAGS dwFlags, 
   uint dwTimeout, 
   IDebugEventCallback2 pExprCallback, 
   out IDebugProperty2 ppResult)
 {
   if (MySql.Debugger.Debugger.GetTagHashCode(_stackFrame._rs.OwningRoutine.SourceCode) !=
     DebuggerManager.Instance.Debugger.CurrentScope.OwningRoutine.Hash)
   {
     // This should never happen.
     ppResult = null;
     return VSConstants.E_NOTIMPL;
   }
   AD7Property prop = new AD7Property( _expr,_stackFrame.Node, _stackFrame._rs );
   ppResult = prop;
   // Send evaluation complete event
   DebuggerManager.Instance._events.ExpressionEvalCompleted( 
     _stackFrame.Node, ( IDebugExpression2 )this, ( IDebugProperty2 )prop );
   return VSConstants.S_OK;
 }
开发者ID:eeeee,项目名称:mysql-connector-net,代码行数:20,代码来源:AD7DebugExpression.cs


示例14: catch

        // This method evaluates the expression synchronously.
        int IDebugExpression2.EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult)
        {
            NodeEvaluationResult result;
            ppResult = null;

            try
            {
                result = _frame.StackFrame.EvaluateExpressionAsync(_expression).Result;
            }
            catch (Exception)
            {
                return VSConstants.E_FAIL;
            }
            
            if (result == null)
            {
                return VSConstants.E_FAIL;
            }

            ppResult = new AD7Property(result);
            return VSConstants.S_OK;
        }
开发者ID:happylancer,项目名称:node-tools,代码行数:23,代码来源:AD7Expression.cs


示例15:

        // This method evaluates the expression synchronously.
        int IDebugExpression2.EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult)
        {
            ppResult = null;
            if ((dwFlags & enum_EVALFLAGS.EVAL_NOSIDEEFFECTS) != 0 && _var.IsVisualized)
            {
                IVariableInformation variable = DebuggedProcess.g_Process.Natvis.Cache.Lookup(_var);
                if (variable == null)
                {
                    ppResult = new AD7ErrorProperty(_var.Name, ResourceStrings.NoSideEffectsVisualizerMessage);
                }
                else
                {
                    _var = variable;
                    ppResult = new AD7Property(_var);
                }
                return Constants.S_OK;
            }

            _var.SyncEval();
            ppResult = new AD7Property(_var);
            return Constants.S_OK;
        }
开发者ID:robindegen,项目名称:MIEngine,代码行数:23,代码来源:AD7Expression.cs


示例16: GetDebugProperty

 /// <summary>
 /// Gets the program's properties. The VSNDK debug engine does not support this. 
 /// (http://msdn.microsoft.com/en-us/library/bb161801.aspx)
 /// </summary>
 /// <param name="ppProperty"> Returns an IDebugProperty2 object that represents the program's properties. </param>
 /// <returns> Not implemented. </returns>
 public int GetDebugProperty(out IDebugProperty2 ppProperty)
 {
     throw new Exception("The method or operation is not implemented.");
 }
开发者ID:blackberry,项目名称:VSPlugin,代码行数:10,代码来源:AD7ProgramNodeAttach.cs


示例17: GetDebugProperty

 public int GetDebugProperty(out IDebugProperty2 ppProperty)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugStackFrame.GetDebugProperty");
     throw new NotImplementedException();
 }
开发者ID:rfcclub,项目名称:dot42,代码行数:5,代码来源:DebugStackFrame.cs


示例18: GetParent

 // Returns the parent of a property.
 // The sample engine does not support obtaining the parent of properties.
 public int GetParent(out IDebugProperty2 ppParent) {
     ppParent = null;
     return VSConstants.E_NOTIMPL;
 }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:6,代码来源:AD7Property.cs


示例19: GetDerivedMostProperty

 // Returns the property that describes the most-derived property of a property
 // This is called to support object oriented languages. It allows the debug engine to return an IDebugProperty2 for the most-derived 
 // object in a hierarchy. This engine does not support this.
 public int GetDerivedMostProperty(out IDebugProperty2 ppDerivedMost) {
     ppDerivedMost = null;
     return VSConstants.E_NOTIMPL;
 }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:7,代码来源:AD7Property.cs


示例20: GetDerivedMostProperty

 public int GetDerivedMostProperty(out IDebugProperty2 ppDerivedMost)
 {
     throw new NotImplementedException();
 }
开发者ID:robindegen,项目名称:MIEngine,代码行数:4,代码来源:AD7Property.cs



注:本文中的IDebugProperty2类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDebugReference2类代码示例发布时间:2022-05-24
下一篇:
C# IDebugProgram2类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap