return new NotImplementedException ("ACL is not supported in Mono");
}
-#if !MOBILE
internal static PipeAccessRights ToAccessRights (PipeDirection direction)
{
switch (direction) {
throw new ArgumentOutOfRangeException ();
}
}
-#endif
protected PipeStream (PipeDirection direction, int bufferSize)
: this (direction, PipeTransmissionMode.Byte, bufferSize)
get {
if (!IsConnected)
throw new InvalidOperationException ("Pipe is not connected");
- if (stream == null)
+ if (stream == null) {
+#pragma warning disable 618
stream = new FileStream (handle.DangerousGetHandle (),
CanRead ? (CanWrite ? FileAccess.ReadWrite : FileAccess.Read)
: FileAccess.Write, true, buffer_size, IsAsync);
+#pragma warning restore 618
+ }
return stream;
}
set { stream = value; }
}
-#if !MOBILE
protected bool IsHandleExposed { get; private set; }
-#endif
[MonoTODO]
public bool IsMessageComplete { get; private set; }
}
// initialize/dispose/state check
-#if MOBILE
- internal static void CheckPipePropertyOperations ()
- {
- }
-
- static void CheckReadOperations ()
- {
- }
- static void CheckWriteOperations ()
- {
- }
-#else
[MonoTODO]
protected internal virtual void CheckPipePropertyOperations ()
{
this.IsHandleExposed = isExposed;
this.IsAsync = isAsync;
}
-#endif
protected override void Dispose (bool disposing)
{
throw new NotSupportedException ();
}
-#if !MOBILE
public PipeSecurity GetAccessControl ()
{
+#if MOBILE
+ throw new PlatformNotSupportedException ();
+#else
return new PipeSecurity (SafePipeHandle,
AccessControlSections.Owner |
AccessControlSections.Group |
AccessControlSections.Access);
+#endif
}
public void SetAccessControl (PipeSecurity pipeSecurity)
{
+#if MOBILE
+ throw new PlatformNotSupportedException ();
+#else
if (pipeSecurity == null)
throw new ArgumentNullException ("pipeSecurity");
pipeSecurity.Persist (SafePipeHandle);
+#endif
}
// pipe I/O
public void WaitForPipeDrain ()
{
}
-#endif
[MonoTODO]
public override int Read ([In] byte [] buffer, int offset, int count)
// async
-#if !MOBILE
Func<byte [],int,int,int> read_delegate;
[HostProtection (SecurityAction.LinkDemand, ExternalThreading = true)]
{
write_delegate.EndInvoke (asyncResult);
}
-#endif
}
}