From 38a49a79cdf04ec0a579c1846148f7877e6ac39a Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Mon, 17 Jun 2019 20:47:53 -0700 Subject: [PATCH] Add nullable annotations to System.Runtime.Loader ref (dotnet/corefx#38417) Commit migrated from https://github.com/dotnet/corefx/commit/753ae3bca0330fbf80cf20bed0a676d317eefa08 --- .../ref/System.Runtime.Loader.cs | 22 +++++++++++----------- .../ref/System.Runtime.Loader.csproj | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.cs b/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.cs index c15abcd..b8e8078 100644 --- a/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.cs +++ b/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.cs @@ -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 All { get { throw null; } } public System.Collections.Generic.IEnumerable 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 Resolving { add { } remove { } } + public string? Name { get { throw null; } } + public event System.Func Resolving { add { } remove { } } public event System.Func ResolvingUnmanagedDll { add { } remove { } } public event System.Action 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) { } diff --git a/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj b/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj index 7d8a534..388f5ea 100644 --- a/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj +++ b/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj @@ -5,6 +5,7 @@ $(NoWarn);0067 netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + enable -- 2.7.4