呼び出し元のコードのアセンブリ ID に対応する分離ストレージを取得します。
Public Shared Function GetUserStoreForAssembly() As _
IsolatedStorageFile
[C#]
public static IsolatedStorageFile GetUserStoreForAssembly();
[C++]
public: static IsolatedStorageFile* GetUserStoreForAssembly();
[JScript]
public static function GetUserStoreForAssembly() :
IsolatedStorageFile;
戻り値
呼び出し元のコードのアセンブリ ID に基づく分離ストレージ スコープに対応する IsolatedStorageFile 。
例外
例外の種類 | 条件 |
---|---|
SecurityException | 分離ストレージに対して必要なアクセス許可が与えられていません。 |
解説
異なるアプリケーション内でも、同じアセンブリの場合は、このメソッドを使用するときに、同じ分離ストアを必ず使用します。
GetUserStoreForAssembly は、機能的には次のコードと同じです。
GetStore(IsolatedStorageScope.Assembly Or IsolatedStorageScope.User, Nothing, Nothing)
[C#]
GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, null);
メモ 同じアプリケーション ドメイン内で実行されている異なるアセンブリは、必ず個別の分離ストアを保有します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- IsolatedStorageFilePermission (分離ストレージを使用するために必要なアクセス許可) AdministerIsolatedStorageByUser (関連する列挙体)
- ReflectionPermission (Type.InvokeMember などの機構を通じて遅延バインディングで呼び出すときに必要なアクセス許可) ReflectionPermissionFlag.MemberAccess (関連する列挙体)
参照
IsolatedStorageFile クラス | IsolatedStorageFile メンバ | System.IO.IsolatedStorage 名前空間