IsolatedStorageFilePermission 類別

定義

警告

Code Access Security is not supported or honored by the runtime.

指定私人虛擬檔案系統的容許使用方式。 此類別無法獲得繼承。

public ref class IsolatedStorageFilePermission sealed : System::Security::Permissions::IsolatedStoragePermission
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
[System.Serializable]
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
[<System.Serializable>]
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
Public NotInheritable Class IsolatedStorageFilePermission
Inherits IsolatedStoragePermission
繼承
IsolatedStorageFilePermission
屬性

備註

警告

程式代碼存取安全性 (CAS) 在所有版本的 .NET Framework 和 .NET 中已被取代。 使用 CAS 相關 API 時,最新版本的 .NET 不會接受 CAS 批注,併產生錯誤。 開發人員應尋求替代方案來完成安全性工作。

Common Language Runtime (CLR) 使用此類別來控制隔離記憶體的存取。

隔離儲存區會建立唯一的儲存區域,以供應用程式或元件使用。 它提供真正的隔離,讓應用程式的身分識別唯一決定虛擬檔案系統的根目錄,只有該應用程式可以存取。 因此,每個應用程式都有自己的檔案區域自動指派給它。 此檔案區域與其他應用程式完全隔離,使其成為該應用程式的私人區域。

注意

如果您使用 AssertPermitOnlyDeny 來新增堆疊修飾詞來使用或配額,則沒有任何作用。 使用量和配額取決於辨識項,且堆疊逐步解說不會針對需求執行,因此上述作業無效。

建構函式

IsolatedStorageFilePermission(PermissionState)
已淘汰.

依照指定使用完全限制或無限制的權限,初始化 IsolatedStorageFilePermission 類別的新執行個體。

屬性

UsageAllowed
已淘汰.

取得或設定允許的隔離儲存區 (Isolated Storage) 內含項目的類型。

(繼承來源 IsolatedStoragePermission)
UserQuota
已淘汰.

取得或設定每位使用者之總儲存空間的整體大小配額。

(繼承來源 IsolatedStoragePermission)

方法

Assert()
已淘汰.

宣告即使堆疊中較高層的呼叫端未獲得資源存取權限,呼叫程式碼仍可透過呼叫這個方法的程式碼要求權限,來存取受保護的資源。 使用 Assert() 會造成安全性問題。

(繼承來源 CodeAccessPermission)
Copy()
已淘汰.

建立並傳回目前權限的相同複本。

Demand()
已淘汰.

如果在呼叫堆疊中較高的所有呼叫端都尚未被授與由目前執行個體所指定之權限,則會在執行階段強制執行 SecurityException

(繼承來源 CodeAccessPermission)
Deny()
已淘汰.
已淘汰.

防止呼叫堆疊中較高的呼叫端,使用程式碼呼叫此方法來存取目前執行個體所指定的資源。

(繼承來源 CodeAccessPermission)
Equals(Object)
已淘汰.

判斷指定的 CodeAccessPermission 物件是否等於目前的 CodeAccessPermission

(繼承來源 CodeAccessPermission)
FromXml(SecurityElement)
已淘汰.

透過 XML 編碼,重新建構具有指定狀態的權限。

(繼承來源 IsolatedStoragePermission)
GetHashCode()
已淘汰.

取得 CodeAccessPermission 物件的雜湊碼,其適合用於雜湊表這類的雜湊演算法和資料結構。

(繼承來源 CodeAccessPermission)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
Intersect(IPermission)
已淘汰.

建立並傳回目前權限與指定權限交集的權限。

IsSubsetOf(IPermission)
已淘汰.

判斷目前權限是否為指定權限的子集。

IsUnrestricted()
已淘汰.

傳回值,指出目前的權限是否不受限制。

(繼承來源 IsolatedStoragePermission)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
PermitOnly()
已淘汰.

防止呼叫堆疊中較高的呼叫端,使用程式碼呼叫此方法來存取目前執行個體所指定之資源以外的所有資源。

(繼承來源 CodeAccessPermission)
ToString()
已淘汰.

建立並傳回目前權限物件的字串表示。

(繼承來源 CodeAccessPermission)
ToXml()
已淘汰.

建立權限和其目前狀態的 XML 編碼方式。

ToXml()
已淘汰.

建立權限和其目前狀態的 XML 編碼方式。

(繼承來源 IsolatedStoragePermission)
Union(IPermission)
已淘汰.

建立目前權限與指定權限聯集的權限。

適用於

另請參閱