public void Close() { if (Helper.IsRoaming(Scope)) { return; } lock (_internalLock) { if (!_closed) { _closed = true; GC.SuppressFinalize(this); } } }
private bool ContainsUnknownFiles(string directory) { string[] dirs, files; try { files = Directory.GetFiles(directory); dirs = Directory.GetDirectories(directory); } catch { throw new IsolatedStorageException(SR.IsolatedStorage_DeleteDirectories); } if (dirs.Length > 1 || (dirs.Length > 0 && !IsMatchingScopeDirectory(dirs[0]))) { // Unknown folder present return(true); } if (files.Length == 0) { return(false); } // Check if we have unknown files // Note that we don't generate these files in CoreFX, but we want to match // NetFX removal semantics as NetFX will generate these. if (Helper.IsRoaming(Scope)) { return((files.Length > 1) || !IsIdFile(files[0])); } return(files.Length > 2 || ( (!IsIdFile(files[0]) && !IsInfoFile(files[0]))) || (files.Length == 2 && !IsIdFile(files[1]) && !IsInfoFile(files[1])) ); }