PipeStream.NotSupported.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using Microsoft.Win32.SafeHandles;
  2. using System.Threading;
  3. using System.Threading.Tasks;
  4. namespace System.IO.Pipes
  5. {
  6. public abstract partial class PipeStream : Stream
  7. {
  8. internal const bool CheckOperationsRequiresSetHandle = false;
  9. // Blocks until the other end of the pipe has read in all written buffer.
  10. public void WaitForPipeDrain()
  11. {
  12. throw new PlatformNotSupportedException();
  13. }
  14. // Gets the transmission mode for the pipe. This is virtual so that subclassing types can
  15. // override this in cases where only one mode is legal (such as anonymous pipes)
  16. public virtual PipeTransmissionMode TransmissionMode
  17. {
  18. get { throw new PlatformNotSupportedException(); }
  19. }
  20. // Gets the buffer size in the inbound direction for the pipe. This checks if pipe has read
  21. // access. If that passes, call to GetNamedPipeInfo will succeed.
  22. public virtual int InBufferSize
  23. {
  24. get { throw new PlatformNotSupportedException(); }
  25. }
  26. // Gets the buffer size in the outbound direction for the pipe. This uses cached version
  27. // if it's an outbound only pipe because GetNamedPipeInfo requires read access to the pipe.
  28. // However, returning cached is good fallback, especially if user specified a value in
  29. // the ctor.
  30. public virtual int OutBufferSize
  31. {
  32. get { throw new PlatformNotSupportedException(); }
  33. }
  34. public virtual PipeTransmissionMode ReadMode
  35. {
  36. get { throw new PlatformNotSupportedException(); }
  37. set { throw new PlatformNotSupportedException(); }
  38. }
  39. /// <summary>Initializes the handle to be used asynchronously.</summary>
  40. /// <param name="handle">The handle.</param>
  41. private void InitializeAsyncHandle(SafePipeHandle handle)
  42. {
  43. throw new PlatformNotSupportedException();
  44. }
  45. internal virtual void DisposeCore(bool disposing)
  46. {
  47. throw new PlatformNotSupportedException();
  48. }
  49. private unsafe int ReadCore(Span<byte> buffer)
  50. {
  51. throw new PlatformNotSupportedException();
  52. }
  53. private unsafe void WriteCore(ReadOnlySpan<byte> buffer)
  54. {
  55. throw new PlatformNotSupportedException();
  56. }
  57. private Task<int> ReadAsyncCore(Memory<byte> destination, CancellationToken cancellationToken)
  58. {
  59. throw new PlatformNotSupportedException();
  60. }
  61. private Task WriteAsyncCore(ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
  62. {
  63. throw new PlatformNotSupportedException();
  64. }
  65. /// <summary>Throws an exception if the supplied handle does not represent a valid pipe.</summary>
  66. /// <param name="safePipeHandle">The handle to validate.</param>
  67. internal void ValidateHandleIsPipe(SafePipeHandle safePipeHandle)
  68. {
  69. throw new PlatformNotSupportedException();
  70. }
  71. internal static string GetPipePath(string serverName, string pipeName)
  72. {
  73. throw new PlatformNotSupportedException();
  74. }
  75. }
  76. }