// keep this internal so that users can't delete files that the provider manages internal void DisposeFileHandles() { primaryModule.DisposeFileStream(); if (documentationFile != null) { documentationFile.DisposeFileStream(); } }
private static ModuleMetadata CreateModuleMetadata(ShadowCopy copy) { try { return(new ModuleMetadata(copy.FullPath, copy.Stream.SafeFileHandle)); } finally { // close the file handle, it's now memory mapped and locked: copy.DisposeFileStream(); } }