private void DeRegisterForNotifications() { try { // De-Register for IMbnInterfaceManagerEvents if (m_InterfaceManagerEventsSink != null) { m_InterfaceManagerEventsSink.Dispose(); m_InterfaceManagerEventsSink = null; } // De-Register for IMbnPinManagerEvents if (m_PinManagerEventsSink != null) { m_PinManagerEventsSink.Dispose(); m_PinManagerEventsSink = null; } // De-Register for IMbnPinManagerEvents if (m_PinEventsSink != null) { m_PinEventsSink.Dispose(); m_PinEventsSink = null; } // De-Register for IMbnConnectionEvents if (m_ConnectionEventsSink != null) { m_ConnectionEventsSink.Dispose(); m_ConnectionEventsSink = null; } // De-Register for IMbnDeviceServicesEvents if (m_DeviceServicesEventsSink != null) { m_DeviceServicesEventsSink.Dispose(); m_DeviceServicesEventsSink = null; } } catch (Exception e) { rootPage.NotifyUser(ParseExceptionCode(e), NotifyType.ErrorMessage); } }