protected override void Dispose(bool disposing) { base.Dispose(disposing); if (mStream != null) { mStream.Dispose(); } mStream = null; }
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); } }
/// <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); }