Debian Codegraph @

external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Read.cs

raw
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 using System.Threading;
6 using System.Threading.Tasks;
7 using Xunit;
8
9 namespace System.IO.Pipes.Tests
10 {
11 public class AnonymousPipeTest_Read_ServerIn_ClientOut : PipeTest_Read
12 {
13 protected override ServerClientPair CreateServerClientPair()
14 {
15 ServerClientPair ret = new ServerClientPair();
16 ret.readablePipe = new AnonymousPipeServerStream(PipeDirection.In);
17 ret.writeablePipe = new AnonymousPipeClientStream(PipeDirection.Out, ((AnonymousPipeServerStream)ret.readablePipe).ClientSafePipeHandle);
18 return ret;
19 }
20 }
21
22 public class AnonymousPipeTest_Read_ServerOut_ClientIn : PipeTest_Read
23 {
24 protected override ServerClientPair CreateServerClientPair()
25 {
26 ServerClientPair ret = new ServerClientPair();
27 ret.writeablePipe = new AnonymousPipeServerStream(PipeDirection.Out);
28 ret.readablePipe = new AnonymousPipeClientStream(PipeDirection.In, ((AnonymousPipeServerStream)ret.writeablePipe).ClientSafePipeHandle);
29 return ret;
30 }
31 }
32 }
33