// FIXME: not precise.
internal const int DefaultBufferSize = 0x400;
+#if !MOBILE
internal static bool IsWindows {
get { return Win32Marshal.IsWindows; }
}
+#endif
internal Exception ThrowACLException ()
{
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; }
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