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对象的部分可以包含不可预知的值。 例如,如果调用一个includeSections值为 的Access构造函数,然后对includeSections值为 All的对象调用方法Persist,则生成的持久化NativeObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于

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对象的部分可以包含不可预知的值。 例如,如果调用一个includeSections值为 的Access构造函数,然后对includeSections值为 All的对象调用方法Persist,则生成的持久化NativeObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于

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对象的部分可以包含不可预知的值。 例如,如果调用一个includeSections值为 的Access构造函数,然后对includeSections值为 All的对象调用方法Persist,则生成的持久化NativeObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于

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对象的部分可以包含不可预知的值。 例如,如果调用一个includeSections值为 的Access构造函数,然后对includeSections值为 All的对象调用方法Persist,则生成的持久化NativeObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于