if (!IsConnected)
throw new InvalidOperationException ("Pipe is not connected");
if (stream == null)
- stream = new FileStream (handle.DangerousGetHandle (), CanRead ? (CanWrite ? FileAccess.ReadWrite : FileAccess.Read) : FileAccess.Write, true, buffer_size, IsAsync);
+ stream = new FileStream (handle.DangerousGetHandle (),
+ CanRead ? (CanWrite ? FileAccess.ReadWrite : FileAccess.Read)
+ : FileAccess.Write, true, buffer_size, IsAsync);
return stream;
}
set { stream = value; }
protected internal void CheckWriteOperations ()
{
if (!IsConnected)
- throw new InvalidOperationException ("Pipe us not connected");
+ throw new InvalidOperationException ("Pipe is not connected");
if (!CanWrite)
throw new NotSupportedException ("The pipe stream does not support write operations");
}
throw new NotSupportedException ();
}
- [MonoNotSupported ("ACL is not supported in Mono")]
public PipeSecurity GetAccessControl ()
{
- throw ThrowACLException ();
+ return new PipeSecurity (SafePipeHandle,
+ AccessControlSections.Owner |
+ AccessControlSections.Group |
+ AccessControlSections.Access);
}
- [MonoNotSupported ("ACL is not supported in Mono")]
public void SetAccessControl (PipeSecurity pipeSecurity)
{
- throw ThrowACLException ();
+ if (pipeSecurity == null)
+ throw new ArgumentNullException ("pipeSecurity");
+
+ pipeSecurity.Persist (SafePipeHandle);
}
// pipe I/O