Rediger

Del via


ObjectSecurity.Persist Method

Definition

Protected methods that save the security descriptor information in this ObjectSecurity object to permanent storage.

Overloads

Persist(SafeHandle, AccessControlSections)

Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(String, AccessControlSections)

Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(Boolean, String, AccessControlSections)

Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(SafeHandle, AccessControlSections)

Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

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)

Parameters

handle
SafeHandle

The handle used to retrieve the persisted information.

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 save.

Remarks

When persisting a ObjectSecurity 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 ObjectSecurity object, sections of the persisted ObjectSecurity 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 ObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to

Persist(String, AccessControlSections)

Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

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)

Parameters

name
String

The name used to retrieve the persisted information.

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 save.

Remarks

When persisting a ObjectSecurity 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 ObjectSecurity object, sections of the persisted ObjectSecurity 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 ObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to

Persist(Boolean, String, AccessControlSections)

Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

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)

Parameters

enableOwnershipPrivilege
Boolean

true to enable the privilege that allows the caller to take ownership of the object.

name
String

The name used to retrieve the persisted information.

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 save.

Attributes

Remarks

When persisting a ObjectSecurity 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 ObjectSecurity object, sections of the persisted ObjectSecurity 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 ObjectSecurity object will contain unpredictable values for its audit rules, group, and owner.

Applies to