Share via


ObjectSecurity.Persist 方法

定義

受保護的方法,將這個 ObjectSecurity 物件中的安全性描述元資訊儲存到永久儲存體。

多載

Persist(SafeHandle, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

Persist(String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

Persist(Boolean, String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

Persist(SafeHandle, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。 建議傳遞至建構函式和保存方法之 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物件的區段可以包含無法預測的值。 例如,如果使用的值Access呼叫建構函includeSections式,而稍後Persist在該物件上呼叫值為 All的方法,產生的保存ObjectSecurity物件includeSections將包含其稽核規則、群組和擁有者無法預期的值。

適用於

Persist(String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。 建議傳遞至建構函式和保存方法之 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物件的區段可以包含無法預測的值。 例如,如果使用的值Access呼叫建構函includeSections式,而稍後Persist在該物件上呼叫值為 All的方法,產生的保存ObjectSecurity物件includeSections將包含其稽核規則、群組和擁有者無法預期的值。

適用於

Persist(Boolean, String, AccessControlSections)

將與這個 ObjectSecurity 物件相關聯之安全性描述元的指定區段儲存到永久儲存區。 建議傳遞至建構函式和保存方法之 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物件的區段可以包含無法預測的值。 例如,如果使用的值Access呼叫建構函includeSections式,而稍後Persist在該物件上呼叫值為 All的方法,產生的保存ObjectSecurity物件includeSections將包含其稽核規則、群組和擁有者無法預期的值。

適用於