Пример #1
0
        /// <summary>
        /// Reads a static field
        /// </summary>
        /// <param name="token">Token of field</param>
        /// <param name="frame">Frame</param>
        /// <param name="hr">Updated with HRESULT</param>
        /// <returns></returns>
        public CorValue GetStaticFieldValue(uint token, CorFrame frame, out int hr)
        {
            ICorDebugValue value;

            hr = obj.GetStaticFieldValue(token, frame?.RawObject, out value);
            return(hr < 0 || value == null ? null : new CorValue(value));
        }
Пример #2
0
        public bool InterceptCurrentException(CorFrame frame)
        {
            var t2 = obj as ICorDebugThread2;

            if (t2 == null)
            {
                return(false);
            }
            int hr = t2.InterceptCurrentException(frame.RawObject);

            return(hr >= 0);
        }
Пример #3
0
 /// <summary>
 /// Finds a frame. Can be called if <paramref name="frame"/> has been neutered
 /// </summary>
 /// <param name="frame">Frame</param>
 /// <returns></returns>
 public CorFrame FindFrame(CorFrame frame)
 {
     if (frame == null)
     {
         return(null);
     }
     foreach (var thread in threads.GetAll())
     {
         foreach (var f in thread.AllFrames)
         {
             if (f.StackStart == frame.StackStart && f.StackEnd == frame.StackEnd)
             {
                 return(f);
             }
         }
     }
     return(null);
 }
Пример #4
0
 public bool Equals(CorFrame other)
 {
     return(!ReferenceEquals(other, null) &&
            RawObject == other.RawObject);
 }
Пример #5
0
 public CorValue ReadStatic(CorFrame frame) => Class.GetStaticFieldValue(Token, frame);
Пример #6
0
        /// <summary>
        /// Reads a static field
        /// </summary>
        /// <param name="token">Token of field</param>
        /// <param name="frame">Frame</param>
        /// <returns></returns>
        public CorValue GetStaticFieldValue(uint token, CorFrame frame)
        {
            int hr;

            return(GetStaticFieldValue(token, frame, out hr));
        }
Пример #7
0
 public bool Equals(CorFrame other) => !ReferenceEquals(other, null) && RawObject == other.RawObject;
Пример #8
0
 /// <summary>
 /// Reads a static field
 /// </summary>
 /// <param name="token">Token of field</param>
 /// <param name="frame">Frame</param>
 /// <returns></returns>
 public CorValue GetStaticFieldValue(uint token, CorFrame frame) => GetStaticFieldValue(token, frame, out int hr);
Пример #9
0
 public CorValue ReadStatic(CorFrame frame)
 {
     return(cls.GetStaticFieldValue(token, frame));
 }