diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-08-10 18:13:17 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-08-10 18:13:17 -0400 |
| commit | e84ba17b9f48a3bc8811b1a89c54c25bc6607599 (patch) | |
| tree | 220ce22658497f75f4d575296fc903cd19a60339 /MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | |
| parent | 0f508dab47ebcc27d973840d03025f28f52a14b6 (diff) | |
add activity log feature
Diffstat (limited to 'MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | 66 |
1 files changed, 0 insertions, 66 deletions
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 @@ -207,46 +207,6 @@ namespace MediaBrowser.Server.Implementations.Notifications } /// <summary> - /// Gets the notification. - /// </summary> - /// <param name="id">The id.</param> - /// <param name="userId">The user id.</param> - /// <returns>Notification.</returns> - /// <exception cref="System.ArgumentNullException"> - /// id - /// or - /// userId - /// </exception> - 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; - } - } - - /// <summary> /// Gets the level. /// </summary> /// <param name="reader">The reader.</param> @@ -290,32 +250,6 @@ namespace MediaBrowser.Server.Implementations.Notifications } /// <summary> - /// Updates the notification. - /// </summary> - /// <param name="notification">The notification.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task.</returns> - 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); - } - } - } - - /// <summary> /// Replaces the notification. /// </summary> /// <param name="notification">The notification.</param> |
