/// <summary> /// Creates a <see cref="DiskMedium"/> that is entirely based in memory. /// </summary> /// <param name="pool">the <see cref="MemoryPool"/> to allocate data from</param> /// <param name="fileStructureBlockSize">the block size of the file structure. Usually 4kb.</param> /// <param name="flags">Flags to write to the file</param> /// <returns></returns> public static DiskMedium CreateMemoryFile(MemoryPool pool, int fileStructureBlockSize, params Guid[] flags) { FileHeaderBlock header = FileHeaderBlock.CreateNew(fileStructureBlockSize, flags); MemoryPoolFile disk = new MemoryPoolFile(pool); return(new DiskMedium(disk, header)); }
/// <summary> /// Creates a new <see cref="IoSession"/> /// </summary> /// <param name="file">the base file</param> public IoSession(MemoryPoolFile file) { m_file = file; }
/// <summary> /// Creates a <see cref="DiskMedium"/> that is entirely based in memory. /// </summary> /// <param name="pool">the <see cref="MemoryPool"/> to allocate data from</param> /// <param name="fileStructureBlockSize">the block size of the file structure. Usually 4kb.</param> /// <param name="flags">Flags to write to the file</param> /// <returns></returns> public static DiskMedium CreateMemoryFile(MemoryPool pool, int fileStructureBlockSize, params Guid[] flags) { FileHeaderBlock header = FileHeaderBlock.CreateNew(fileStructureBlockSize, flags); MemoryPoolFile disk = new MemoryPoolFile(pool); return new DiskMedium(disk, header); }
/// <summary> /// Creates a new <see cref="IoSession"/> /// </summary> /// <param name="file">the base file</param> public IoSession(MemoryPoolFile file) { m_file = file; }