示例#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);
        }
示例#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);
        }
示例#3
0
 public DataTransfer(StorageHandle storage, IChunkWriter target)
 {
     this.storage = storage;
     this.target  = target;
 }
示例#4
0
 public DataTransfer(StorageHandle storage, Stream target) : this(storage, new StreamChunkWriter(target))
 {
 }