public sealed class IsolatedStorageFile : IsolatedStorage, IDisposable
|
| AssemblyIdentity (inherited from System.IO.IsolatedStorage.IsolatedStorage) |
Read-only See base class member description: System.IO.IsolatedStorage.IsolatedStorage.AssemblyIdentity Gets an assembly identity used to scope isolated storage. |
| CurrentSize | Read-only Overridden: Gets the current size of the isolated storage. |
| DomainIdentity (inherited from System.IO.IsolatedStorage.IsolatedStorage) |
Read-only See base class member description: System.IO.IsolatedStorage.IsolatedStorage.DomainIdentity Gets a domain identity that scopes isolated storage. |
| MaximumSize | Read-only Overridden: Gets a value representing the maximum amount of space available for isolated storage within the limits established by the quota. |
| Scope (inherited from System.IO.IsolatedStorage.IsolatedStorage) |
Read-only See base class member description: System.IO.IsolatedStorage.IsolatedStorage.Scope Gets an IsolatedStorageScope enumeration value specifying the scope used to isolate the store. |
| Close | Closes a store previously opened with IsolatedStorageFile.GetStore, IsolatedStorageFile.GetUserStoreForAssembly, or IsolatedStorageFile.GetUserStoreForDomain. |
| CreateDirectory | Creates a directory in the isolated storage scope. |
| CreateObjRef (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. |
| DeleteDirectory | Deletes a directory in the isolated storage scope. |
| DeleteFile | Deletes a file in the isolated storage scope. |
| Dispose | Closes a store previously opened with IsolatedStorageFile.GetStore, IsolatedStorageFile.GetUserStoreForAssembly, or IsolatedStorageFile.GetUserStoreForDomain. |
| Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
| GetDirectoryNames | Enumerates directories in an isolated storage scope that match a given pattern. |
| GetEnumerator | Gets the enumerator for the IsolatedStorageFile stores within an isolated storage scope. |
| GetFileNames | Enumerates files in isolated storage scope that match a given pattern. |
| GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
| GetLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. |
| GetStore | Overloaded:GetStore(IsolatedStorageScope scope, object domainIdentity, object assemblyIdentity) Obtains the isolated storage corresponding to the given application domain and assembly evidence objects. |
| GetStore | Overloaded:GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) Obtains isolated storage corresponding to the isolated storage scope given the application domain and assembly evidence types. |
| GetStore | Overloaded:GetStore(IsolatedStorageScope scope, Evidence domainEvidence, Type domainEvidenceType, Evidence assemblyEvidence, Type assemblyEvidenceType) Obtains isolated storage corresponding to the given application domain and the assembly evidence objects and types. |
| GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
| GetUserStoreForAssembly | Obtains isolated storage corresponding to the calling code's assembly identity. |
| GetUserStoreForDomain | Obtains isolated storage corresponding to the application domain identity and assembly identity. |
| InitializeLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. |
| Remove | Overloaded:Remove()Overridden: Removes the isolated storage scope and all its contents. |
| Remove | Overloaded:Remove(IsolatedStorageScope scope) Removes the specified isolated storage scope for all identities. |
| ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
| SeparatorExternal (inherited from System.IO.IsolatedStorage.IsolatedStorage) |
Read-only See base class member description: System.IO.IsolatedStorage.IsolatedStorage.SeparatorExternal Gets a backslash character that can be used in a directory string. When overridden in a derived class, another character might be returned. |
| SeparatorInternal (inherited from System.IO.IsolatedStorage.IsolatedStorage) |
Read-only See base class member description: System.IO.IsolatedStorage.IsolatedStorage.SeparatorInternal Gets a period character that can be used in a directory string. When overridden in a derived class, another character might be returned. |
| Finalize | Overridden: Closes an isolated store. This method will run even if an exception is thrown or the program crashes. |
| GetPermission | Overridden: Returns the IsolatedStoragePermission from within a given permission set that represents access to isolated storage. |
| InitStore (inherited from System.IO.IsolatedStorage.IsolatedStorage) |
See base class member description: System.IO.IsolatedStorage.IsolatedStorage.InitStore Initializes a new instance of the IsolatedStorage object. |
| MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public object AssemblyIdentity {get;}
|
| Exception Type | Condition |
|---|---|
| SecurityException | The code lacks the required SecurityPermission to access this object. |
[CLSCompliant(false)] |
| Exception Type | Condition |
|---|---|
| InvalidOperationException | The property is unavailable. The current store has a roaming scope or is not open. |
The current size cannot be accurately determined for stores that are participating in a roaming user profile. Because roaming profiles are often cached on multiple client machines and later synchronized with a server, quotas cannot be enforced for such stores and the current size is not reported.
The the conceptual topic at MSDN: anticipatingoutofspaceconditions example demonstrates the use of the CurrentSize property.
public object DomainIdentity {get;}
|
| Exception Type | Condition |
|---|---|
| SecurityException | The code lacks the required SecurityPermission to access this object. These permissions are granted by the runtime based on security policy. |
| InvalidOperationException | The IsolatedStorage is not isolated by the domain IsolatedStorageScope. |
[CLSCompliant(false)] |
| Exception Type | Condition |
|---|---|
| InvalidOperationException | The property is unavailable. IsolatedStorageFile.MaximumSize cannot be determined without evidence from the assembly's creation. The evidence could not be determined when the object was created. |
The the conceptual topic at MSDN: anticipatingoutofspaceconditions example demonstrates the use of the MaximumSize property.
public IsolatedStorageScope Scope {get;}
|
protected virtual char SeparatorExternal {get;}
|
protected virtual char SeparatorInternal {get;}
|
public void Close(); |
public void CreateDirectory( |
dir
| Exception Type | Condition |
|---|---|
| IsolatedStorageException | The current code has insufficient permissions to create isolated storage directory. |
| ArgumentNullException | The directory path is null. |
requestedType
| Exception Type | Condition |
|---|---|
| RemotingException | This instance is not a valid remoting object. |
public void DeleteDirectory( |
dir
| Exception Type | Condition |
|---|---|
| IsolatedStorageException | The directory could not be deleted. |
| ArgumentNullException | The directory path was null. |
The the conceptual topic at MSDN: deletingfilesdirectories example demonstrates the use of the DeleteDirectory method.
public void DeleteFile( |
file
| Exception Type | Condition |
|---|---|
| IsolatedStorageException | The target file is open or the path is incorrect. |
| ArgumentNullException | The file path is null. |
The the conceptual topic at MSDN: deletingfilesdirectories example demonstrates the use of the DeleteFile method.
public void Dispose(); |
~IsolatedStorageFile(); |
searchPattern
| Exception Type | Condition |
|---|---|
| ArgumentNullException | The searchPattern was null. |
For complete description of search string criteria, see the Directory class.
For information on getting file names, see the IsolatedStorageFile.GetFileNames method.
The the conceptual topic at MSDN: findingexistingfilesdirectories example demonstrates the use of the GetDirectoryNames method.
public static IEnumerator GetEnumerator( |
scope
searchPattern
| Exception Type | Condition |
|---|---|
| ArgumentNullException | The searchPattern was null. |
For information about how to find directory names, see the IsolatedStorageFile.GetDirectoryNames method.
The the conceptual topic at MSDN: findingexistingfilesdirectories example demonstrates the use of the GetFileNames method.
public virtual int GetHashCode(); |
public object GetLifetimeService(); |
protected override IsolatedStoragePermission GetPermission( |
ps
public static IsolatedStorageFile GetStore( |
scope
domainIdentity
assemblyIdentity
| Exception Type | Condition |
|---|---|
| SecurityException | Sufficient isolated storage permissions have not been granted. |
| ArgumentNullException | Neither the domainIdentity nor assemblyIdentity have been passed in. This verifies that the correct constructor is being used. |
For example, to open a store for your assembly that is capable of roaming and is the same across applications, you can use the following code:
IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Assembly | IsolatedStorageScope.Roaming;
IsolatedStorageFile store = IsolatedStorageFile.GetStore(scope, null, null);
Alternatively, to open a store that is capable of roaming and is unique to an application for the same assembly, you can use the following code:
IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain | IsolatedStorageScope.Roaming;
IsolatedStorageFile store = IsolatedStorageFile.GetStore(scope, null, null);
public static IsolatedStorageFile GetStore( |
scope
domainEvidenceType
assemblyEvidenceType
| Exception Type | Condition |
|---|---|
| SecurityException | Sufficient isolated storage permissions have not been granted. |
public static IsolatedStorageFile GetStore( |
scope
domainEvidence
domainEvidenceType
assemblyEvidence
assemblyEvidenceType
| Exception Type | Condition |
|---|---|
| SecurityException | Sufficient isolated storage permissions have not been granted. |
| ArgumentNullException | The domainEvidence or assemblyEvidence identity has not been passed in. |
public Type GetType(); |
public static IsolatedStorageFile GetUserStoreForAssembly(); |
| Exception Type | Condition |
|---|---|
| SecurityException | Sufficient isolated storage permissions have not been granted. |
GetUserStoreForAssembly is functionally equivalent to :
GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, null);
public static IsolatedStorageFile GetUserStoreForDomain(); |
| Exception Type | Condition |
|---|---|
| SecurityException | Sufficient isolated storage permissions have not been granted. |
| IsolatedStorageException | The store failed to open. |
GetUserStoreForDomain is functionally equivalent to:
GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain | IsolatedStorageScope.User, null, null);
Different assemblies running within the same application domain always have distinct isolated stores.
public virtual object InitializeLifetimeService(); |
public class MyClass : MarshalByRefObject
{
public override Object InitializeLifetimeService()
{
ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
{
lease.InitialLeaseTime = TimeSpan.FromMinutes(1);
lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
}
return lease;
}
}
protected void InitStore( |
scope
domainEvidenceType
assemblyEvidenceType
| Exception Type | Condition |
|---|---|
| IsolatedStorageException | The assembly specified has insufficient permissions to create isolated stores. |
-or-
IsolatedStorageContainment.AssemblyIsolationByUser
-or-
IsolatedStorageContainment.DomainIsolationByRoamingUser
-or-
protected object MemberwiseClone(); |
public override void Remove(); |
| Exception Type | Condition |
|---|---|
| IsolatedStorageException | The isolated store cannot be deleted. |
public static void Remove( |
scope
| Exception Type | Condition |
|---|---|
| IsolatedStorageException | The isolated store cannot be removed. |
public virtual string ToString(); |