Compartilhar via


DkmClrAppDomain Class

Definition

DkmClrAppDomain represents a CLR app domain inside a process which is being debugged.

public ref class DkmClrAppDomain : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("337360db-44af-e459-1323-f16ddacf8b79")]
public class DkmClrAppDomain : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("337360db-44af-e459-1323-f16ddacf8b79")>]
type DkmClrAppDomain = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmClrAppDomain
Inherits DkmDataContainer
Implements IDisposable
Inheritance
Inheritance
DkmClrAppDomain
Attributes
Implements

Properties

Id

Id of the underlying CLR app domain. While running, this uniquely identifies the app domain within a particular DkmRuntimeInstance.

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
Name

AppDomain Name.

Process

DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.

RuntimeInstance

Represents a CLR instance running in a target process.

UniqueId

Guid which uniquely identifies this app domain object.

Methods

Close()

Closes a DkmClrAppDomain object instance. This will release any resources associated with this object across all components. This includes resources across computer or managed/native marshalling boundaries.

DkmClrAppDomain objects are automatically closed when their associated DkmClrRuntimeInstance object is closed.

This method may only be called by the component which created the object.

Create(Int32, DkmClrRuntimeInstance, String, DkmDataItem)

This method is called by the managed debug monitor to create a DkmClrAppDomain object. It is called on the event thread in response to the target process creating an AppDomain. The caller is responsible for closing the created object after they are done.

FindAllClrModuleInstances(Guid)

Find all DkmClrModuleInstance[] elements within this DkmClrAppDomain. If no element with the given input key is present, FindAllClrModuleInstances will fail.

FindClrModuleInstance(Guid)

Find a DkmClrModuleInstance element within this DkmClrAppDomain. If no element with the given input key is present, FindClrModuleInstance will fail.

GetClrModuleInstances()

GetClrModuleInstances enumerates the DkmClrModuleInstance elements of this DkmClrAppDomain object.

GetCorObject()

Provides direct access to the ICorDebugAppDomain object, which expression evaluators or other components can use to inspect the app domain.

The returned interface may ONLY be used to inspect the target process, and should NEVER be used to control execution (no stepping, no breakpoints, no continue, etc). Doing so is unsupported and will result in undefined behavior.

Location constraint: API must be called from a Monitor component (component level < 100,000).

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
GetManagedRuntimeModule()

Get the managed runtime module instance.(mscorlib.dll).

Location constraint: API must be called from a Monitor component (component level < 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

GetMetaDataBytes(String, Guid)

Used internally to support DkmClrAppDomain.GetMetaDataBytesPtr. For performance reasons, use GetMetaDataBytesPtr instead of this method.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

GetMetaDataBytesPtr(String, UInt32)

Get a pointer to the raw metadata bytes of the manifest module of the requested assembly that has not been loaded in the debuggee process. NOTE: This pointer value will become invalid if/when the actual module loads in the debuggee process or if the app domain is unloaded.

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

GetProperty(ICorDebugValue, String)

Evaluates a property on the given ICorDebugValue. The value's type must be loaded by the DkmClrAppDomain that this $Name$ is being called on.

Location constraint: This must be on the remote side because we are passing an ICorDebugHandleValue.

This API was introduced in Visual Studio 15 RTM (DkmApiVersion.VS15RTM).

RaiseCreatedEvent()

Raise a AppDomainCreated event. Components which implement the event sink interface will receive the event notification. Control will return once all components have been notified.

This method may only be called by the component which created the object.

Location constraint: API must be called from a Monitor component (component level < 100,000).

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
ResolveMvidByAssemblyName(String)

Resolve an assembly by name and return the MVID of its manifest module.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
Unload()

Mark the Unload object as unloaded and notify components which implement the event sink interface. Control will return once all components have been notified.

This method may only be called by the component which created the object.

Location constraint: API must be called from a Monitor component (component level < 100,000).

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

Explicit Interface Implementations

IDisposable.Dispose()

To be added.

Applies to