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

ObjectSecurity<T>

public abstract class ObjectSecurity<T> : NativeObjectSecurity where T : struct
Provides the ability to control access to objects without direct manipulation of Access Control Lists (ACLs); also grants the ability to type-cast access rights.
using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Principal; namespace System.Security.AccessControl { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public abstract class ObjectSecurity<[System.Runtime.CompilerServices.Nullable(0)] T> : NativeObjectSecurity where T : struct { public override Type AccessRightType { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } public override Type AccessRuleType { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } public override Type AuditRuleType { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } protected ObjectSecurity(bool isContainer, ResourceType resourceType) : base(false, ResourceType.Unknown) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(2)] protected ObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle safeHandle, AccessControlSections includeSections) : base(false, ResourceType.Unknown) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(2)] protected ObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle safeHandle, AccessControlSections includeSections, ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(false, ResourceType.Unknown) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(2)] protected ObjectSecurity(bool isContainer, ResourceType resourceType, string name, AccessControlSections includeSections) : base(false, ResourceType.Unknown) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } [System.Runtime.CompilerServices.NullableContext(2)] protected ObjectSecurity(bool isContainer, ResourceType resourceType, string name, AccessControlSections includeSections, ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(false, ResourceType.Unknown) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void AddAccessRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AccessRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void AddAuditRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AuditRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected internal void Persist(SafeHandle handle) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } protected internal void Persist(string name) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual bool RemoveAccessRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AccessRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void RemoveAccessRuleAll([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AccessRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void RemoveAccessRuleSpecific([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AccessRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual bool RemoveAuditRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AuditRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void RemoveAuditRuleAll([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AuditRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void RemoveAuditRuleSpecific([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AuditRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void ResetAccessRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AccessRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void SetAccessRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AccessRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } public virtual void SetAuditRule([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] AuditRule<T> rule) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } } }