/// <summary>
 /// Closes a named pipe and releases the native handle.
 /// </summary>
 public void Dispose()
 {
     _state = InterProcessConnectionState.Closing;
     NamedPipeNative.CloseHandle(_handle);
     _handle = IntPtr.Zero;
     _state  = InterProcessConnectionState.Closed;
 }
Esempio n. 2
0
		/// <summary>
		/// Closes a named pipe and releases the native handle.
		/// </summary>
		public void Dispose()
		{
			_state = InterProcessConnectionState.Closing;
			NamedPipeNative.CloseHandle(_handle);
			_handle = IntPtr.Zero;
			_state = InterProcessConnectionState.Closed;
		}
Esempio n. 3
0
 /// <summary>
 /// Creates a PipeHandle instance with an invalid native handle.
 /// </summary>
 #endregion
 public PipeHandle()
 {
     this.Handle = new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE);
     this.State  = InterProcessConnectionState.NotSet;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a PipeHandle instance using the provided native handle and state.
 /// </summary>
 /// <param name="hnd">The native handle.</param>
 /// <param name="state">The state of the pipe connection.</param>
 #endregion
 public PipeHandle(int hnd, InterProcessConnectionState state)
 {
     this.Handle = new IntPtr(hnd);
     this.State  = state;
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a PipeHandle instance using the passed native handle.
 /// </summary>
 /// <param name="hnd">The native handle.</param>
 #endregion
 public PipeHandle(int hnd)
 {
     this.Handle = new IntPtr(hnd);
     this.State  = InterProcessConnectionState.NotSet;
 }
Esempio n. 6
0
 public PipeHandle()
 {
     this.Handle = new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE);
     this.State = InterProcessConnectionState.NotSet;
 }
Esempio n. 7
0
 public PipeHandle(int hnd, InterProcessConnectionState state)
 {
     this.Handle = new IntPtr(hnd);
     this.State = state;
 }
Esempio n. 8
0
 public PipeHandle(int hnd)
 {
     this.Handle = new IntPtr(hnd);
     this.State = InterProcessConnectionState.NotSet;
 }
Esempio n. 9
0
 /// <summary>
 /// Creates a PipeHandle instance with an invalid native handle.
 /// </summary>
 #endregion
 public PipeHandle()
 {
     this.Handle = new SafeFileHandle(NativeMethods.INVALID_HANDLE_VALUE, false);
     this.State  = InterProcessConnectionState.NotSet;
 }
Esempio n. 10
0
 /// <summary>
 /// Creates a PipeHandle instance using the provided native handle and state.
 /// </summary>
 /// <param name="hnd">The native handle.</param>
 /// <param name="state">The state of the pipe connection.</param>
 #endregion
 public PipeHandle(SafeFileHandle hnd, InterProcessConnectionState state)
 {
     this.Handle = hnd;
     this.State  = state;
 }
Esempio n. 11
0
 /// <summary>
 /// Creates a PipeHandle instance using the passed native handle.
 /// </summary>
 /// <param name="hnd">The native handle.</param>
 #endregion
 public PipeHandle(SafeFileHandle hnd)
 {
     this.Handle = hnd;
     this.State  = InterProcessConnectionState.NotSet;
 }
Esempio n. 12
0
 /// <summary>
 /// Creates a PipeHandle instance with an invalid native handle.
 /// </summary>
 public PipeHandle(InterProcessConnectionState state)
     : this(new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE), state)
 {
 }
Esempio n. 13
0
 /// <summary>
 /// Creates a PipeHandle instance using the provided native handle and state.
 /// </summary>
 /// <param name="hnd">The native handle.</param>
 /// <param name="state">The state of the pipe connection.</param>
 public PipeHandle(IntPtr hnd, InterProcessConnectionState state)
 {
     _handle = hnd;
     _state  = state;
 }
Esempio n. 14
0
		/// <summary>
		/// Creates a PipeHandle instance with an invalid native handle.
		/// </summary>
		public PipeHandle(InterProcessConnectionState state)
			: this(new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE), state)
		{}
Esempio n. 15
0
		/// <summary>
		/// Creates a PipeHandle instance using the provided native handle and state.
		/// </summary>
		/// <param name="hnd">The native handle.</param>
		/// <param name="state">The state of the pipe connection.</param>
		public PipeHandle(IntPtr hnd, InterProcessConnectionState state)
		{
			_handle = hnd;
			_state = state;
		}