<PackageReference Include="System.Security.AccessControl" Version="6.0.0-preview.5.21301.5" />

NativeObjectSecurity

public abstract class NativeObjectSecurity : CommonObjectSecurity
Provides the ability to control access to native objects without direct manipulation of Access Control Lists (ACLs). Native object types are defined by the ResourceType enumeration.
using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace System.Security.AccessControl { [System.Runtime.CompilerServices.NullableContext(2)] [System.Runtime.CompilerServices.Nullable(0)] public abstract class NativeObjectSecurity : CommonObjectSecurity { [System.Runtime.CompilerServices.NullableContext(0)] protected internal delegate Exception ExceptionFromErrorCode (int errorCode, string name, SafeHandle handle, object context); protected NativeObjectSecurity(bool isContainer, ResourceType resourceType) : base(false) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle handle, AccessControlSections includeSections) : base(false) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle handle, AccessControlSections includeSections, ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(false) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(false) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, string name, AccessControlSections includeSections) : base(false) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, string name, AccessControlSections includeSections, ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(false) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(1)] protected sealed override void Persist(SafeHandle handle, AccessControlSections includeSections) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(1)] protected void Persist(SafeHandle handle, AccessControlSections includeSections, [System.Runtime.CompilerServices.Nullable(2)] object exceptionContext) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(1)] protected sealed override void Persist(string name, AccessControlSections includeSections) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(1)] protected void Persist(string name, AccessControlSections includeSections, [System.Runtime.CompilerServices.Nullable(2)] object exceptionContext) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } }