Skip to content

Commit 1ab7e70

Browse files
jkotasBillWagner
authored andcommitted
Update AssemblyLoadContext.xml (#3415)
* Update AssemblyLoadContext.xml * Update AssemblyLoadContext.xml This class is not abstract anymore starting with .NET Core 3.0 * Update AssemblyLoadContext.xml * Update AssemblyLoadContext.xml * Update AssemblyLoadContext.xml
1 parent f7a9427 commit 1ab7e70

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

xml/System.Runtime.Loader/AssemblyLoadContext.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</Base>
2222
<Interfaces />
2323
<Docs>
24-
<summary>Represents the runtime's concept of a scope for binding. This class is abstract.</summary>
24+
<summary>Represents the runtime's concept of a scope for assembly loading.</summary>
2525
<remarks>
2626
<format type="text/markdown"><![CDATA[
2727
@@ -30,18 +30,18 @@
3030
3131
<xref:System.Runtime.Loader.AssemblyLoadContext> is an abstract class. The <xref:System.Runtime.Loader.AssemblyLoadContext.Load(System.Reflection.AssemblyName)?displayProperty=nameWithType> needs to be implemented to create a concrete class.
3232
33-
The <xref:System.Runtime.Loader.AssemblyLoadContext> exists primarily to provide assembly binding isolation. It allows multiple versions of the same assembly to be loaded within a single process. It replaces the isolation mechanisms provided by multiple <xref:System.AppDomain> instances in the .NET Framework.
33+
The <xref:System.Runtime.Loader.AssemblyLoadContext> exists primarily to provide assembly loading isolation. It allows multiple versions of the same assembly to be loaded within a single process. It replaces the isolation mechanisms provided by multiple <xref:System.AppDomain> instances in the .NET Framework.
3434
3535
> [!NOTE]
3636
> <xref:System.Runtime.Loader.AssemblyLoadContext> does not provide any security features. All code has full permissions of the process.
3737
3838
### Usage in the runtime
3939
The runtime implements two assembly load contexts:
40-
* <xref:System.Runtime.Loader.AssemblyLoadContext.Default?displayProperty=nameWithType> represents the runtime's default binding context which is used for the application main assembly and its static dependencies.
40+
* <xref:System.Runtime.Loader.AssemblyLoadContext.Default?displayProperty=nameWithType> represents the runtime's default context which is used for the application main assembly and its static dependencies.
4141
* The <xref:System.Reflection.Assembly.LoadFile(System.String)?displayProperty=nameWithType> method isolates the assemblies it loads by instantiating the most basic <xref:System.Runtime.Loader.AssemblyLoadContext>. It has a simplistic isolation scheme which loads each assembly in its own <xref:System.Runtime.Loader.AssemblyLoadContext> with no dependency resolution.
4242
4343
### Application usage
44-
An application can create its own <xref:System.Runtime.Loader.AssemblyLoadContext> to create a custom solution for advanced binding scenarios. The customization focuses on defining dependency resolution mechanisms.
44+
An application can create its own <xref:System.Runtime.Loader.AssemblyLoadContext> to create a custom solution for advanced scenarios. The customization focuses on defining dependency resolution mechanisms.
4545
4646
The <xref:System.Runtime.Loader.AssemblyLoadContext> provides two extension points to implement managed assembly resolution:
4747
1. The <xref:System.Runtime.Loader.AssemblyLoadContext.Load(System.Reflection.AssemblyName)?displayProperty=nameWithType> provides the first chance for the <xref:System.Runtime.Loader.AssemblyLoadContext> to resolve the assembly, load it and return it. If the <xref:System.Runtime.Loader.AssemblyLoadContext.Load(System.Reflection.AssemblyName)?displayProperty=nameWithType> returns `null`, the loader will try to load the assembly into the <xref:System.Runtime.Loader.AssemblyLoadContext.Default?displayProperty=nameWithType>.
@@ -64,8 +64,8 @@
6464
6565
* The implementation of <xref:System.Runtime.Loader.AssemblyLoadContext.Load(System.Reflection.AssemblyName)?displayProperty=nameWithType> can add new dependencies which may need to be isolated to allow different versions to exist. The most natural implementation would place these dependencies in the default context. Careful design can isolate the new dependencies.
6666
67-
* The binding isolation process creates multiple types with the same type name.
68-
* This can lead to confusing error messages, for example "type Foo.Foo cannot be cast to type Foo.Foo."
67+
* The same assembly is loaded multiple times into different contexts.
68+
* This can lead to confusing error messages, for example "Unable to cast object of type 'Sample.Plugin' to type 'Sample.Plugin'."
6969
* Marshaling across isolation boundaries is non-trivial. A typical solution would be to use an interface defined in an assembly which is only loaded into the default load context.
7070
7171
]]></format>

0 commit comments

Comments
 (0)