/// <summary> /// Gets the debugger module object or returns null if there is none (eg. it's a synthetic module) /// </summary> /// <param name="module">Debugger metadata module object</param> /// <returns></returns> public static DbgModule GetDebuggerModule(this DmdModule module) { if (module.TryGetData(out DbgModule dbgModule)) { return(dbgModule); } return(null); }
/// <summary> /// Called to get the method body stream or null if there's no method body. /// /// This method should use the CLR debugger API to get the address of the method body. /// /// This method is only called on the COM thread. /// </summary> /// <param name="module">Module</param> /// <param name="metadataToken">Metadata token of the method</param> /// <param name="rva">RVA of method body</param> /// <returns></returns> public abstract DmdDataStream TryGetMethodBody(DmdModule module, int metadataToken, uint rva);
/// <summary> /// Constructor /// </summary> /// <param name="module">Module</param> public DmdTypeScope(DmdModule module) { Kind = DmdTypeScopeKind.Module; Data = module ?? throw new ArgumentNullException(nameof(module)); Data2 = null; }
/// <summary> /// Gets the debugger module object /// </summary> /// <param name="module">Debugger metadata module object</param> /// <returns></returns> public static DbgModule GetDebuggerModule(this DmdModule module) => module.GetData <DbgModule>();
/// <summary> /// Removes a module from the assembly /// </summary> /// <param name="module">Module to remove</param> public abstract void Remove(DmdModule module);