ObjectSecurity<T> Constructors

Definition

Creates a new instance of the ObjectSecurity`1 object, using the specified values.

Overloads

ObjectSecurity<T>(Boolean, ResourceType)

Initializes a new instance of the ObjectSecurity`1 class.

ObjectSecurity<T>(Boolean, ResourceType, SafeHandle, AccessControlSections)

Initializes a new instance of the ObjectSecurity`1 class.

ObjectSecurity<T>(Boolean, ResourceType, String, AccessControlSections)

Initializes a new instance of the ObjectSecurity`1 class.

ObjectSecurity<T>(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the ObjectSecurity`1 class.

ObjectSecurity<T>(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the ObjectSecurity`1 class.

ObjectSecurity<T>(Boolean, ResourceType)

Source:
ObjectSecurityT.cs

Initializes a new instance of the ObjectSecurity`1 class.

C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType);

Parameters

isContainer
Boolean

true if the new ObjectSecurity<T> object is a container object.

resourceType
ResourceType

The type of resource.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5

ObjectSecurity<T>(Boolean, ResourceType, SafeHandle, AccessControlSections)

Source:
ObjectSecurityT.cs

Initializes a new instance of the ObjectSecurity`1 class.

C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? safeHandle, System.Security.AccessControl.AccessControlSections includeSections);
C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle safeHandle, System.Security.AccessControl.AccessControlSections includeSections);

Parameters

isContainer
Boolean

true if the new ObjectSecurity<T> object is a container object.

resourceType
ResourceType

The type of resource.

safeHandle
SafeHandle

A handle.

includeSections
AccessControlSections

The sections to include.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5

ObjectSecurity<T>(Boolean, ResourceType, String, AccessControlSections)

Source:
ObjectSecurityT.cs

Initializes a new instance of the ObjectSecurity`1 class.

C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string? name, System.Security.AccessControl.AccessControlSections includeSections);
C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections);

Parameters

isContainer
Boolean

true if the new ObjectSecurity<T> object is a container object.

resourceType
ResourceType

The type of resource.

name
String

The name of the securable object with which the new ObjectSecurity<T> object is associated.

includeSections
AccessControlSections

The sections to include.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5

ObjectSecurity<T>(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Source:
ObjectSecurityT.cs

Initializes a new instance of the ObjectSecurity`1 class.

C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? safeHandle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext);
C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle safeHandle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext);

Parameters

isContainer
Boolean

true if the new ObjectSecurity<T> object is a container object.

resourceType
ResourceType

The type of resource.

safeHandle
SafeHandle

A handle.

includeSections
AccessControlSections

The sections to include.

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

A delegate implemented by integrators that provides custom exceptions.

exceptionContext
Object

An object that contains contextual information about the source or destination of the exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5

ObjectSecurity<T>(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Source:
ObjectSecurityT.cs

Initializes a new instance of the ObjectSecurity`1 class.

C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string? name, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext);
C#
protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext);

Parameters

isContainer
Boolean

true if the new ObjectSecurity<T> object is a container object.

resourceType
ResourceType

The type of resource.

name
String

The name of the securable object with which the new ObjectSecurity<T> object is associated.

includeSections
AccessControlSections

The sections to include.

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

A delegate implemented by integrators that provides custom exceptions.

exceptionContext
Object

An object that contains contextual information about the source or destination of the exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5