Example #1
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (mStream != null)
     {
         mStream.Dispose();
     }
     mStream = null;
 }
Example #2
0
 public SambaOutputStream(SmbFile smbFile)
 {
     if (smbFile == null)
     {
         throw new ArgumentNullException("smbFile");
     }
     mFile = smbFile;
     try
     {
         mStream = new SmbFileOutputStream(smbFile);
     }
     catch (SmbException ex)
     {
         throw new System.IO.IOException(ex.Message, ex);
     }
 }
Example #3
0
 /// <exception cref="System.IO.IOException"></exception>
 protected internal override void DoSendFragment(byte[] buf, int off, int length, bool isDirect)
 {
     if (Out != null && Out.IsOpen() == false)
     {
         throw new IOException("DCERPC pipe is no longer open");
     }
     if (In == null)
     {
         In = (SmbFileInputStream)Pipe.GetNamedPipeInputStream();
     }
     if (Out == null)
     {
         Out = (SmbFileOutputStream)Pipe.GetNamedPipeOutputStream();
     }
     if (isDirect)
     {
         Out.WriteDirect(buf, off, length, 1);
         return;
     }
     Out.Write(buf, off, length);
 }