NativeObjectSecurity 建構函式

定義

初始化 NativeObjectSecurity 類別的新執行個體。

多載

NativeObjectSecurity(Boolean, ResourceType)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

NativeObjectSecurity(Boolean, ResourceType, NativeObjectSecurity+ExceptionFromErrorCode, Object)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

NativeObjectSecurity(Boolean, ResourceType)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。

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

resourceType
ResourceType

安全物件類型,新的 NativeObjectSecurity 物件與其相關聯。

適用於

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 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);
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

resourceType
ResourceType

安全物件類型,新的 NativeObjectSecurity 物件與其相關聯。

handle
SafeHandle

安全性實體物件的控制代碼,新的 NativeObjectSecurity 物件與其相關聯。

includeSections
AccessControlSections

AccessControlSections 列舉值的其中一個,指定要包含在 NativeObjectSecurity 物件之安全性實體物件的安全性描述元 (存取規則、稽核規則、擁有者、主要群組) 的區段。

備註

保存 NativeObjectSecurity 物件時,如果傳遞至 Persist 方法的參數 includeSections 值與傳遞至用來建立該 NativeObjectSecurity 物件的建構函式的參數值 includeSections 不相同,保存 NativeObjectSecurity 物件的區段可以包含無法預測的值。 例如,如果使用 的值呼叫 includeSections 建構函式,且稍後 Persist 在該物件 AllincludeSections 上呼叫方法的值為 ,則產生的保存 NativeObjectSecurity 物件將包含其稽核規則、群組和擁有者無法預測 Access 的值。

適用於

NativeObjectSecurity(Boolean, ResourceType, NativeObjectSecurity+ExceptionFromErrorCode, Object)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。

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

resourceType
ResourceType

安全物件類型,新的 NativeObjectSecurity 物件與其相關聯。

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

可提供自訂例外狀況之整合者所實作的委派。

exceptionContext
Object

包含來源或目的地例外狀況相關內容資訊的物件。

適用於

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

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

resourceType
ResourceType

安全物件類型,新的 NativeObjectSecurity 物件與其相關聯。

name
String

新的 NativeObjectSecurity 物件與其相關聯之安全物件的名稱。

includeSections
AccessControlSections

AccessControlSections 列舉值的其中一個,指定要包含在 NativeObjectSecurity 物件之安全性實體物件的安全性描述元 (存取規則、稽核規則、擁有者、主要群組) 的區段。

備註

保存 NativeObjectSecurity 物件時,如果傳遞至 Persist 方法的參數 includeSections 值與傳遞至用來建立該 NativeObjectSecurity 物件的建構函式的參數值 includeSections 不相同,保存 NativeObjectSecurity 物件的區段可以包含無法預測的值。 例如,如果使用 的值呼叫 includeSections 建構函式,且稍後 Persist 在該物件 AllincludeSections 上呼叫方法的值為 ,則產生的保存 NativeObjectSecurity 物件將包含其稽核規則、群組和擁有者無法預測 Access 的值。

適用於

NativeObjectSecurity(Boolean, ResourceType, SafeHandle, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

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

resourceType
ResourceType

安全物件類型,新的 NativeObjectSecurity 物件與其相關聯。

handle
SafeHandle

安全性實體物件的控制代碼,新的 NativeObjectSecurity 物件與其相關聯。

includeSections
AccessControlSections

AccessControlSections 列舉值的其中一個,指定要包含在 NativeObjectSecurity 物件之安全性實體物件的安全性描述元 (存取規則、稽核規則、擁有者、主要群組) 的區段。

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

可提供自訂例外狀況之整合者所實作的委派。

exceptionContext
Object

包含來源或目的地例外狀況相關內容資訊的物件。

備註

保存 NativeObjectSecurity 物件時,如果傳遞至 Persist 方法的參數 includeSections 值與傳遞至用來建立該 NativeObjectSecurity 物件的建構函式的參數值 includeSections 不相同,保存 NativeObjectSecurity 物件的區段可以包含無法預測的值。 例如,如果使用 的值呼叫 includeSections 建構函式,且稍後 Persist 在該物件 AllincludeSections 上呼叫方法的值為 ,則產生的保存 NativeObjectSecurity 物件將包含其稽核規則、群組和擁有者無法預測 Access 的值。

適用於

NativeObjectSecurity(Boolean, ResourceType, String, AccessControlSections, NativeObjectSecurity+ExceptionFromErrorCode, Object)

使用指定的值,初始化 NativeObjectSecurity 類別的新執行個體。 建議傳遞至建構函式和保存方法之 includeSections 參數的值應完全相同。

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

resourceType
ResourceType

安全物件類型,新的 NativeObjectSecurity 物件與其相關聯。

name
String

新的 NativeObjectSecurity 物件與其相關聯之安全物件的名稱。

includeSections
AccessControlSections

AccessControlSections 列舉值的其中一個,指定要包含在 NativeObjectSecurity 物件之安全性實體物件的安全性描述元 (存取規則、稽核規則、擁有者、主要群組) 的區段。

exceptionFromErrorCode
NativeObjectSecurity.ExceptionFromErrorCode

可提供自訂例外狀況之整合者所實作的委派。

exceptionContext
Object

包含來源或目的地例外狀況相關內容資訊的物件。

備註

保存 NativeObjectSecurity 物件時,如果傳遞至 Persist 方法的參數 includeSections 值與傳遞至用來建立該 NativeObjectSecurity 物件的建構函式的參數值 includeSections 不相同,保存 NativeObjectSecurity 物件的區段可以包含無法預測的值。 例如,如果使用 的值呼叫 includeSections 建構函式,且稍後 Persist 在該物件 AllincludeSections 上呼叫方法的值為 ,則產生的保存 NativeObjectSecurity 物件將包含其稽核規則、群組和擁有者無法預測 Access 的值。

適用於