private bool CloseNotifyPort() { bool result = true; lock (this) { if (!this.m_isClosed) { this.m_isClosed = true; if (!this.IsInvalid) { AmTrace.Debug("Calling CloseClusterNotifyPort() (handle=0x{0:x})", new object[] { this.handle }); try { result = ClusapiMethods.CloseClusterNotifyPort(this.handle); goto IL_BD; } catch (AccessViolationException ex) { AmTrace.Error("Ignoring AccessViolationException exception while Closing cluster notify port (error={0})", new object[] { ex }); goto IL_BD; } } AmTrace.Debug("Skipped CloseClusterNotifyPort() since handle is invalid (handle=0x{0:x})", new object[] { this.handle }); } else { AmTrace.Debug("Skipped CloseClusterNotifyPort() the handle was closed already (handle=0x{0:x})", new object[] { this.handle }); } IL_BD :; } return(result); }