diff --git a/xml/System.Reflection/MetadataLoadContext.xml b/xml/System.Reflection/MetadataLoadContext.xml index 69510ae2afb..9dd240ac039 100644 --- a/xml/System.Reflection/MetadataLoadContext.xml +++ b/xml/System.Reflection/MetadataLoadContext.xml @@ -83,7 +83,7 @@ For more information and examples, see [How to: Inspect assembly contents using - + @@ -94,12 +94,6 @@ For more information and examples, see [How to: Inspect assembly contents using System.Reflection.MetadataLoadContext 11.0.0.0 - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - System.Reflection.Assembly @@ -113,10 +107,10 @@ For more information and examples, see [How to: Inspect assembly contents using The core assembly is treated differently than other assemblies because references to these well-known types do not include the assembly reference, unlike normal types. -Typically, this assembly is named "mscorlib" or "netstandard". If the core assembly cannot be found, the value will be `null`, and many other reflection methods, including those that parse method signatures, will throw an exception. +Typically, this assembly is named "System.Runtime", "mscorlib", or "netstandard". -The `CoreAssembly` is determined by passing the `coreAssemblyName` parameter passed to the constructor -to the method. +The `CoreAssembly` is determined by passing the `coreAssemblyName` parameter to the constructor, +which in turn passes it to the method. If no `coreAssemblyName` argument was specified in the constructor of , then default values are used, including "mscorlib", "System.Runtime" and "netstandard". @@ -124,35 +118,7 @@ The designated core assembly does not need to contain the core types directly. I Note that is not an ideal core assembly because it excludes some of the interop-related pseudo-custom attribute types such as . However, it can serve if you have no interest in those attributes. The CustomAttributes API will skip those attributes if the core assembly does not include the necessary types. -The core assembly is not loaded until necessary. The following APIs do not trigger the search for the core assembly: - -* -* -* -* -* -* -* -* -* -* -* -* -* -* - -If a core assembly cannot be found or if the core assembly is missing types, this will affect the behavior of the as follows: - -* APIs that need to parse signatures or typespecs and return the results as objects will throw an exception. For example: - - * - * - * - * - -* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. - -* If a metadata entity sets flags that surface as a pseudo-custom attribute, and the core assembly does not contain the pseudo-custom attribute type, the necessary constructor or any of the parameter types of the constructor, the will not throw. It will omit the pseudo-custom attribute from the list of returned attributes. +If a core assembly cannot be found, the constructor of throws an exception. ]]>