[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / class / System.Core / System.IO.Pipes / PipeStream.cs
index ed030e7608bde8da0cf99b23f88752f042804491..d60b71b1f5b7b29dc18f41994410c17e2e07653a 100644 (file)
@@ -57,7 +57,6 @@ namespace System.IO.Pipes
                        return new NotImplementedException ("ACL is not supported in Mono");
                }
 
-#if !MOBILE
                internal static PipeAccessRights ToAccessRights (PipeDirection direction)
                {
                        switch (direction) {
@@ -88,7 +87,6 @@ namespace System.IO.Pipes
                                        throw new ArgumentOutOfRangeException ();
                        }
                }
-#endif
 
                protected PipeStream (PipeDirection direction, int bufferSize)
                        : this (direction, PipeTransmissionMode.Byte, bufferSize)
@@ -135,18 +133,19 @@ namespace System.IO.Pipes
                        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; }
@@ -182,19 +181,7 @@ namespace System.IO.Pipes
                }
 
                // initialize/dispose/state check
-#if MOBILE
-               internal static void CheckPipePropertyOperations ()
-               {
-               }
-
-               static void CheckReadOperations ()
-               {
-               }
 
-               static void CheckWriteOperations ()
-               {
-               }
-#else
                [MonoTODO]
                protected internal virtual void CheckPipePropertyOperations ()
                {
@@ -224,7 +211,6 @@ namespace System.IO.Pipes
                        this.IsHandleExposed = isExposed;
                        this.IsAsync = isAsync;
                }
-#endif
 
                protected override void Dispose (bool disposing)
                {
@@ -253,21 +239,28 @@ namespace System.IO.Pipes
                        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
@@ -275,7 +268,6 @@ namespace System.IO.Pipes
                public void WaitForPipeDrain ()
                {
                }
-#endif
 
                [MonoTODO]
                public override int Read ([In] byte [] buffer, int offset, int count)
@@ -319,7 +311,6 @@ namespace System.IO.Pipes
 
                // async
 
-#if !MOBILE
                Func<byte [],int,int,int> read_delegate;
 
                [HostProtection (SecurityAction.LinkDemand, ExternalThreading = true)]
@@ -349,7 +340,6 @@ namespace System.IO.Pipes
                {
                        write_delegate.EndInvoke (asyncResult);
                }
-#endif
        }
 }