lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] NightOwl888 commented on issue #336: Method not found: 'System.IO.MemoryMappedFiles.MemoryMappedFile System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile
Date Tue, 22 Sep 2020 03:23:15 GMT

NightOwl888 commented on issue #336:
URL: https://github.com/apache/lucenenet/issues/336#issuecomment-696156234


   We've updated the compilation symbols so they don't depend directly on the target framework:
   
   ```c#
               if (input.memoryMappedFile == null)
               {
                   input.memoryMappedFile = MemoryMappedFile.CreateFromFile(
                       fileStream: fc, 
                       mapName: null, 
                       capacity: length, 
                       access: MemoryMappedFileAccess.Read,
   #if FEATURE_MEMORYMAPPEDFILESECURITY
                       memoryMappedFileSecurity: null,
   #endif
                       inheritability: HandleInheritability.Inheritable, 
                       leaveOpen: true); // LUCENENET: We explicitly dispose the FileStream
separately.
               }
   ```
   
   This makes the default disable the `memoryMappedFileSecurity` parameter unless the `FEATURE_MEMORYMAPPEDFILESECURITY`
compilation symbol is added. The [Directory.Build.targets](https://github.com/apache/lucenenet/blob/b2f737de07242869819054642081337812488903/Directory.Build.targets)
file maps the target framework to features for the entire solution.
   
   There really doesn't seem to be any more to do here, so I am closing this issue.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message