diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-23 00:31:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-23 00:31:35 -0800 |
| commit | 404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch) | |
| tree | 3d267c6ceef9439a034c113095e10e4d619e7c70 /Emby.Server.Implementations/Activity/ActivityRepository.cs | |
| parent | 8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff) | |
| parent | e05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff) | |
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'Emby.Server.Implementations/Activity/ActivityRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Activity/ActivityRepository.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityRepository.cs b/Emby.Server.Implementations/Activity/ActivityRepository.cs index 91a4a5fd4..aeed8b6f1 100644 --- a/Emby.Server.Implementations/Activity/ActivityRepository.cs +++ b/Emby.Server.Implementations/Activity/ActivityRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; @@ -6,11 +6,10 @@ using System.Linq; using Emby.Server.Implementations.Data; using MediaBrowser.Controller; using MediaBrowser.Model.Activity; -using Microsoft.Extensions.Logging; +using MediaBrowser.Model.IO; using MediaBrowser.Model.Querying; +using Microsoft.Extensions.Logging; using SQLitePCL.pretty; -using MediaBrowser.Model.Extensions; -using MediaBrowser.Model.IO; namespace Emby.Server.Implementations.Activity { @@ -19,8 +18,8 @@ namespace Emby.Server.Implementations.Activity private readonly CultureInfo _usCulture = new CultureInfo("en-US"); protected IFileSystem FileSystem { get; private set; } - public ActivityRepository(ILogger logger, IServerApplicationPaths appPaths, IFileSystem fileSystem) - : base(logger) + public ActivityRepository(ILoggerFactory loggerFactory, IServerApplicationPaths appPaths, IFileSystem fileSystem) + : base(loggerFactory.CreateLogger(nameof(ActivityRepository))) { DbFilePath = Path.Combine(appPaths.DataPath, "activitylog.db"); FileSystem = fileSystem; @@ -83,7 +82,7 @@ namespace Emby.Server.Implementations.Activity { if (entry == null) { - throw new ArgumentNullException("entry"); + throw new ArgumentNullException(nameof(entry)); } using (WriteLock.Write()) @@ -122,7 +121,7 @@ namespace Emby.Server.Implementations.Activity { if (entry == null) { - throw new ArgumentNullException("entry"); + throw new ArgumentNullException(nameof(entry)); } using (WriteLock.Write()) @@ -251,7 +250,7 @@ namespace Emby.Server.Implementations.Activity } } - private ActivityLogEntry GetEntry(IReadOnlyList<IResultSetValue> reader) + private static ActivityLogEntry GetEntry(IReadOnlyList<IResultSetValue> reader) { var index = 0; |
