diff options
| -rw-r--r-- | Emby.Server.Implementations/Activity/ActivityManager.cs | 16 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityManager.cs b/Emby.Server.Implementations/Activity/ActivityManager.cs index ee10845cf..2d2dc8e61 100644 --- a/Emby.Server.Implementations/Activity/ActivityManager.cs +++ b/Emby.Server.Implementations/Activity/ActivityManager.cs @@ -1,32 +1,34 @@ -#pragma warning disable CS1591 - using System; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Events; using MediaBrowser.Model.Querying; -using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.Activity { + /// <inheritdoc /> public class ActivityManager : IActivityManager { + /// <inheritdoc /> public event EventHandler<GenericEventArgs<ActivityLogEntry>> EntryCreated; private readonly IActivityRepository _repo; - private readonly ILogger _logger; private readonly IUserManager _userManager; + /// <summary> + /// Initializes a new instance of the <see cref="ActivityManager"/> class. + /// </summary> + /// <param name="repo">The activity repository.</param> + /// <param name="userManager">The user manager.</param> public ActivityManager( - ILoggerFactory loggerFactory, IActivityRepository repo, IUserManager userManager) { - _logger = loggerFactory.CreateLogger(nameof(ActivityManager)); _repo = repo; _userManager = userManager; } + /// <inheritdoc /> public void Create(ActivityLogEntry entry) { entry.Date = DateTime.UtcNow; @@ -36,6 +38,7 @@ namespace Emby.Server.Implementations.Activity EntryCreated?.Invoke(this, new GenericEventArgs<ActivityLogEntry>(entry)); } + /// <inheritdoc /> public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, bool? hasUserId, int? startIndex, int? limit) { var result = _repo.GetActivityLogEntries(minDate, hasUserId, startIndex, limit); @@ -59,6 +62,7 @@ namespace Emby.Server.Implementations.Activity return result; } + /// <inheritdoc /> public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit) { return GetActivityLogEntries(minDate, null, startIndex, limit); diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 81a80ddb2..7e80900f4 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -833,7 +833,7 @@ namespace Emby.Server.Implementations var activityLogRepo = GetActivityLogRepository(); serviceCollection.AddSingleton(activityLogRepo); - serviceCollection.AddSingleton<IActivityManager>(new ActivityManager(LoggerFactory, activityLogRepo, UserManager)); + serviceCollection.AddSingleton<IActivityManager>(new ActivityManager(activityLogRepo, UserManager)); var authContext = new AuthorizationContext(AuthenticationRepository, UserManager); serviceCollection.AddSingleton<IAuthorizationContext>(authContext); |
