ICorProfilerInfo7::ApplyMetaData Method
[Supported in the .NET Framework 4.6.1 and later versions]
Applies the metadata newly defined by the IMetadataEmit::Define*
methods to a specified module.
Syntax
HRESULT ApplyMetaData(
[in] ModuleID moduleID
);
Parameters
moduleID
[in] The identifier of the module whose metadata was changed.
Remarks
If metadata changes are made after the ModuleLoadFinished callback, you must call this method before using the new metadata.
ApplyMetaData
only supports adding the following types of metadata:
AssemblyRef
records, which you create by calling the IMetaDataAssemblyEmit::DefineAssemblyRef. method.TypeRef
records, which you create by calling the IMetaDataEmit::DefineTypeRefByName method.TypeSpec
records, which you create by calling the IMetaDataEmit::GetTokenFromTypeSpec method.MemberRef
records, which you create by calling the IMetaDataEmit::DefineMemberRef method.MemberSpec
records, which you create by calling the IMetaDataEmit2::DefineMethodSpec method.UserString
records, which you create by calling the IMetaDataEmit::DefineUserString method.
Starting with .NET Core 3.0, ApplyMetaData
also supports the following types:
TypeDef
records, which you create by calling the IMetaDataEmit::DefineTypeDef method.MethodDef
records, which you create by calling the IMetaDataEmit::DefineMethod method. However, adding virtual methods to an existing type is not supported. Virtual methods must be added before the ModuleLoadFinished callback.
Requirements
Platforms: See System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: Available since 4.6.1