コード例 #1
0
ファイル: DbgValueNodeImpl.cs プロジェクト: haise0/dnSurgeon
        public override DbgValueNode[] GetChildren(DbgEvaluationInfo evalInfo, ulong index, int count, DbgValueNodeEvaluationOptions options)
        {
            if (evalInfo is null)
            {
                throw new ArgumentNullException(nameof(evalInfo));
            }
            if (!(evalInfo.Context is DbgEvaluationContextImpl))
            {
                throw new ArgumentException();
            }
            if (evalInfo.Context.Language != Language)
            {
                throw new ArgumentException();
            }
            if (evalInfo.Context.Runtime != Runtime)
            {
                throw new ArgumentException();
            }
            if (count < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(count));
            }
            var engineNodes = engineValueNode.GetChildren(evalInfo, index, count, options);

            return(DbgValueNodeUtils.ToValueNodeArray(Language, Runtime, engineNodes));
        }
コード例 #2
0
 public override DbgLocalsValueNodeInfo[] GetNodes(DbgEvaluationContext context, DbgStackFrame frame, DbgValueNodeEvaluationOptions options, DbgLocalsValueNodeEvaluationOptions localsOptions, CancellationToken cancellationToken)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     if (!(context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     if (frame == null)
     {
         throw new ArgumentNullException(nameof(frame));
     }
     if (frame.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     return(DbgValueNodeUtils.ToLocalsValueNodeInfoArray(Language, frame.Runtime, engineLocalsValueNodeProvider.GetNodes(context, frame, options, localsOptions, cancellationToken)));
 }
コード例 #3
0
ファイル: DbgValueNodeImpl.cs プロジェクト: azureidea/dnSpy-1
        public override DbgValueNode[] GetChildren(DbgEvaluationContext context, DbgStackFrame frame, ulong index, int count, DbgValueNodeEvaluationOptions options, CancellationToken cancellationToken)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (!(context is DbgEvaluationContextImpl))
            {
                throw new ArgumentException();
            }
            if (context.Language != Language)
            {
                throw new ArgumentException();
            }
            if (context.Runtime != Runtime)
            {
                throw new ArgumentException();
            }
            if (frame == null)
            {
                throw new ArgumentNullException(nameof(frame));
            }
            if (frame.Runtime != Runtime)
            {
                throw new ArgumentException();
            }
            if (count < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(count));
            }
            var engineNodes = engineValueNode.GetChildren(context, frame, index, count, options, cancellationToken);

            return(DbgValueNodeUtils.ToValueNodeArray(Language, Runtime, engineNodes));
        }
コード例 #4
0
 DbgValueNode[] CreateResult(DbgRuntime runtime, DbgEngineValueNode[] result, int expectedLength)
 {
     if (result.Length != expectedLength)
     {
         throw new InvalidOperationException();
     }
     return(DbgValueNodeUtils.ToValueNodeArray(Language, runtime, result));
 }
コード例 #5
0
 public override DbgLocalsValueNodeInfo[] GetNodes(DbgEvaluationInfo evalInfo, DbgValueNodeEvaluationOptions options, DbgLocalsValueNodeEvaluationOptions localsOptions)
 {
     if (evalInfo == null)
     {
         throw new ArgumentNullException(nameof(evalInfo));
     }
     if (!(evalInfo.Context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     return(DbgValueNodeUtils.ToLocalsValueNodeInfoArray(Language, evalInfo.Frame.Runtime, engineLocalsValueNodeProvider.GetNodes(evalInfo, options, localsOptions)));
 }