linux-packaging-mono/mcs/class/System.Core/System.IO.Pipes/AnonymousPipeServerStream.Windows.cs
Xamarin Public Jenkins (auto-signing) 0abdbe5a7d Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
2018-10-09 08:20:59 +00:00

23 lines
808 B
C#

using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace System.IO.Pipes
{
public sealed partial class AnonymousPipeServerStream
{
public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
: base (direction, bufferSize)
{
if (direction == PipeDirection.InOut) {
throw new NotSupportedException(SR.NotSupported_AnonymousPipeUnidirectional);
}
if (inheritability < HandleInheritability.None || inheritability > HandleInheritability.Inheritable) {
throw new ArgumentOutOfRangeException(nameof(inheritability), SR.ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable);
}
Create(direction, inheritability, bufferSize, pipeSecurity);
}
}
}