/// <summary> /// Destroy MediaContentService /// </summary> public void Destroy() { if (mediaDB != null) { Console.WriteLine("MediaContentService.Destroy() ...."); #if media_svc_get_storage_id_failed_return_minus_2 mediaDB.Disconnect(); #endif mediaDB.Dispose(); } }
/// <summary> /// Disconnects from Media Database. /// </summary> public void DisconnectDatabase() { try { _mediaDatabase.Disconnect(); _mediaDatabase.Dispose(); } catch (Exception exception) { ErrorHandler("Disconnecting DB error: " + exception.Message); } }