IsolatedStorageFile::GetStore Method (IsolatedStorageScope, Evidence^, Type^, Evidence^, Type^)

 

Obtains isolated storage corresponding to the given application domain and the assembly evidence objects and types.

Namespace:   System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public:
static IsolatedStorageFile^ GetStore(
	IsolatedStorageScope scope,
	Evidence^ domainEvidence,
	Type^ domainEvidenceType,
	Evidence^ assemblyEvidence,
	Type^ assemblyEvidenceType
)

Parameters

scope
Type: System.IO.IsolatedStorage::IsolatedStorageScope

A bitwise combination of the enumeration values.

domainEvidence
Type: System.Security.Policy::Evidence^

An object that contains the application domain identity.

domainEvidenceType
Type: System::Type^

The identity type to choose from the application domain evidence.

assemblyEvidence
Type: System.Security.Policy::Evidence^

An object that contains the code assembly identity.

assemblyEvidenceType
Type: System::Type^

The identity type to choose from the application code assembly evidence.

Return Value

Type: System.IO.IsolatedStorage::IsolatedStorageFile^

An object that represents the parameters.

Exception Condition
SecurityException

Sufficient isolated storage permissions have not been granted.

ArgumentNullException

The domainEvidence or assemblyEvidence identity has not been passed in.

ArgumentException

The scope is invalid.

IsolatedStorageException

An isolated storage location cannot be initialized.

-or-

scope contains the enumeration value Application, but the application identity of the caller cannot be determined, because the ActivationContext for the current application domain returned null.

-or-

scope contains the value Domain, but the permissions for the application domain cannot be determined.

-or-

scope contains the value Assembly, but the permissions for the calling assembly cannot be determined.

System_CAPS_noteNote

If the scope parameter is Domain and the application domain in which the assembly is installed does not have IsolatedStorageFilePermission, the GetStore 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 obtains storage based on publisher evidence.

No code example is currently available or this language may not be supported.

IsolatedStorageFilePermission

for using isolated storage. Associated enumeration: AdministerIsolatedStorageByUser

ReflectionPermission

when invoked late-bound through mechanisms such as Type::InvokeMember. Associated enumeration: ReflectionPermissionFlag::MemberAccess

.NET Framework
Available since 1.1
Return to top
Show: