private void CheckConnectOperationsServer()
{
// we're not checking whether already connected; this allows us to throw IOException
// "pipe is being closed" if other side is closing (as does win32) or no-op if
// already connected
if (State == PipeState.Closed)
{
throw Error.GetPipeNotOpen();
}
if (InternalHandle != null && InternalHandle.IsClosed) // only check IsClosed if we have a handle
{
throw Error.GetPipeNotOpen();
}
if (State == PipeState.Broken)
{
throw new IOException(SR.IO_PipeBroken);
}
}