英語で読む

次の方法で共有


IsolatedStorageScope 列挙型

定義

IsolatedStorage がサポートしている分離ストレージ スコープのレベルを列挙します。

この列挙体は、メンバー値のビットごとの組み合わせをサポートしています。

C#
[System.Flags]
public enum IsolatedStorageScope
C#
[System.Flags]
[System.Serializable]
public enum IsolatedStorageScope
C#
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum IsolatedStorageScope
継承
IsolatedStorageScope
属性

フィールド

名前 説明
Application 32

アプリケーションにスコープが指定されている分離ストレージ。

Assembly 4

アセンブリの ID によってスコープが指定されている分離ストレージ。

Domain 2

アプリケーション ドメイン ID によってスコープが指定されている分離ストレージ。

Machine 16

コンピューターにスコープが指定されている分離ストレージ。

None 0

分離ストレージを使用しない。

Roaming 8

ローミング ユーザー データが、基になるオペレーティング システムで有効になっている場合、分離ストアは、移動先のファイル システム上に配置できます。

User 1

ユーザー ID によってスコープが指定されている分離ストレージ。

次のコード例では、 メソッドで列挙を使用する方法 IsolatedStorageScopeGetStore 示します。

C#

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
    IsolatedStorageScope.Assembly |
    IsolatedStorageScope.Domain,
    null,
    null);

IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream("substituteUsername",
    System.IO.FileMode.Open,
    System.IO.FileAccess.Read,
     System.IO.FileShare.Read);

注釈

分離ストアのスコープの程度を指定するには、 を使用 IsolatedStorageScope します。 で IsolatedStorageサポートされているこれらのレベルの組み合わせを指定できます。

適用対象

製品 バージョン
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

こちらもご覧ください