Exemplo n.º 1
0
        public void Put(string remotename, Stream stream)
        {
            var uploadError = random.NextDouble() > 0.9;

            using (var f = new Library.Utility.ProgressReportingStream(stream, stream.Length, x => { if (uploadError && stream.Position > stream.Length / 2)
                                                                                                     {
                                                                                                         throw new Exception("Random upload failure");
                                                                                                     }
                                                                       }))
                m_backend.Put(remotename, f);
            ThrowErrorRandom();
        }
Exemplo n.º 2
0
 public void Put(string remotename, Stream stream)
 {
     m_backend.Put(remotename, stream);
 }