aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/DirectoryService.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-19 15:11:50 -0500
committerGitHub <noreply@github.com>2019-01-19 15:11:50 -0500
commit55538764fa06a64795c099fc6496df9dbb4156bd (patch)
tree8c1f94861ecebdf634b70a7265945b6f8f13aff1 /MediaBrowser.Controller/Providers/DirectoryService.cs
parent3b52035ee064a5d9aa215d9515211d4508585d39 (diff)
parentc5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff)
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'MediaBrowser.Controller/Providers/DirectoryService.cs')
-rw-r--r--MediaBrowser.Controller/Providers/DirectoryService.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs
index 9bb2f5bed..133e7c115 100644
--- a/MediaBrowser.Controller/Providers/DirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/DirectoryService.cs
@@ -1,8 +1,8 @@
-using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.IO;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Controller.Providers
{
@@ -25,9 +25,7 @@ namespace MediaBrowser.Controller.Providers
public FileSystemMetadata[] GetFileSystemEntries(string path)
{
- FileSystemMetadata[] entries;
-
- if (!_cache.TryGetValue(path, out entries))
+ if (!_cache.TryGetValue(path, out FileSystemMetadata[] entries))
{
//_logger.LogDebug("Getting files for " + path);
@@ -56,8 +54,7 @@ namespace MediaBrowser.Controller.Providers
public FileSystemMetadata GetFile(string path)
{
- FileSystemMetadata file;
- if (!_fileCache.TryGetValue(path, out file))
+ if (!_fileCache.TryGetValue(path, out FileSystemMetadata file))
{
file = _fileSystem.GetFileInfo(path);
@@ -83,8 +80,7 @@ namespace MediaBrowser.Controller.Providers
public List<string> GetFilePaths(string path, bool clearCache)
{
- List<string> result;
- if (clearCache || !_filePathCache.TryGetValue(path, out result))
+ if (clearCache || !_filePathCache.TryGetValue(path, out List<string> result))
{
result = _fileSystem.GetFilePaths(path).ToList();