mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
Reformat and apply Stylecop rules
This commit is contained in:
@@ -9,13 +9,10 @@ namespace NzbDrone.Mono.EnvironmentInfo.VersionAdapters
|
||||
{
|
||||
public class MacOsVersionAdapter : IOsVersionAdapter
|
||||
{
|
||||
private static readonly Regex DarwinVersionRegex = new Regex("<string>(?<version>10\\.\\d{1,2}\\.?\\d{0,2}?)<\\/string>",
|
||||
RegexOptions.Compiled |
|
||||
RegexOptions.IgnoreCase
|
||||
);
|
||||
|
||||
private const string PLIST_DIR = "/System/Library/CoreServices/";
|
||||
|
||||
private static readonly Regex DarwinVersionRegex = new Regex("<string>(?<version>10\\.\\d{1,2}\\.?\\d{0,2}?)<\\/string>",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private readonly IDiskProvider _diskProvider;
|
||||
private readonly Logger _logger;
|
||||
@@ -40,8 +37,7 @@ namespace NzbDrone.Mono.EnvironmentInfo.VersionAdapters
|
||||
|
||||
var versionFile = allFiles.SingleOrDefault(c =>
|
||||
c.EndsWith("SystemVersion.plist") ||
|
||||
c.EndsWith("ServerVersion.plist")
|
||||
);
|
||||
c.EndsWith("ServerVersion.plist"));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(versionFile))
|
||||
{
|
||||
@@ -52,8 +48,6 @@ namespace NzbDrone.Mono.EnvironmentInfo.VersionAdapters
|
||||
var text = _diskProvider.ReadAllText(versionFile);
|
||||
var match = DarwinVersionRegex.Match(text);
|
||||
|
||||
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
version = match.Groups["version"].Value;
|
||||
|
||||
Reference in New Issue
Block a user