code clean up
This commit is contained in:
parent
1816bd721c
commit
28625029cd
21 changed files with 44 additions and 202 deletions
|
|
@ -78,7 +78,7 @@ namespace LibationFileManager
|
|||
.FirstOrDefault(s => regex.IsMatch(s));
|
||||
}
|
||||
|
||||
public bool Exists(string productId) => GetFilePath(productId) != null;
|
||||
public bool Exists(string productId) => GetFilePath(productId) is not null;
|
||||
}
|
||||
|
||||
public class AudioFileStorage : AudibleFileStorage
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace LibationFileManager
|
|||
}
|
||||
}
|
||||
|
||||
public static bool Exists(string id, FileType type) => GetFirstPath(id, type) != null;
|
||||
public static bool Exists(string id, FileType type) => GetFirstPath(id, type) is not null;
|
||||
|
||||
public static List<(FileType fileType, string path)> GetFiles(string id)
|
||||
=> getEntries(entry => entry.Id == id)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace LibationFileManager
|
|||
{
|
||||
lock (cacheLocker)
|
||||
{
|
||||
if (!cache.ContainsKey(def) || cache[def] == null)
|
||||
if (!cache.ContainsKey(def) || cache[def] is null)
|
||||
{
|
||||
var path = getPath(def);
|
||||
var bytes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue