Update delegate return value to nullable (#31781)
authorbuyaa-n <bunamnan@microsoft.com>
Wed, 5 Feb 2020 18:08:28 +0000 (10:08 -0800)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 18:08:28 +0000 (10:08 -0800)
src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs
src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs

index 7969c0e..2d62bd9 100644 (file)
@@ -332,7 +332,7 @@ namespace System.Security.AccessControl
         protected void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections, object? exceptionContext) { }
         protected sealed override void Persist(string name, System.Security.AccessControl.AccessControlSections includeSections) { }
         protected void Persist(string name, System.Security.AccessControl.AccessControlSections includeSections, object? exceptionContext) { }
-        protected internal delegate System.Exception ExceptionFromErrorCode(int errorCode, string? name, System.Runtime.InteropServices.SafeHandle? handle, object? context);
+        protected internal delegate System.Exception? ExceptionFromErrorCode(int errorCode, string? name, System.Runtime.InteropServices.SafeHandle? handle, object? context);
     }
     public abstract partial class ObjectAccessRule : System.Security.AccessControl.AccessRule
     {
index c616796..b77e4a0 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Security.AccessControl
 
         #region Delegates
 
-        protected internal delegate System.Exception ExceptionFromErrorCode(int errorCode, string? name, SafeHandle? handle, object? context);
+        protected internal delegate System.Exception? ExceptionFromErrorCode(int errorCode, string? name, SafeHandle? handle, object? context);
 
         #endregion