/// <summary>
 ///
 /// </summary>
 public void Dispose()
 {
     if (_blockWriter != null)
     {
         _blockWriter.Dispose();
         _blockWriter = null;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 
 /// </summary>
 public void Dispose()
 {
     if(_blockWriter != null)
     {
         _blockWriter.Dispose();
         _blockWriter = null;
     }
 }
Esempio n. 3
0
        public BizTalkBlockStream(IBlockWriter blockWriter)
        {
            if (blockWriter == null)
                throw new ArgumentNullException("blockWriter");

            this.blockWriter = blockWriter;
            this.writeBuffer = new MemoryStream();
            this.deflateBuffer = new MemoryStream();
        }
Esempio n. 4
0
 public void SetUp()
 {
     _path = Path.Combine(Environment.CurrentDirectory, "FileBlockWriterTests.dat");
     if (File.Exists(_path))
     {
         File.Delete(_path);
     }
     _blockWriter = new FileBlockWriter(_path, BlockSize);
 }
 public void SetUp()
 {
     _path = Path.Combine(Environment.CurrentDirectory, "FileBlockWriterTests.dat");
     if(File.Exists(_path))
     {
         File.Delete(_path);
     }
     _blockWriter = new FileBlockWriter(_path, BlockSize);
 }
Esempio n. 6
0
        public BizTalkBlockStream(IBlockWriter blockWriter)
        {
            if (blockWriter == null)
                throw new ArgumentNullException("blockWriter");

            this.blockWriter = blockWriter;
            this.writeBuffer = new MemoryStream();
            this.deflateBuffer = new MemoryStream();
        }
 /// <summary>
 /// Create a new instance of <see cref="JournalWriter"/>
 /// </summary>
 /// <param name="bufferSize">size of the buffer, IOs will be writen to disk in blocks of this size. Must be a multiple of the disk sector size.
 /// You can use the following command to determine your disk sector size: "fsutil fsinfo ntfsinfo c:"</param>
 /// <param name="blockWriter">the <see cref="IBlockWriter"/> used to write to disk.</param>
 public JournalWriter(int bufferSize, IBlockWriter blockWriter)
 {
     _blockWriter        = blockWriter;
     _buffer             = new ByteRingBuffer(bufferSize);
     _buffer.BufferFull += OnBufferFull;
 }
Esempio n. 8
0
 public ScenarioBuilder(IApplicationHost applicationHost, IBlockWriter blockWriter)
 {
     _applicationHost = applicationHost;
     _blockWriter = blockWriter;
 }
Esempio n. 9
0
 public ContextBuilder(IApplicationHost applicationHost, IBlockWriter blockWriter)
 {
     _applicationHost = applicationHost;
     _blockWriter = blockWriter;
 }
Esempio n. 10
0
 /// <summary>
 /// Create a new instance of <see cref="JournalWriter"/>
 /// </summary>
 /// <param name="bufferSize">size of the buffer, IOs will be writen to disk in blocks of this size. Must be a multiple of the disk sector size.
 /// You can use the following command to determine your disk sector size: "fsutil fsinfo ntfsinfo c:"</param>
 /// <param name="blockWriter">the <see cref="IBlockWriter"/> used to write to disk.</param>
 public JournalWriter(int bufferSize, IBlockWriter blockWriter)
 {
     _blockWriter = blockWriter;
     _buffer = new ByteRingBuffer(bufferSize);
     _buffer.BufferFull += OnBufferFull;
 }