NamedPipeServerStream.NotSupported.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using Microsoft.Win32.SafeHandles;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Net.Sockets;
  5. using System.Runtime.InteropServices;
  6. using System.Security;
  7. using System.Threading;
  8. using System.Threading.Tasks;
  9. using System.Security.Permissions;
  10. namespace System.IO.Pipes
  11. {
  12. public sealed partial class NamedPipeServerStream : PipeStream
  13. {
  14. public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity)
  15. : base (PipeDirection.In, 0)
  16. {
  17. throw new PlatformNotSupportedException ();
  18. }
  19. public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity, HandleInheritability inheritability)
  20. : base (PipeDirection.In, 0)
  21. {
  22. throw new PlatformNotSupportedException ();
  23. }
  24. public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity, HandleInheritability inheritability, PipeAccessRights additionalAccessRights)
  25. : base (PipeDirection.In, 0)
  26. {
  27. throw new PlatformNotSupportedException ();
  28. }
  29. [SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPrincipal)]
  30. public void RunAsClient (PipeStreamImpersonationWorker impersonationWorker)
  31. {
  32. throw new PlatformNotSupportedException ();
  33. }
  34. private void Create (string pipeName, PipeDirection direction, int maxNumberOfServerInstances,
  35. PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize,
  36. HandleInheritability inheritability)
  37. {
  38. throw new PlatformNotSupportedException ();
  39. }
  40. public void WaitForConnection ()
  41. {
  42. throw new PlatformNotSupportedException ();
  43. }
  44. public Task WaitForConnectionAsync (CancellationToken cancellationToken)
  45. {
  46. throw new PlatformNotSupportedException ();
  47. }
  48. private void HandleAcceptedSocket (Socket acceptedSocket)
  49. {
  50. throw new PlatformNotSupportedException ();
  51. }
  52. public void Disconnect ()
  53. {
  54. throw new PlatformNotSupportedException ();
  55. }
  56. public string GetImpersonationUserName ()
  57. {
  58. throw new PlatformNotSupportedException ();
  59. }
  60. }
  61. }