IsolatedStorageFile.GetStore Method (IsolatedStorageScope, Type, Type)
Obtains isolated storage corresponding to the isolated storage scope given the application domain and assembly evidence types.
Assembly: mscorlib (in mscorlib.dll)
public static IsolatedStorageFile GetStore( IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType )
A bitwise combination of the enumeration values.
- Type: System.Type
Return ValueType: System.IO.IsolatedStorage.IsolatedStorageFile
An object that represents the parameters.
Sufficient isolated storage permissions have not been granted.
The scope is invalid.
The evidence type provided is missing in the assembly evidence list.
An isolated storage location cannot be initialized.
scope contains the value Domain, but the permissions for the application domain cannot be determined.
scope contains Assembly, but the permissions for the calling assembly cannot be determined.
This is the overload ofmost likely to be called from application code.
This overload ofopens an isolated store for the evidence types that are passed in.
If the scope parameter is Domain and the application domain in which the assembly is installed does not have IsolatedStorageFilePermission, the method will return an IsolatedStorageFile object without a quota. Later attempts to create an IsolatedStorageFile object using the IsolatedStorageFile object that does not have a quota will fail with an IsolatedStorageException.
The following code example demonstrates the IsolatedStorageFile overview.method. For the complete context of this example, see the
// 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);
Available since 1.1