/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
public PipeHandle() { this.Handle = new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE); this.State = InterProcessConnectionState.NotSet; }
public PipeHandle(int hnd, InterProcessConnectionState state) { this.Handle = new IntPtr(hnd); this.State = state; }
public PipeHandle(int hnd) { this.Handle = new IntPtr(hnd); this.State = InterProcessConnectionState.NotSet; }
/// <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; }
/// <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; }
/// <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; }
/// <summary> /// Creates a PipeHandle instance with an invalid native handle. /// </summary> public PipeHandle(InterProcessConnectionState state) : this(new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE), state) { }
/// <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; }
/// <summary> /// Creates a PipeHandle instance with an invalid native handle. /// </summary> public PipeHandle(InterProcessConnectionState state) : this(new IntPtr(NamedPipeNative.INVALID_HANDLE_VALUE), state) {}
/// <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; }