ObjectSecurity.Persist 方法

定义

将此 ObjectSecurity 对象中的安全描述符信息保存到永久存储中的受保护方法。

重载

Persist(SafeHandle, AccessControlSections)

将与此 ObjectSecurity 对象关联的安全描述符的指定部分保存到永久存储中。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

Persist(String, AccessControlSections)

将与此 ObjectSecurity 对象关联的安全描述符的指定部分保存到永久存储中。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

Persist(Boolean, String, AccessControlSections)

将与此 ObjectSecurity 对象关联的安全描述符的指定部分保存到永久存储中。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

Persist(SafeHandle, AccessControlSections)

将与此 ObjectSecurity 对象关联的安全描述符的指定部分保存到永久存储中。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

protected:
 virtual void Persist(System::Runtime::InteropServices::SafeHandle ^ handle, System::Security::AccessControl::AccessControlSections includeSections);
protected virtual void Persist (System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections);
abstract member Persist : System.Runtime.InteropServices.SafeHandle * System.Security.AccessControl.AccessControlSections -> unit
override this.Persist : System.Runtime.InteropServices.SafeHandle * System.Security.AccessControl.AccessControlSections -> unit
Protected Overridable Sub Persist (handle As SafeHandle, includeSections As AccessControlSections)

参数

handle
SafeHandle

用于检索已保持信息的句柄。

includeSections
AccessControlSections

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

注解

保留ObjectSecurity对象时,如果传递给Persist方法的参数includeSections值与传递给用于创建该ObjectSecurity对象的构造函数的参数的值includeSections不同,则持久化ObjectSecurity对象的部分可能包含不可预知的值。 例如,如果调用includeSections值为 的Access构造函数,然后Persist对值为 All的对象调用includeSections方法,则生成的持久化ObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于

Persist(String, AccessControlSections)

将与此 ObjectSecurity 对象关联的安全描述符的指定部分保存到永久存储中。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

protected:
 virtual void Persist(System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections);
protected virtual void Persist (string name, System.Security.AccessControl.AccessControlSections includeSections);
abstract member Persist : string * System.Security.AccessControl.AccessControlSections -> unit
override this.Persist : string * System.Security.AccessControl.AccessControlSections -> unit
Protected Overridable Sub Persist (name As String, includeSections As AccessControlSections)

参数

name
String

用于检索已保存信息的名称。

includeSections
AccessControlSections

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

注解

保留ObjectSecurity对象时,如果传递给Persist方法的参数includeSections值与传递给用于创建该ObjectSecurity对象的构造函数的参数的值includeSections不同,则持久化ObjectSecurity对象的部分可能包含不可预知的值。 例如,如果调用includeSections值为 的Access构造函数,然后Persist对值为 All的对象调用includeSections方法,则生成的持久化ObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于

Persist(Boolean, String, AccessControlSections)

将与此 ObjectSecurity 对象关联的安全描述符的指定部分保存到永久存储中。 我们建议传递给构造函数和 persist 方法的 includeSections 参数的值应完全相同。

protected:
 virtual void Persist(bool enableOwnershipPrivilege, System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections);
protected virtual void Persist (bool enableOwnershipPrivilege, string name, System.Security.AccessControl.AccessControlSections includeSections);
[System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions]
protected virtual void Persist (bool enableOwnershipPrivilege, string name, System.Security.AccessControl.AccessControlSections includeSections);
abstract member Persist : bool * string * System.Security.AccessControl.AccessControlSections -> unit
override this.Persist : bool * string * System.Security.AccessControl.AccessControlSections -> unit
[<System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions>]
abstract member Persist : bool * string * System.Security.AccessControl.AccessControlSections -> unit
override this.Persist : bool * string * System.Security.AccessControl.AccessControlSections -> unit
Protected Overridable Sub Persist (enableOwnershipPrivilege As Boolean, name As String, includeSections As AccessControlSections)

参数

enableOwnershipPrivilege
Boolean

如果为 true,则启用允许调用方取得对象的所有权的权限。

name
String

用于检索已保存信息的名称。

includeSections
AccessControlSections

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

属性

注解

保留ObjectSecurity对象时,如果传递给Persist方法的参数includeSections值与传递给用于创建该ObjectSecurity对象的构造函数的参数的值includeSections不同,则持久化ObjectSecurity对象的部分可能包含不可预知的值。 例如,如果调用includeSections值为 的Access构造函数,然后Persist对值为 All的对象调用includeSections方法,则生成的持久化ObjectSecurity对象将包含其审核规则、组和所有者的不可预知值。

适用于