Skip to content

Commit 436bbe9

Browse files
committed
Inheritance-friendly ScriptAssemblyLoadContext constructors.
1 parent fad86f6 commit 436bbe9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/Dotnet.Script.Core/ScriptAssemblyLoadContext.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,36 @@ namespace Dotnet.Script.Core
1313
/// </summary>
1414
public class ScriptAssemblyLoadContext : AssemblyLoadContext
1515
{
16+
/// <summary>
17+
/// Initializes a new instance of the <see cref="ScriptAssemblyLoadContext"/> class.
18+
/// </summary>
19+
public ScriptAssemblyLoadContext()
20+
{
21+
}
22+
23+
#if NETCOREAPP3_0_OR_GREATER
24+
/// <summary>
25+
/// Initializes a new instance of the <see cref="ScriptAssemblyLoadContext"/> class
26+
/// with a name and a value that indicates whether unloading is enabled.
27+
/// </summary>
28+
/// <param name="name"><inheritdoc/></param>
29+
/// <param name="isCollectible"><inheritdoc/></param>
30+
public ScriptAssemblyLoadContext(string? name, bool isCollectible = false) :
31+
base(name, isCollectible)
32+
{
33+
}
34+
35+
/// <summary>
36+
/// Initializes a new instance of the <see cref="ScriptAssemblyLoadContext"/> class
37+
/// with a value that indicates whether unloading is enabled.
38+
/// </summary>
39+
/// <param name="isCollectible"><inheritdoc/></param>
40+
protected ScriptAssemblyLoadContext(bool isCollectible) :
41+
base(isCollectible)
42+
{
43+
}
44+
#endif
45+
1646
/// <summary>
1747
/// <para>
1848
/// Gets the value indicating whether a specified assembly is homogeneous.

0 commit comments

Comments
 (0)