From e84ba17b9f48a3bc8811b1a89c54c25bc6607599 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 10 Aug 2014 18:13:17 -0400 Subject: add activity log feature --- .../Notifications/SqliteNotificationsRepository.cs | 66 ---------------------- 1 file changed, 66 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs') diff --git a/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs b/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs index 2424a6652..d34d5a293 100644 --- a/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs +++ b/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs @@ -206,46 +206,6 @@ namespace MediaBrowser.Server.Implementations.Notifications return notification; } - /// - /// Gets the notification. - /// - /// The id. - /// The user id. - /// Notification. - /// - /// id - /// or - /// userId - /// - public Notification GetNotification(string id, string userId) - { - if (string.IsNullOrEmpty(id)) - { - throw new ArgumentNullException("id"); - } - if (string.IsNullOrEmpty(userId)) - { - throw new ArgumentNullException("userId"); - } - - using (var cmd = _connection.CreateCommand()) - { - cmd.CommandText = "select Id,UserId,Date,Name,Description,Url,Level,IsRead,Category,RelatedId where Id=@Id And UserId = @UserId"; - - cmd.Parameters.Add(cmd, "@Id", DbType.Guid).Value = new Guid(id); - cmd.Parameters.Add(cmd, "@UserId", DbType.Guid).Value = new Guid(userId); - - using (var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.SingleResult | CommandBehavior.SingleRow)) - { - if (reader.Read()) - { - return GetNotification(reader); - } - } - return null; - } - } - /// /// Gets the level. /// @@ -289,32 +249,6 @@ namespace MediaBrowser.Server.Implementations.Notifications } } - /// - /// Updates the notification. - /// - /// The notification. - /// The cancellation token. - /// Task. - public async Task UpdateNotification(Notification notification, CancellationToken cancellationToken) - { - await ReplaceNotification(notification, cancellationToken).ConfigureAwait(false); - - if (NotificationUpdated != null) - { - try - { - NotificationUpdated(this, new NotificationUpdateEventArgs - { - Notification = notification - }); - } - catch (Exception ex) - { - _logger.ErrorException("Error in NotificationUpdated event handler", ex); - } - } - } - /// /// Replaces the notification. /// -- cgit v1.2.3