ObjectSecurity.Persist ObjectSecurity.Persist ObjectSecurity.Persist ObjectSecurity.Persist Method

定義

受保護的方法,將這個 ObjectSecurity 物件中的安全性描述元資訊儲存到永久儲存體。Protected methods that save the security descriptor information in this ObjectSecurity object to permanent storage.

多載

Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。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)

參數

handle
SafeHandle SafeHandle SafeHandle SafeHandle

用來擷取保存資訊的控制代碼。The handle used to retrieve the persisted information.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

備註

保存ObjectSecurity物件時,如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該ObjectSecurity物件之includeSections函數的參數值不相同,區段保存ObjectSecurity物件的可能包含無法預測的值。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. 例如,如果includeSections使用的Access值來呼叫一個函式,而稍後Persist在該物件上All呼叫includeSections方法,且其值為,則產生的持續ObjectSecurity性物件將會包含無法預測的值,適用于其審核規則、群組和擁有者。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.

Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。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)

參數

name
String String String String

擷取保存資訊所使用的名稱。The name used to retrieve the persisted information.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

備註

保存ObjectSecurity物件時,如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該ObjectSecurity物件之includeSections函數的參數值不相同,區段保存ObjectSecurity物件的可能包含無法預測的值。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. 例如,如果includeSections使用的Access值來呼叫一個函式,而稍後Persist在該物件上All呼叫includeSections方法,且其值為,則產生的持續ObjectSecurity性物件將會包含無法預測的值,適用于其審核規則、群組和擁有者。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.

Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。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);
[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
Protected Overridable Sub Persist (enableOwnershipPrivilege As Boolean, name As String, includeSections As AccessControlSections)

參數

enableOwnershipPrivilege
Boolean Boolean Boolean Boolean

true 表示啟用允許呼叫者取得物件擁有權的權限。true to enable the privilege that allows the caller to take ownership of the object.

name
String String String String

擷取保存資訊所使用的名稱。The name used to retrieve the persisted information.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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.

備註

保存ObjectSecurity物件時,如果傳遞Persist至方法的includeSections參數值與傳遞給用來建立該ObjectSecurity物件之includeSections函數的參數值不相同,區段保存ObjectSecurity物件的可能包含無法預測的值。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. 例如,如果includeSections使用的Access值來呼叫一個函式,而稍後Persist在該物件上All呼叫includeSections方法,且其值為,則產生的持續ObjectSecurity性物件將會包含無法預測的值,適用于其審核規則、群組和擁有者。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.

適用於