public MemoryMappedFile(ChunkDescriptor ChunkDescriptor, MemoryMappedFileRepository Repo, string Path, Stream Stream) : base(ChunkDescriptor) { if (ChunkDescriptor == null) { throw new ArgumentNullException("ChunkDescriptor"); } if (Path == null) { throw new ArgumentNullException("Path"); } if (Repo == null) { throw new ArgumentNullException("Repo"); } repo = Repo; path = Path; Stream OStream = System.IO.File.OpenWrite(path); long Count = ((Stream.Length - 1) >> 20) + 1; for (long n = 0; n != Count; n++) { byte[] Bytes = new byte[1 << 20]; Stream.Read(Bytes, 0, 1 << 20); OStream.Write(Bytes, 0, 1 << 20); } Init(); }
public MemoryMappedFile(ChunkDescriptor ChunkDescriptor, MemoryMappedFileRepository Repo, string Path) : base(ChunkDescriptor) { if (ChunkDescriptor == null) throw new ArgumentNullException ("ChunkDescriptor"); if (Repo == null) throw new ArgumentNullException ("Repo"); if (Path == null) throw new ArgumentNullException ("Path"); repo = Repo; path = Path; }
public MemoryMappedFile(ChunkDescriptor ChunkDescriptor, MemoryMappedFileRepository Repo, string Path, byte[] Data) : base(ChunkDescriptor) { if (ChunkDescriptor == null) throw new ArgumentNullException ("ChunkDescriptor"); if (Data == null) throw new ArgumentNullException ("Data"); if (Path == null) throw new ArgumentNullException ("Path"); if (Repo == null) throw new ArgumentNullException ("Repo"); repo = Repo; path = Path; System.IO.File.WriteAllBytes (Path, Data); Init (); }
public MemoryMappedFile(ChunkDescriptor ChunkDescriptor, MemoryMappedFileRepository Repo, string Path) : base(ChunkDescriptor) { if (ChunkDescriptor == null) { throw new ArgumentNullException("ChunkDescriptor"); } if (Repo == null) { throw new ArgumentNullException("Repo"); } if (Path == null) { throw new ArgumentNullException("Path"); } repo = Repo; path = Path; }
public MemoryMappedFile(ChunkDescriptor ChunkDescriptor, MemoryMappedFileRepository Repo, string Path, Stream Stream) : base(ChunkDescriptor) { if (ChunkDescriptor == null) throw new ArgumentNullException ("ChunkDescriptor"); if (Path == null) throw new ArgumentNullException ("Path"); if (Repo == null) throw new ArgumentNullException ("Repo"); repo = Repo; path = Path; Stream OStream = System.IO.File.OpenWrite (path); long Count = ((Stream.Length - 1) >> 20) + 1; for (long n = 0; n != Count; n++) { byte[] Bytes = new byte[1 << 20]; Stream.Read (Bytes, 0, 1 << 20); OStream.Write (Bytes, 0, 1 << 20); } Init (); }
public MemoryMappedFile(ChunkDescriptor ChunkDescriptor, MemoryMappedFileRepository Repo, string Path, byte[] Data) : base(ChunkDescriptor) { if (ChunkDescriptor == null) { throw new ArgumentNullException("ChunkDescriptor"); } if (Data == null) { throw new ArgumentNullException("Data"); } if (Path == null) { throw new ArgumentNullException("Path"); } if (Repo == null) { throw new ArgumentNullException("Repo"); } repo = Repo; path = Path; System.IO.File.WriteAllBytes(Path, Data); Init(); }