Name: csapi-network-connection
Summary: Tizen Connection API for C#
-Version: 1.0.5
+Version: 1.0.6
Release: 1
Group: Development/Libraries
License: Apache-2.0
static public void ThrowConnectionException(int errno)
{
ConnectionError error = (ConnectionError)errno;
+ Log.Debug(Globals.LogTag, "ThrowConnectionException " + error);
if (error == ConnectionError.AddressFamilyNotSupported)
{
throw new InvalidOperationException("Address Family Not Supported");
private void Dispose(bool disposing)
{
+ Log.Debug(Globals.LogTag, ">>> HandleHolder Dispose with " + disposing);
+ Log.Debug(Globals.LogTag, ">>> Handle: " + Handle);
if (disposed)
return;
if (disposing)
{
// Free managed objects.
- Interop.Connection.Destroy(Handle);
+ Destroy();
}
disposed = true;
}
+
+ private void Destroy()
+ {
+ Interop.Connection.Destroy(Handle);
+ }
}
internal class ConnectionInternalManager
private void Dispose(bool disposing)
{
+ Log.Debug(Globals.LogTag, ">>> ConnectionInternalManager Dispose with disposing " + disposing + ", disposed " + disposed);
+ Log.Debug(Globals.LogTag, ">>> Handle: " + GetHandle());
if (disposed)
return;
private void Dispose(bool disposing)
{
+ Log.Debug(Globals.LogTag, ">>> ConnectionManager Dispose with disposing " + disposing + ", disposed " + disposed);
if (disposed)
return;
if (disposing)
{
// Free managed objects.
+ UnregisterEvents();
_internalManager.Dispose();
}
disposed = true;
}
}
+ private void UnregisterEvents()
+ {
+ if (_ConnectionTypeChanged != null)
+ {
+ ConnectionTypeChangedStop();
+ }
+ if (_IPAddressChanged != null)
+ {
+ IpAddressChangedStop();
+ }
+ if (_EthernetCableStateChanged != null)
+ {
+ EthernetCableStateChangedStop();
+ }
+ if (_ProxyAddressChanged != null)
+ {
+ ProxyAddressChangedStop();
+ }
+ }
+
/// <summary>
/// Gets the IP address of the current connection.
/// </summary>
private void Dispose(bool disposing)
{
+ Log.Debug(Globals.LogTag, ">>> ConnectionProfile Dispose with " + disposing);
if (disposed)
return;
if (disposing)
{
// Free managed objects.
-// ProfileStateChangedStop();
- Interop.ConnectionProfile.Destroy(ProfileHandle);
+ UnregisterEvents();
+ Destroy();
}
disposed = true;
}
+ private void UnregisterEvents()
+ {
+ if (_ProfileStateChanged != null)
+ {
+ ProfileStateChangedStop();
+ }
+ }
+
+ private void Destroy()
+ {
+ Interop.ConnectionProfile.Destroy(ProfileHandle);
+ }
+
/// <summary>
/// Gets the profile ID.
/// </summary>
private void Dispose(bool disposing)
{
+ Log.Debug(Globals.LogTag, ">>> RequestCellularProfile Dispose with " + disposing);
if (disposed)
return;
if (disposing)
{
// Free managed objects.
+ Destroy();
}
- Interop.ConnectionProfile.Destroy(ProfileHandle);
disposed = true;
}
+ private void Destroy()
+ {
+ Interop.ConnectionProfile.Destroy(ProfileHandle);
+ }
+
/// <summary>
/// Gets the network type.
/// </summary>
private void Dispose(bool disposing)
{
+ Log.Debug(Globals.LogTag, ">>> RequestWiFiProfile Dispose with " + disposing);
if (disposed)
return;
if (disposing)
{
// Free managed objects.
+ Destroy();
}
- Interop.ConnectionProfile.Destroy(ProfileHandle);
disposed = true;
}
+ private void Destroy()
+ {
+ Interop.ConnectionProfile.Destroy(ProfileHandle);
+ }
+
/// <summary>
/// Gets the network type.
/// </summary>