Add nullable annotations to System.Runtime.Loader ref (dotnet/corefx#38417)
authorSantiago Fernandez Madero <safern@microsoft.com>
Tue, 18 Jun 2019 03:47:53 +0000 (20:47 -0700)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2019 03:47:53 +0000 (20:47 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/753ae3bca0330fbf80cf20bed0a676d317eefa08

src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.cs
src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj

index c15abcd..b8e8078 100644 (file)
@@ -18,34 +18,34 @@ namespace System.Runtime.Loader
     public sealed partial class AssemblyDependencyResolver
     {
         public AssemblyDependencyResolver(string componentAssemblyPath) { }
-        public string ResolveAssemblyToPath(System.Reflection.AssemblyName assemblyName) { throw null; }
-        public string ResolveUnmanagedDllToPath(string unmanagedDllName) { throw null; }
+        public string? ResolveAssemblyToPath(System.Reflection.AssemblyName assemblyName) { throw null; }
+        public string? ResolveUnmanagedDllToPath(string unmanagedDllName) { throw null; }
     }
     public partial class AssemblyLoadContext
     {
         protected AssemblyLoadContext() { }
         protected AssemblyLoadContext(bool isCollectible) { }
-        public AssemblyLoadContext(string name, bool isCollectible = false) { }
+        public AssemblyLoadContext(string? name, bool isCollectible = false) { }
         public static System.Collections.Generic.IEnumerable<System.Runtime.Loader.AssemblyLoadContext> All { get { throw null; } }
         public System.Collections.Generic.IEnumerable<System.Reflection.Assembly> Assemblies { get { throw null; } }
-        public static System.Runtime.Loader.AssemblyLoadContext CurrentContextualReflectionContext { get { throw null; } }
+        public static System.Runtime.Loader.AssemblyLoadContext? CurrentContextualReflectionContext { get { throw null; } }
         public static System.Runtime.Loader.AssemblyLoadContext Default { get { throw null; } }
         public bool IsCollectible { get { throw null; } }
-        public string Name { get { throw null; } }
-        public event System.Func<System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly> Resolving { add { } remove { } }
+        public string? Name { get { throw null; } }
+        public event System.Func<System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly?> Resolving { add { } remove { } }
         public event System.Func<System.Reflection.Assembly, string, System.IntPtr> ResolvingUnmanagedDll { add { } remove { } }
         public event System.Action<System.Runtime.Loader.AssemblyLoadContext> Unloading { add { } remove { } }
         public System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection() { throw null; }
-        public static System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection(System.Reflection.Assembly activating) { throw null; }
+        public static System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection(System.Reflection.Assembly? activating) { throw null; }
         ~AssemblyLoadContext() { }
         public static System.Reflection.AssemblyName GetAssemblyName(string assemblyPath) { throw null; }
-        public static System.Runtime.Loader.AssemblyLoadContext GetLoadContext(System.Reflection.Assembly assembly) { throw null; }
-        protected virtual System.Reflection.Assembly Load(System.Reflection.AssemblyName assemblyName) { throw null; }
+        public static System.Runtime.Loader.AssemblyLoadContext? GetLoadContext(System.Reflection.Assembly assembly) { throw null; }
+        protected virtual System.Reflection.Assembly? Load(System.Reflection.AssemblyName assemblyName) { throw null; }
         public System.Reflection.Assembly LoadFromAssemblyName(System.Reflection.AssemblyName assemblyName) { throw null; }
         public System.Reflection.Assembly LoadFromAssemblyPath(string assemblyPath) { throw null; }
-        public System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string assemblyPath) { throw null; }
+        public System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string? assemblyPath) { throw null; }
         public System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly) { throw null; }
-        public System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly, System.IO.Stream assemblySymbols) { throw null; }
+        public System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly, System.IO.Stream? assemblySymbols) { throw null; }
         protected virtual System.IntPtr LoadUnmanagedDll(string unmanagedDllName) { throw null; }
         protected System.IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath) { throw null; }
         public void SetProfileOptimizationRoot(string directoryPath) { }
index 7d8a534..388f5ea 100644 (file)
@@ -5,6 +5,7 @@
     <!-- CS0067: unused event, reference assembly does not care -->
     <NoWarn>$(NoWarn);0067</NoWarn>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+    <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System.Runtime.Loader.cs" />