Skip to content

Commit db1a61c

Browse files
Apply suggestions from code review (assembly)
Co-authored-by: Genevieve Warren <[email protected]>
1 parent a223824 commit db1a61c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

xml/System.Reflection/Assembly.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,7 +3241,7 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
32413241
## Remarks
32423242
This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the <xref:System.Type.GetType%28System.String%29?displayProperty=nameWithType> method overload, which can optionally include an assembly display name as part of the type name.
32433243

3244-
In .NET Core/.NET 5+, if there are assembly qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method which called Assembly.GetType. or if <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it is set.
3244+
In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method that called Assembly.GetType, or by the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set.
32453245

32463246
> [!NOTE]
32473247
> If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding).
@@ -3347,7 +3347,7 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
33473347
## Remarks
33483348
This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the <xref:System.Type.GetType%28System.String%29?displayProperty=nameWithType> method overload, which can optionally include an assembly display name as part of the type name.
33493349

3350-
In .NET Core/.NET 5+, if there are assembly qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method which called Assembly.GetType. or if <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it is set.
3350+
In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method that called Assembly.GetType, or by the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set.
33513351

33523352
> [!NOTE]
33533353
> If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding).
@@ -3454,7 +3454,7 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
34543454
## Remarks
34553455
This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the <xref:System.Type.GetType%28System.String%29?displayProperty=nameWithType> method overload, which can optionally include an assembly display name as part of the type name.
34563456

3457-
In .NET Core/.NET 5+, if there are assembly qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method which called Assembly.GetType. or if <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it is set.
3457+
In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method that called Assembly.GetType, or by the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set.
34583458

34593459
> [!NOTE]
34603460
> If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding).
@@ -4103,7 +4103,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim
41034103

41044104
## Remarks
41054105

4106-
In .NET Core/.NET 5+, the target assembly will be loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext>. or if <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it is set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm").
4106+
In .NET Core/.NET 5+, the target assembly will be loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or into the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm).
41074107

41084108
> [!NOTE]
41094109
> **.NET Framework only:** For information about loading assemblies from remote locations, see [`<loadFromRemoteSources>`](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element).
@@ -4197,7 +4197,7 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
41974197

41984198
## Remarks
41994199

4200-
In .NET Core/5+, the target assembly is loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or if <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it is set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm").
4200+
In .NET Core/.NET 5+, the target assembly will be loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or into the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm).
42014201

42024202
To load the correct assembly, it's recommended to call the `Load` method by passing the long form of the assembly name. The long form of an assembly name consists of its simple name (such as "System" for the System.dll assembly) along with its version, culture, public key token, and optionally its processor architecture. It corresponds to the assembly's <xref:System.Reflection.Assembly.FullName%2A> property. The following example illustrates the use of a long name to load the System.dll assembly for .NET Framework 4:
42034203

@@ -5577,7 +5577,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio
55775577

55785578
Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the <xref:System.Reflection.Assembly.Load%28System.String%29> method overload or the <xref:System.Reflection.Assembly.LoadFrom%28System.String%29> method overload.
55795579

5580-
In .NET Core/5+, the target assembly is loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or if <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it is set.
5580+
In .NET Core/5+, the target assembly is loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it's set.
55815581

55825582
This method first calls <xref:System.Reflection.Assembly.Load%2A>. If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number.
55835583

xml/System/Activator.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
574574
575575
For more information on how the common language runtime identifies and loads assemblies, see [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). For information on using the application configuration file to define assembly locations, see [Specifying an Assembly's Location](/dotnet/framework/configure-apps/specify-assembly-location). If `assemblyName` is found, it is loaded in the default context.
576576
577-
.NET Core 3.0, .NET Core 3.1 and .NET 5+: Assembly loads triggered by this api are affected by the current value of <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType>.
577+
In .NET Core 3.0 and later versions, assembly loads triggered by this API are affected by the current value of <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType>.
578578
579579
> [!NOTE]
580580
> This method can be used to create nonpublic types if the caller has been granted <xref:System.Security.Permissions.ReflectionPermission> with the <xref:System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess?displayProperty=nameWithType> flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.

0 commit comments

Comments
 (0)