public void Test1() { using (var memoryMappedFile = MemoryMappedFile.CreateOrOpen("test", 1024 * 1024)) using (var endlessStream = new EndlessStream(memoryMappedFile)) { for (int i = 0; i < 1000; ++i) { endlessStream.AppendBlock(new byte[32]); } } }
static void Main(string[] args) { using (var memoryMappedFile = MemoryMappedFile.CreateOrOpen("test", 1024 * 1024)) { var endlessStream = new EndlessStream(memoryMappedFile); for (int i = 0; i < 1000; ++i) { endlessStream.AppendBlock(new byte[32]); } } }