IsolatedStorageScope Enum

Definition

Räknar upp de nivåer av isolerat lagringsomfång som stöds av IsolatedStorage.

Den här uppräkningen stöder en bitvis kombination av dess medlemsvärden.

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
Arv
IsolatedStorageScope
Attribut

Fält

Name Värde Description
None 0

Ingen isolerad lagringsanvändning.

User 1

Isolerad lagring som begränsas av användaridentitet.

Domain 2

Isolerad lagring som är begränsad till programdomänidentiteten.

Assembly 4

Isolerad lagring som är begränsad till sammansättningens identitet.

Roaming 8

Det isolerade arkivet kan placeras på en plats i filsystemet som kan ströva omkring (om centrala användardata är aktiverade i det underliggande operativsystemet).

Machine 16

Isolerad lagring som är begränsad till datorn.

Application 32

Isolerad lagring som är begränsad till programmet.

Exempel

I följande kodexempel visas hur IsolatedStorageScope uppräkningen används i GetStore metoderna.


// 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)

Kommentarer

Använd IsolatedStorageScope för att ange en viss omfattning för ett isolerat arkiv. Du kan ange kombinationer av dessa nivåer som stöds av IsolatedStorage.

Gäller för

Se även