public void Close() { if (pipeFactory.State != CommunicationState.Closed) { pipeProxy.Unsubscribe(); pipeFactory.Close(); } }
public void Close() { if (pipeFactory.State != CommunicationState.Closed && pipeFactory.State != CommunicationState.Closing && pipeFactory.State != CommunicationState.Faulted) { pipeProxy.Unsubscribe(); } try { pipeFactory.Close(); } catch (Exception) { pipeFactory.Abort(); } debugOutput.Close(); }