IsolatedStorageScope 列挙型

定義

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

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

public enum class IsolatedStorageScope
[System.Flags]
public enum IsolatedStorageScope
[System.Flags]
[System.Serializable]
public enum IsolatedStorageScope
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum IsolatedStorageScope
[<System.Flags>]
type IsolatedStorageScope = 
[<System.Flags>]
[<System.Serializable>]
type IsolatedStorageScope = 
[<System.Flags>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type IsolatedStorageScope = 
Public Enum IsolatedStorageScope
継承
IsolatedStorageScope
属性

フィールド

Application 32

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

Assembly 4

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

Domain 2

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

Machine 16

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

None 0

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

Roaming 8

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

User 1

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

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

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile^ isoFile = IsolatedStorageFile::GetStore( static_cast<IsolatedStorageScope>(IsolatedStorageScope::User | IsolatedStorageScope::Assembly | IsolatedStorageScope::Domain), (Type^)nullptr, nullptr );
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::Open,FileAccess::ReadWrite,isoFile );

// 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);
' Retrieve an IsolatedStorageFile for the current Domain and Assembly.
Dim isoFile As IsolatedStorageFile = _
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User _
    Or IsolatedStorageScope.Assembly _
    Or IsolatedStorageScope.Domain, Nothing, Nothing)

Dim isoStream As New IsolatedStorageFileStream("substituteUsername", System.IO.FileMode.Open, _
    System.IO.FileAccess.Read, System.IO.FileShare.Read)

注釈

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

適用対象

こちらもご覧ください