ALC Enhancement nits (dotnet/coreclr#23506)
authorSteve MacLean <stmaclea@microsoft.com>
Thu, 28 Mar 2019 00:15:45 +0000 (20:15 -0400)
committerGitHub <noreply@github.com>
Thu, 28 Mar 2019 00:15:45 +0000 (20:15 -0400)
isCollectible default should be false
String should be string

Commit migrated from https://github.com/dotnet/coreclr/commit/75250f4edf8e6142e2e70fb7b3966bf2348fe0e1

src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs

index c54e39f..9b3a9d8 100644 (file)
@@ -254,7 +254,7 @@ namespace System.Reflection
                 if (s_loadfile.TryGetValue(normalizedPath, out result))
                     return result;
 
-                AssemblyLoadContext alc = new IndividualAssemblyLoadContext(String.Format("Assembly.LoadFile({0})", path));
+                AssemblyLoadContext alc = new IndividualAssemblyLoadContext(string.Format("Assembly.LoadFile({0})", path));
                 result = alc.LoadFromAssemblyPath(normalizedPath);
                 s_loadfile.Add(normalizedPath, result);
             }
index 4be5218..835c5c6 100644 (file)
@@ -52,7 +52,7 @@ namespace System.Runtime.Loader
         {
         }
 
-        public AssemblyLoadContext(string name, bool isCollectible = true) : this(false, isCollectible, name)
+        public AssemblyLoadContext(string name, bool isCollectible = false) : this(false, isCollectible, name)
         {
         }
 
@@ -420,7 +420,7 @@ namespace System.Runtime.Loader
 
     internal sealed class IndividualAssemblyLoadContext : AssemblyLoadContext
     {
-        internal IndividualAssemblyLoadContext(String name) : base(false, false, name)
+        internal IndividualAssemblyLoadContext(string name) : base(false, false, name)
         {
         }
     }