Beispiel #1
0
        public static StorageHandle CreateTemporary()
        {
            var storage = new StorageHandle()
            {
                FileName      = Path.Combine(GetTempDir(), Guid.NewGuid().ToString()),
                CanWrite      = true,
                DeleteOnClose = true,
            };

            storage.Open();
            return(storage);
        }
Beispiel #2
0
        public static StorageHandle OpenSession(string fileName, SessionXml session)
        {
            var storage = new StorageHandle()
            {
                FileName             = fileName,
                LowestAllowedOffset  = session.LowestOffset,
                HighestAllowedOffset = session.HighestOffset,
                ChunkCount           = session.ChunkCount,
                LinesCountApprox     = session.LinesCountApprox,
            };

            storage.Open();
            return(storage);
        }
Beispiel #3
0
 public DataTransfer(StorageHandle storage, IChunkWriter target)
 {
     this.storage = storage;
     this.target  = target;
 }
Beispiel #4
0
 public DataTransfer(StorageHandle storage, Stream target) : this(storage, new StreamChunkWriter(target))
 {
 }