/// <summary> /// Returns the IsolatedStorageFile scoped to Assembly, Domain and User /// </summary> /// <remarks>Callers must lock on IsoStoreSyncRoot before calling this for thread-safety. /// For example: /// /// lock (IsoStoreSyncRoot) /// { /// // do something with the returned IsolatedStorageFile /// PackagingUtilities.DefaultIsolatedStorageFile.DeleteFile(_isolatedStorageStreamFileName); /// } /// ///</remarks> private static ReliableIsolatedStorageFileFolder GetDefaultIsolatedStorageFile() { // Cache and re-use the same object for multiple requests - resurrect if disposed if (_defaultFile == null || _defaultFile.IsDisposed()) { _defaultFile = new ReliableIsolatedStorageFileFolder(); } return(_defaultFile); }
//------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ internal SafeIsolatedStorageFileStream( string path, FileMode mode, FileAccess access, FileShare share, ReliableIsolatedStorageFileFolder folder) : base(path, mode, access, share, folder.IsoFile) { if (path == null) { throw new ArgumentNullException("path"); } _path = path; _folder = folder; _folder.AddRef(); }
//------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ internal SafeIsolatedStorageFileStream( string path, FileMode mode, FileAccess access, FileShare share, ReliableIsolatedStorageFileFolder folder) : base(path, mode, access, share, folder.IsoFile) { if (path == null) throw new ArgumentNullException("path"); _path = path; _folder = folder; _folder.AddRef(); }
/// <summary> /// Returns the IsolatedStorageFile scoped to Assembly, Domain and User /// </summary> /// <remarks>Callers must lock on IsoStoreSyncRoot before calling this for thread-safety. /// For example: /// /// lock (IsoStoreSyncRoot) /// { /// // do something with the returned IsolatedStorageFile /// PackagingUtilities.DefaultIsolatedStorageFile.DeleteFile(_isolatedStorageStreamFileName); /// } /// ///</remarks> private static ReliableIsolatedStorageFileFolder GetDefaultIsolatedStorageFile() { // Cache and re-use the same object for multiple requests - resurrect if disposed if (_defaultFile == null || _defaultFile.IsDisposed()) { _defaultFile = new ReliableIsolatedStorageFileFolder(); } return _defaultFile; }