コード例 #1
0
ファイル: MetadataShadowCopy.cs プロジェクト: sperling/cskarp
        // keep this internal so that users can't delete files that the provider manages
        internal void DisposeFileHandles()
        {
            primaryModule.DisposeFileStream();

            if (documentationFile != null)
            {
                documentationFile.DisposeFileStream();
            }
        }
コード例 #2
0
 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();
     }
 }