Persist() private méthode

private Persist ( SafeHandle handle ) : void
handle SafeHandle
Résultat void
Exemple #1
0
 public void SetAccessControl(PipeSecurity pipeSecurity)
 {
     if (pipeSecurity == null)
     {
         throw new ArgumentNullException("pipeSecurity");
     }
     this.CheckPipePropertyOperations();
     pipeSecurity.Persist(this.m_handle);
 }
Exemple #2
0
        public void SetAccessControl(PipeSecurity pipeSecurity)
        {
            if (pipeSecurity == null)
            {
                throw new ArgumentNullException("pipeSecurity");
            }

            pipeSecurity.Persist(SafePipeHandle);
        }
Exemple #3
0
        public void SetAccessControl(PipeSecurity pipeSecurity)
        {
#if MOBILE
            throw new PlatformNotSupportedException();
#else
            if (pipeSecurity == null)
            {
                throw new ArgumentNullException("pipeSecurity");
            }

            pipeSecurity.Persist(SafePipeHandle);
#endif
        }
Exemple #4
0
        public void SetAccessControl(PipeSecurity pipeSecurity)
        {
            if (pipeSecurity == null)
            {
                throw new ArgumentNullException(nameof(pipeSecurity));
            }

            // Checks that State != WaitingToConnect and State != Closed
            CheckPipePropertyOperations();

            // PipeState must be either Disconected or Connected
            pipeSecurity.Persist(SafePipeHandle);
        }
Exemple #5
0
        public static void SetAccessControl(this PipeStream stream, PipeSecurity pipeSecurity)
        {
            ArgumentNullException.ThrowIfNull(pipeSecurity);

            // Checks that State != WaitingToConnect and State != Closed
            var handle = stream.SafePipeHandle;

            // Checks that State != Broken
            if (stream is NamedPipeClientStream && !stream.IsConnected)
            {
                throw new IOException(SR.IO_IO_PipeBroken);
            }

            // PipeState must be either Disconnected or Connected
            pipeSecurity.Persist(handle);
        }
        public static void SetAccessControl(this PipeStream stream, PipeSecurity pipeSecurity)
        {
            // PipeState can not be Closed and the Handle can not be null or closed
            if (pipeSecurity == null)
            {
                throw new ArgumentNullException("pipeSecurity");
            }

            var handle = stream.SafePipeHandle; // A non-null, open handle implies a non-closed PipeState.

            // NamedPipeClientStream: PipeState can not be WaitingToConnect or Broken. WaitingToConnect is covered by the SafePipeHandle check.
            if (stream is NamedPipeClientStream && !stream.IsConnected) // Pipe could also be WaitingToConnect, Broken, Disconnected, or Closed.
            {
                throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected);
            }

            pipeSecurity.Persist(handle);
        }
Exemple #7
0
        public static void SetAccessControl(this PipeStream stream, PipeSecurity pipeSecurity)
        {
            // PipeState can not be Closed and the Handle can not be null or closed
            if (pipeSecurity == null)
            {
                throw new ArgumentNullException(nameof(pipeSecurity));
            }

            var handle = stream.SafePipeHandle; // A non-null, open handle implies a non-closed PipeState.

            // NamedPipeClientStream: PipeState can not be WaitingToConnect or Broken. WaitingToConnect is covered by the SafePipeHandle check.
            if (stream is NamedPipeClientStream && !stream.IsConnected) // Pipe could also be WaitingToConnect, Broken, Disconnected, or Closed.
            {
                throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected);
            }

            pipeSecurity.Persist(handle);
        }
		public void SetAccessControl (PipeSecurity pipeSecurity)
		{
#if MOBILE
			throw new PlatformNotSupportedException ();
#else
			if (pipeSecurity == null)
				throw new ArgumentNullException ("pipeSecurity");
				
			pipeSecurity.Persist (SafePipeHandle);
#endif
		}
Exemple #9
0
        public void SetAccessControl(PipeSecurity pipeSecurity) {
            if (pipeSecurity == null) {
                throw new ArgumentNullException("pipeSecurity");
            }
            CheckPipePropertyOperations();

            pipeSecurity.Persist(m_handle);
        }
Exemple #10
0
		public void SetAccessControl (PipeSecurity pipeSecurity)
		{
			if (pipeSecurity == null)
				throw new ArgumentNullException ("pipeSecurity");
				
			pipeSecurity.Persist (SafePipeHandle);
		}