/// <summary> /// Gets the class specified by the metadata token. /// </summary> public int GetClassFromToken(uint methodDef, out CorDebugClass @class) { void **pClass = default; int result = Calli(_this, This[0]->GetClassFromToken, methodDef, &pClass); ComFactory.Create(pClass, out @class); return(result); }
/// <summary> /// Gets the value of the specified field of the specified class for this object value. /// </summary> /// <remarks> /// The class, specified in <see paramref="class" />, must be in /// the hierarchy of the object value's class, and the field must /// be a field of that class. /// /// This method will still succeed for generic objects and generic /// classes. For example, if <c>MyDictionary{V}</c> inherits from /// <c>Dictionary{string,V}</c>, and the object value is of type /// <c>MyDictionary{int32}</c>, passing the <see cref="CorDebugClass" /> /// object for <c>Dictionary{K,V}</c> will successfully get a /// field of <c>Dictionary{string,int32}</c>. /// </remarks> public int GetFieldValue(CorDebugClass @class, uint fieldDef, out CorDebugValue value) { using var pClass = @class.AcquirePointer(); void **pValue = default; int result = Calli(_this, This[0]->GetFieldValue, pClass, fieldDef, &pValue); ComFactory.Create(pValue, out value); return(result); }
public int CreateValue(CorElementType elementType, CorDebugClass elementClass, out CorDebugValue value) { using var pElementClass = elementClass.AcquirePointer(); void *pValue = default; int result = Calli(_this, This[0]->CreateValue, (int)elementType, pElementClass, &pValue); ComFactory.Create(pValue, out value); return(result); }
public int NewArray( CorElementType elementType, CorDebugClass elementClass, uint rank, Span <uint> dims, Span <uint> lowBounds) { fixed(void *pDims = dims) fixed(void *pLowBounds = lowBounds) { using var pElementClass = elementClass.AcquirePointer(); return(Calli(_this, This[0]->NewArray, (int)elementType, pElementClass, rank, pDims, pLowBounds)); } }
/// <summary> /// Enables and disables custom debugger notifications of /// the specified type. /// </summary> /// <param name="class"> /// The type that specifies custom debugger notifications. /// </param> /// <param name="enabled"> /// Indicates whether custom debugger notifications are enabled. /// </param> /// <remarks> /// When <see paramref="enabled" /> is set to <see langword="true" />, calls /// to the <c>Debugger.NotifyOfCrossThreadDependency</c> method trigger an /// <c>ICorDebugManagedCallback3::CustomNotification</c> callback. Notifications /// are disabled by default; therefore, the debugger must specify any notification /// types it knows about and wants to handle. Because the class is scoped by /// application domain, the debugger must call this method for every application /// domain in the process if it wants to receive the notification across the /// entire process. /// /// Starting with the .NET Framework 4, the only supported notification is a /// cross-thread dependency notification. /// </remarks> public int SetEnableCustomNotification(CorDebugClass @class, bool enable) { using var pClass = @class.AcquirePointer(); return(Calli(_this, This[0]->SetEnableCustomNotification, pClass, enable.ToNativeInt())); }
/// <summary> /// Gets the class of this object value. /// </summary> /// <remarks> /// This method and <see cref="CorDebugValue.GetType(out CorElementType)" /> /// each return information about the type of a value; they are both /// superseded by the generics-aware <c>ICorDebugValue2::GetExactType</c>. /// </remarks> public int GetClass(out CorDebugClass @class) => InvokeGetObject(_this, This[0]->GetClass, out @class);
public int NewObjectNoConstructor(CorDebugClass @class) { using var pClass = @class.AcquirePointer(); return(Calli(_this, This[0]->NewObjectNoConstructor, pClass)); }