public static void ServerUnsupportedOperationThrows() { using (AnonymousPipeServerStream server = new AnonymousPipeServerStream(PipeDirection.Out)) { Assert.Throws<NotSupportedException>(() => server.Length); Assert.Throws<NotSupportedException>(() => server.SetLength(10L)); Assert.Throws<NotSupportedException>(() => server.Position); Assert.Throws<NotSupportedException>(() => server.Position = 10L); Assert.Throws<NotSupportedException>(() => server.Seek(10L, System.IO.SeekOrigin.Begin)); } }