NativeObjectSecurity 构造函数

定义

初始化 NativeObjectSecurity 类的新实例。

重载

NativeObjectSecurity(Boolean, ResourceType)

用指定的值初始化 NativeObjectSecurity 类的新实例。

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

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

通过使用指定的值初始化 NativeObjectSecurity 类的新实例。

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

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

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

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

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

NativeObjectSecurity(Boolean, ResourceType)

用指定的值初始化 NativeObjectSecurity 类的新实例。

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)

参数

isContainer
Boolean

如果新true 对象是容器对象,则为 NativeObjectSecurity

resourceType
ResourceType

NativeObjectSecurity 对象与之关联的安全对象的类型。

适用于

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 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);
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)

参数

isContainer
Boolean

如果新true 对象是容器对象,则为 NativeObjectSecurity

resourceType
ResourceType

NativeObjectSecurity 对象与之关联的安全对象的类型。

handle
SafeHandle

NativeObjectSecurity 对象与之关联的安全对象的句柄。

includeSections
AccessControlSections

AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。

注解

保存NativeObjectSecurity对象时,如果传递给Persist该方法的参数的值includeSections与传递给用于创建该NativeObjectSecurity对象的构造函数的参数的值includeSections不相同,则持久化NativeObjectSecurity对象的节可以包含不可预知的值。 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.

适用于

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

通过使用指定的值初始化 NativeObjectSecurity 类的新实例。

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)

参数

isContainer
Boolean

如果新true 对象是容器对象,则为 NativeObjectSecurity

resourceType
ResourceType

NativeObjectSecurity 对象与之关联的安全对象的类型。

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

由提供自定义异常的集成者实现的委托。

exceptionContext
Object

包含有关异常的源或目标的上下文信息的对象。

适用于

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

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)

参数

isContainer
Boolean

如果新true 对象是容器对象,则为 NativeObjectSecurity

resourceType
ResourceType

NativeObjectSecurity 对象与之关联的安全对象的类型。

name
String

与新 NativeObjectSecurity 对象所关联的安全对象的名称。

includeSections
AccessControlSections

AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。

注解

保存NativeObjectSecurity对象时,如果传递给Persist该方法的参数的值includeSections与传递给用于创建该NativeObjectSecurity对象的构造函数的参数的值includeSections不相同,则持久化NativeObjectSecurity对象的节可以包含不可预知的值。 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.

适用于

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

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

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)

参数

isContainer
Boolean

如果新true 对象是容器对象,则为 NativeObjectSecurity

resourceType
ResourceType

NativeObjectSecurity 对象与之关联的安全对象的类型。

handle
SafeHandle

NativeObjectSecurity 对象与之关联的安全对象的句柄。

includeSections
AccessControlSections

AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

由提供自定义异常的集成者实现的委托。

exceptionContext
Object

包含有关异常的源或目标的上下文信息的对象。

注解

保存NativeObjectSecurity对象时,如果传递给Persist该方法的参数的值includeSections与传递给用于创建该NativeObjectSecurity对象的构造函数的参数的值includeSections不相同,则持久化NativeObjectSecurity对象的节可以包含不可预知的值。 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.

适用于

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

用指定的值初始化 NativeObjectSecurity 类的新实例。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

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)

参数

isContainer
Boolean

如果新true 对象是容器对象,则为 NativeObjectSecurity

resourceType
ResourceType

NativeObjectSecurity 对象与之关联的安全对象的类型。

name
String

与新 NativeObjectSecurity 对象所关联的安全对象的名称。

includeSections
AccessControlSections

AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

由提供自定义异常的集成者实现的委托。

exceptionContext
Object

包含有关异常的源或目标的上下文信息的对象。

注解

保存NativeObjectSecurity对象时,如果传递给Persist该方法的参数的值includeSections与传递给用于创建该NativeObjectSecurity对象的构造函数的参数的值includeSections不相同,则持久化NativeObjectSecurity对象的节可以包含不可预知的值。 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.

适用于