Beispiel #1
0
        /// <summary>
        /// Bind a memory-mapped file to a MappedFile instance.
        /// </summary>
        /// <param name="memoryMappedFile"></param>
        /// <param name="memoryMappedFileMode"></param>
        /// <returns></returns>
        public static AType Read(MemoryMappedFile memoryMappedFile, MemoryMappedFileMode memoryMappedFileMode)
        {
            MappedFile mappedFile = new MappedFile(memoryMappedFile, memoryMappedFileMode);

            return(mappedFile.Rank > 0 ?
                   MMAArray.Create(mappedFile) :
                   mappedFile.Reader(MappedFileInfo.HeaderSize));
        }
Beispiel #2
0
 public static AType Create(MappedFile mappedFile)
 {
     return(MMAArray.Create(mappedFile));
 }