NativeObjectSecurity 构造函数
定义
初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class.
重载
| NativeObjectSecurity(Boolean, ResourceType) |
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. |
| NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections) |
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 |
| NativeObjectSecurity(Boolean, ResourceType, NativeObjectSecurity+ExceptionFromErrorCode, Object) |
通过使用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class by using the specified values. |
| NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections) |
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 |
| NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object) |
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 |
| NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object) |
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 |
NativeObjectSecurity(Boolean, ResourceType)
用指定的值初始化 NativeObjectSecurity 类的新实例。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)
参数
- isContainer
- Boolean
如果新true 对象是容器对象,则为 NativeObjectSecurity 。true if the new NativeObjectSecurity object is a container object.
- resourceType
- ResourceType
新 NativeObjectSecurity 对象与之关联的安全对象的类型。The type of securable object with which the new NativeObjectSecurity object is associated.
适用于
NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。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)
参数
- isContainer
- Boolean
如果新true 对象是容器对象,则为 NativeObjectSecurity 。true if the new NativeObjectSecurity object is a container object.
- resourceType
- ResourceType
新 NativeObjectSecurity 对象与之关联的安全对象的类型。The type of securable object with which the new NativeObjectSecurity object is associated.
- handle
- SafeHandle
新 NativeObjectSecurity 对象与之关联的安全对象的句柄。The handle of the securable object with which the new NativeObjectSecurity object is associated.
- includeSections
- AccessControlSections
AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。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.
注解
保持对象时 NativeObjectSecurity ,如果传递给方法的参数的值与 includeSections Persist includeSections 传递到用于创建该对象的构造函数的参数的值不完全相同 NativeObjectSecurity ,则持久化对象的部分 NativeObjectSecurity 可能包含不可预测的值。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. 例如,如果调用的构造函数的值为 includeSections ,则将 Access Persist 对值为的对象调用方法 includeSections All ,生成的持久 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 类的新实例。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)
参数
- isContainer
- Boolean
如果新true 对象是容器对象,则为 NativeObjectSecurity 。true if the new NativeObjectSecurity object is a container object.
- resourceType
- ResourceType
新 NativeObjectSecurity 对象与之关联的安全对象的类型。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.
适用于
NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)
用指定的值初始化 NativeObjectSecurity 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。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)
参数
- isContainer
- Boolean
如果新true 对象是容器对象,则为 NativeObjectSecurity 。true if the new NativeObjectSecurity object is a container object.
- resourceType
- ResourceType
新 NativeObjectSecurity 对象与之关联的安全对象的类型。The type of securable object with which the new NativeObjectSecurity object is associated.
- name
- String
与新 NativeObjectSecurity 对象所关联的安全对象的名称。The name of the securable object with which the new NativeObjectSecurity object is associated.
- includeSections
- AccessControlSections
AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。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.
注解
保持对象时 NativeObjectSecurity ,如果传递给方法的参数的值与 includeSections Persist includeSections 传递到用于创建该对象的构造函数的参数的值不完全相同 NativeObjectSecurity ,则持久化对象的部分 NativeObjectSecurity 可能包含不可预测的值。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. 例如,如果调用的构造函数的值为 includeSections ,则将 Access Persist 对值为的对象调用方法 includeSections All ,生成的持久 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 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。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)
参数
- isContainer
- Boolean
如果新true 对象是容器对象,则为 NativeObjectSecurity 。true if the new NativeObjectSecurity object is a container object.
- resourceType
- ResourceType
新 NativeObjectSecurity 对象与之关联的安全对象的类型。The type of securable object with which the new NativeObjectSecurity object is associated.
- handle
- SafeHandle
新 NativeObjectSecurity 对象与之关联的安全对象的句柄。The handle of the securable object with which the new NativeObjectSecurity object is associated.
- includeSections
- AccessControlSections
AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。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.
注解
保持对象时 NativeObjectSecurity ,如果传递给方法的参数的值与 includeSections Persist includeSections 传递到用于创建该对象的构造函数的参数的值不完全相同 NativeObjectSecurity ,则持久化对象的部分 NativeObjectSecurity 可能包含不可预测的值。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. 例如,如果调用的构造函数的值为 includeSections ,则将 Access Persist 对值为的对象调用方法 includeSections All ,生成的持久 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 类的新实例。Initializes a new instance of the NativeObjectSecurity class with the specified values. 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。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)
参数
- isContainer
- Boolean
如果新true 对象是容器对象,则为 NativeObjectSecurity 。true if the new NativeObjectSecurity object is a container object.
- resourceType
- ResourceType
新 NativeObjectSecurity 对象与之关联的安全对象的类型。The type of securable object with which the new NativeObjectSecurity object is associated.
- name
- String
与新 NativeObjectSecurity 对象所关联的安全对象的名称。The name of the securable object with which the new NativeObjectSecurity object is associated.
- includeSections
- AccessControlSections
AccessControlSections 枚举值之一,该值指定要包含在此 NativeObjectSecurity 对象中的安全对象的安全描述符(访问规则、审核规则、所有者和主要组)的部分。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.
注解
保持对象时 NativeObjectSecurity ,如果传递给方法的参数的值与 includeSections Persist includeSections 传递到用于创建该对象的构造函数的参数的值不完全相同 NativeObjectSecurity ,则持久化对象的部分 NativeObjectSecurity 可能包含不可预测的值。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. 例如,如果调用的构造函数的值为 includeSections ,则将 Access Persist 对值为的对象调用方法 includeSections All ,生成的持久 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.