NativeObjectSecurity Constructors

Definition

Initializes a new instance of the NativeObjectSecurity class.

Overloads

NativeObjectSecurity(Boolean, ResourceType)

Initializes a new instance of the NativeObjectSecurity class with the specified values.

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

NativeObjectSecurity(Boolean, ResourceType, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the NativeObjectSecurity class by using the specified values.

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

NativeObjectSecurity(Boolean, ResourceType)

Initializes a new instance of the NativeObjectSecurity class with the specified values.

protected:
 NativeObjectSecurity(bool isContainer, System::Security::AccessControl::ResourceType resourceType);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType);
new System.Security.AccessControl.NativeObjectSecurity : bool * System.Security.AccessControl.ResourceType -> System.Security.AccessControl.NativeObjectSecurity
Protected Sub New (isContainer As Boolean, resourceType As ResourceType)

Parameters

isContainer
Boolean

true if the new NativeObjectSecurity object is a container object.

resourceType
ResourceType

The type of securable object with which the new NativeObjectSecurity object is associated.

Applies to

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 NativeObjectSecurity(bool isContainer, System::Security::AccessControl::ResourceType resourceType, System::Runtime::InteropServices::SafeHandle ^ handle, System::Security::AccessControl::AccessControlSections includeSections);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? handle, System.Security.AccessControl.AccessControlSections includeSections);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections);
new System.Security.AccessControl.NativeObjectSecurity : bool * System.Security.AccessControl.ResourceType * System.Runtime.InteropServices.SafeHandle * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.NativeObjectSecurity
Protected Sub New (isContainer As Boolean, resourceType As ResourceType, handle As SafeHandle, includeSections As AccessControlSections)

Parameters

isContainer
Boolean

true if the new NativeObjectSecurity object is a container object.

resourceType
ResourceType

The type of securable object with which the new NativeObjectSecurity object is associated.

handle
SafeHandle

The handle of the securable object with which the new NativeObjectSecurity object is associated.

includeSections
AccessControlSections

One of the AccessControlSections enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this NativeObjectSecurity object.

Remarks

When persisting a NativeObjectSecurity object, if the value of the includeSections parameter passed to the Persist method is not identical to the value of the includeSections parameter passed to the constructor used to create that NativeObjectSecurity object, sections of the persisted NativeObjectSecurity object can contain unpredictable values. For example, if a constructor is called with an includeSections value of Access, and later a Persist method is called on that object with an includeSections value of All, the resulting persisted NativeObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to

NativeObjectSecurity(Boolean, ResourceType, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the NativeObjectSecurity class by using the specified values.

protected:
 NativeObjectSecurity(bool isContainer, System::Security::AccessControl::ResourceType resourceType, System::Security::AccessControl::NativeObjectSecurity::ExceptionFromErrorCode ^ exceptionFromErrorCode, System::Object ^ exceptionContext);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext);
new System.Security.AccessControl.NativeObjectSecurity : bool * System.Security.AccessControl.ResourceType * System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode * obj -> System.Security.AccessControl.NativeObjectSecurity
Protected Sub New (isContainer As Boolean, resourceType As ResourceType, exceptionFromErrorCode As NativeObjectSecurity.ExceptionFromErrorCode, exceptionContext As Object)

Parameters

isContainer
Boolean

true if the new NativeObjectSecurity object is a container object.

resourceType
ResourceType

The type of securable object with which the new NativeObjectSecurity object is associated.

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

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 NativeObjectSecurity(bool isContainer, System::Security::AccessControl::ResourceType resourceType, System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, string? name, System.Security.AccessControl.AccessControlSections includeSections);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections);
new System.Security.AccessControl.NativeObjectSecurity : bool * System.Security.AccessControl.ResourceType * string * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.NativeObjectSecurity
Protected Sub New (isContainer As Boolean, resourceType As ResourceType, name As String, includeSections As AccessControlSections)

Parameters

isContainer
Boolean

true if the new NativeObjectSecurity object is a container object.

resourceType
ResourceType

The type of securable object with which the new NativeObjectSecurity object is associated.

name
String

The name of the securable object with which the new NativeObjectSecurity object is associated.

includeSections
AccessControlSections

One of the AccessControlSections enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this NativeObjectSecurity object.

Remarks

When persisting a NativeObjectSecurity object, if the value of the includeSections parameter passed to the Persist method is not identical to the value of the includeSections parameter passed to the constructor used to create that NativeObjectSecurity object, sections of the persisted NativeObjectSecurity object can contain unpredictable values. For example, if a constructor is called with an includeSections value of Access, and later a Persist method is called on that object with an includeSections value of All, the resulting persisted NativeObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 NativeObjectSecurity(bool isContainer, System::Security::AccessControl::ResourceType resourceType, System::Runtime::InteropServices::SafeHandle ^ handle, System::Security::AccessControl::AccessControlSections includeSections, System::Security::AccessControl::NativeObjectSecurity::ExceptionFromErrorCode ^ exceptionFromErrorCode, System::Object ^ exceptionContext);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? handle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext);
new System.Security.AccessControl.NativeObjectSecurity : bool * System.Security.AccessControl.ResourceType * System.Runtime.InteropServices.SafeHandle * System.Security.AccessControl.AccessControlSections * System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode * obj -> System.Security.AccessControl.NativeObjectSecurity
Protected Sub New (isContainer As Boolean, resourceType As ResourceType, handle As SafeHandle, includeSections As AccessControlSections, exceptionFromErrorCode As NativeObjectSecurity.ExceptionFromErrorCode, exceptionContext As Object)

Parameters

isContainer
Boolean

true if the new NativeObjectSecurity object is a container object.

resourceType
ResourceType

The type of securable object with which the new NativeObjectSecurity object is associated.

handle
SafeHandle

The handle of the securable object with which the new NativeObjectSecurity object is associated.

includeSections
AccessControlSections

One of the AccessControlSections enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this NativeObjectSecurity object.

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.

Remarks

When persisting a NativeObjectSecurity object, if the value of the includeSections parameter passed to the Persist method is not identical to the value of the includeSections parameter passed to the constructor used to create that NativeObjectSecurity object, sections of the persisted NativeObjectSecurity object can contain unpredictable values. For example, if a constructor is called with an includeSections value of Access, and later a Persist method is called on that object with an includeSections value of All, the resulting persisted NativeObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

Initializes a new instance of the NativeObjectSecurity class with the specified values. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

protected:
 NativeObjectSecurity(bool isContainer, System::Security::AccessControl::ResourceType resourceType, System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections, System::Security::AccessControl::NativeObjectSecurity::ExceptionFromErrorCode ^ exceptionFromErrorCode, System::Object ^ exceptionContext);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, string? name, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext);
protected NativeObjectSecurity (bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext);
new System.Security.AccessControl.NativeObjectSecurity : bool * System.Security.AccessControl.ResourceType * string * System.Security.AccessControl.AccessControlSections * System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode * obj -> System.Security.AccessControl.NativeObjectSecurity
Protected Sub New (isContainer As Boolean, resourceType As ResourceType, name As String, includeSections As AccessControlSections, exceptionFromErrorCode As NativeObjectSecurity.ExceptionFromErrorCode, exceptionContext As Object)

Parameters

isContainer
Boolean

true if the new NativeObjectSecurity object is a container object.

resourceType
ResourceType

The type of securable object with which the new NativeObjectSecurity object is associated.

name
String

The name of the securable object with which the new NativeObjectSecurity object is associated.

includeSections
AccessControlSections

One of the AccessControlSections enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this NativeObjectSecurity object.

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.

Remarks

When persisting a NativeObjectSecurity object, if the value of the includeSections parameter passed to the Persist method is not identical to the value of the includeSections parameter passed to the constructor used to create that NativeObjectSecurity object, sections of the persisted NativeObjectSecurity object can contain unpredictable values. For example, if a constructor is called with an includeSections value of Access, and later a Persist method is called on that object with an includeSections value of All, the resulting persisted NativeObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to