/// <summary> /// Gets the value of the specified static field. /// </summary> /// <param name="fieldDef"> /// A FieldDef token that references the field to be retrieved. /// </param> /// <param name="frame"> /// The frame to be used to disambiguate among thread, context, or application /// domain statics. /// /// If the static field is relative to a thread, a context, or an application domain, /// the frame will determine the proper value. /// </param> /// <param name="value">The value of the static field.</param> /// <remarks> /// For parameterized types, the value of a static field is relative to the particular /// instantiation. Therefore, if the class constructor takes parameters of type /// <see cref="Type" />, call <see cref="CorDebugType.GetStaticFieldValue" /> instead. /// </remarks> public int GetStaticFieldValue(uint fieldDef, CorDebugFrame frame, out CorDebugValue value) { using var pFrame = frame.AcquirePointer(); void *pValue = default; int result = Calli(_this, This[0]->GetStaticFieldValue, fieldDef, pFrame, &pValue); ComFactory.Create(pValue, out value); return(result); }
/// <summary> /// Allows a debugger to intercept the current exception on this thread. /// </summary> /// <remarks> /// This method can be called between an exception callback (<c>ICorDebugManagedCallback::Exception</c> /// or <c>ICorDebugManagedCallback2::Exception</c>) and the associated call to <see cref="CorDebugController.Continue(bool)" />. /// </remarks> public int InterceptCurrentException(CorDebugFrame frame) { using var pFrame = frame?.AcquirePointer(); return(Calli(_this, This[0]->InterceptCurrentException, pFrame)); }