{
if (_ConnectionTypeChanged == null)
{
- ConnectionTypeChangedStart();
+ try
+ {
+ ConnectionTypeChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ConnectionTypeChanged\n" + e.ToString());
+ return;
+ }
}
_ConnectionTypeChanged += value;
}, null);
_ConnectionTypeChanged -= value;
if (_ConnectionTypeChanged == null)
{
- ConnectionTypeChangedStop();
+ try
+ {
+ ConnectionTypeChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ConnectionTypeChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_EthernetCableStateChanged == null)
{
- EthernetCableStateChangedStart();
+ try
+ {
+ EthernetCableStateChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding EthernetCableStateChanged\n" + e.ToString());
+ return;
+ }
}
_EthernetCableStateChanged += value;
}, null);
_EthernetCableStateChanged -= value;
if (_EthernetCableStateChanged == null)
{
- EthernetCableStateChangedStop();
+ try
+ {
+ EthernetCableStateChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing EthernetCableStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_IPAddressChanged == null)
{
- IPAddressChangedStart();
+ try
+ {
+ IPAddressChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding IPAddressChanged\n" + e.ToString());
+ return;
+ }
}
_IPAddressChanged += value;
}, null);
_IPAddressChanged -= value;
if (_IPAddressChanged == null)
{
- IPAddressChangedStop();
+ try
+ {
+ IPAddressChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing IPAddressChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_ProxyAddressChanged == null)
{
- ProxyAddressChangedStart();
+ try
+ {
+ ProxyAddressChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ProxyAddressChanged\n" + e.ToString());
+ return;
+ }
}
_ProxyAddressChanged += value;
}, null);
_ProxyAddressChanged -= value;
if (_ProxyAddressChanged == null)
{
- ProxyAddressChangedStop();
+ try
+ {
+ ProxyAddressChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ProxyAddressChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_ProfileStateChanged == null)
{
- ProfileStateChangedStart();
+ try
+ {
+ ProfileStateChangedStart();
+ } catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ProfileStateChanged\n" + e.ToString());
+ return;
+ }
}
_ProfileStateChanged += value;
}, null);
_ProfileStateChanged -= value;
if (_ProfileStateChanged == null)
{
- ProfileStateChangedStop();
+ try
+ {
+ ProfileStateChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ProfileStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_deviceStateChanged == null)
{
- RegisterDeviceStateChangedEvent();
+ try
+ {
+ RegisterDeviceStateChangedEvent();
+ } catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding DeviceStateChanged\n" + e.ToString());
+ return;
+ }
}
_deviceStateChanged += value;
}, null);
_deviceStateChanged -= value;
if (_deviceStateChanged == null)
{
- UnregisterDeviceStateChangedEvent();
+ try
+ {
+ UnregisterDeviceStateChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing DeviceStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_connectionStateChanged == null)
{
- RegisterConnectionStateChangedEvent();
+ try
+ {
+ RegisterConnectionStateChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ConnectionStateChanged\n" + e.ToString());
+ return;
+ }
}
_connectionStateChanged += value;
}, null);
_connectionStateChanged -= value;
if (_connectionStateChanged == null)
{
- UnregisterConnectionStateChangedEvent();
+ try
+ {
+ UnregisterConnectionStateChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ConnectionStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_rssiLevelChanged == null)
{
- RegisterRssiLevelChangedEvent();
+ try
+ {
+ RegisterRssiLevelChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding RssiLevelChanged\n" + e.ToString());
+ return;
+ }
}
_rssiLevelChanged += value;
}, null);
_rssiLevelChanged -= value;
if (_rssiLevelChanged == null)
{
- UnregisterRssiLevelChangedEvent();
+ try
+ {
+ UnregisterRssiLevelChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing RssiLevelChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_backgroundScanFinished == null)
{
- RegisterBackgroundScanFinishedEvent();
+ try
+ {
+ RegisterBackgroundScanFinishedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding BackgroundScanFinished\n" + e.ToString());
+ return;
+ }
}
_backgroundScanFinished += value;
}, null);
_backgroundScanFinished -= value;
if (_backgroundScanFinished == null)
{
- UnregisterBackgroundScanFinishedEvent();
+ try
+ {
+ UnregisterBackgroundScanFinishedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing BackgroundScanFinished\n" + e.ToString());
+ }
}
}, null);
}