diff --git a/src/NzbDrone.Api/Authentication/EnableAuthInNancy.cs b/src/NzbDrone.Api/Authentication/EnableAuthInNancy.cs index b4e6cce62..f6efc16ce 100644 --- a/src/NzbDrone.Api/Authentication/EnableAuthInNancy.cs +++ b/src/NzbDrone.Api/Authentication/EnableAuthInNancy.cs @@ -27,7 +27,7 @@ public EnableAuthInNancy(IAuthenticationService authenticationService, _configFileProvider = configFileProvider; } - public int Order { get { return 10; } } + public int Order => 10; public void Register(IPipelines pipelines) { diff --git a/src/NzbDrone.Api/Extensions/Pipelines/CacheHeaderPipeline.cs b/src/NzbDrone.Api/Extensions/Pipelines/CacheHeaderPipeline.cs index 1ff6854d0..94c738d9b 100644 --- a/src/NzbDrone.Api/Extensions/Pipelines/CacheHeaderPipeline.cs +++ b/src/NzbDrone.Api/Extensions/Pipelines/CacheHeaderPipeline.cs @@ -14,7 +14,7 @@ public CacheHeaderPipeline(ICacheableSpecification cacheableSpecification) _cacheableSpecification = cacheableSpecification; } - public int Order { get { return 0; } } + public int Order => 0; public void Register(IPipelines pipelines) { diff --git a/src/NzbDrone.Api/Extensions/Pipelines/CorsPipeline.cs b/src/NzbDrone.Api/Extensions/Pipelines/CorsPipeline.cs index 5536388e0..b8c83298a 100644 --- a/src/NzbDrone.Api/Extensions/Pipelines/CorsPipeline.cs +++ b/src/NzbDrone.Api/Extensions/Pipelines/CorsPipeline.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines { public class CorsPipeline : IRegisterNancyPipeline { - public int Order { get { return 0; } } + public int Order => 0; public void Register(IPipelines pipelines) { diff --git a/src/NzbDrone.Api/Extensions/Pipelines/GZipPipeline.cs b/src/NzbDrone.Api/Extensions/Pipelines/GZipPipeline.cs index e7be5fd44..12293f23c 100644 --- a/src/NzbDrone.Api/Extensions/Pipelines/GZipPipeline.cs +++ b/src/NzbDrone.Api/Extensions/Pipelines/GZipPipeline.cs @@ -13,7 +13,7 @@ public class GzipCompressionPipeline : IRegisterNancyPipeline { private readonly Logger _logger; - public int Order { get { return 0; } } + public int Order => 0; public GzipCompressionPipeline(Logger logger) { diff --git a/src/NzbDrone.Api/Extensions/Pipelines/IfModifiedPipeline.cs b/src/NzbDrone.Api/Extensions/Pipelines/IfModifiedPipeline.cs index 5a816ef37..68abf4ade 100644 --- a/src/NzbDrone.Api/Extensions/Pipelines/IfModifiedPipeline.cs +++ b/src/NzbDrone.Api/Extensions/Pipelines/IfModifiedPipeline.cs @@ -14,7 +14,7 @@ public IfModifiedPipeline(ICacheableSpecification cacheableSpecification) _cacheableSpecification = cacheableSpecification; } - public int Order { get { return 0; } } + public int Order => 0; public void Register(IPipelines pipelines) { diff --git a/src/NzbDrone.Api/Extensions/Pipelines/NzbDroneVersionPipeline.cs b/src/NzbDrone.Api/Extensions/Pipelines/NzbDroneVersionPipeline.cs index c7ef8fd0c..00488657b 100644 --- a/src/NzbDrone.Api/Extensions/Pipelines/NzbDroneVersionPipeline.cs +++ b/src/NzbDrone.Api/Extensions/Pipelines/NzbDroneVersionPipeline.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines { public class NzbDroneVersionPipeline : IRegisterNancyPipeline { - public int Order { get { return 0; } } + public int Order => 0; public void Register(IPipelines pipelines) { diff --git a/src/NzbDrone.Api/Extensions/Pipelines/RequestLoggingPipeline.cs b/src/NzbDrone.Api/Extensions/Pipelines/RequestLoggingPipeline.cs index 766fa886d..4f1c01e93 100644 --- a/src/NzbDrone.Api/Extensions/Pipelines/RequestLoggingPipeline.cs +++ b/src/NzbDrone.Api/Extensions/Pipelines/RequestLoggingPipeline.cs @@ -23,7 +23,7 @@ public RequestLoggingPipeline(NzbDroneErrorPipeline errorPipeline) _errorPipeline = errorPipeline; } - public int Order { get { return 100; } } + public int Order => 100; public void Register(IPipelines pipelines) { diff --git a/src/NzbDrone.Api/Logs/LogFileModule.cs b/src/NzbDrone.Api/Logs/LogFileModule.cs index 464d8d041..bed6f7de2 100644 --- a/src/NzbDrone.Api/Logs/LogFileModule.cs +++ b/src/NzbDrone.Api/Logs/LogFileModule.cs @@ -31,13 +31,6 @@ protected override string GetLogFilePath(string filename) return Path.Combine(_appFolderInfo.GetLogFolder(), filename); } - protected override string DownloadUrlRoot - { - get - { - return "logfile"; - } - } - + protected override string DownloadUrlRoot => "logfile"; } } \ No newline at end of file diff --git a/src/NzbDrone.Api/Logs/UpdateLogFileModule.cs b/src/NzbDrone.Api/Logs/UpdateLogFileModule.cs index f5cec860e..38cb82587 100644 --- a/src/NzbDrone.Api/Logs/UpdateLogFileModule.cs +++ b/src/NzbDrone.Api/Logs/UpdateLogFileModule.cs @@ -38,12 +38,6 @@ protected override string GetLogFilePath(string filename) return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename); } - protected override string DownloadUrlRoot - { - get - { - return "updatelogfile"; - } - } + protected override string DownloadUrlRoot => "updatelogfile"; } } \ No newline at end of file diff --git a/src/NzbDrone.Api/NancyBootstrapper.cs b/src/NzbDrone.Api/NancyBootstrapper.cs index 0fe365808..3f599e397 100644 --- a/src/NzbDrone.Api/NancyBootstrapper.cs +++ b/src/NzbDrone.Api/NancyBootstrapper.cs @@ -55,17 +55,8 @@ protected override TinyIoCContainer GetApplicationContainer() return _tinyIoCContainer; } - protected override DiagnosticsConfiguration DiagnosticsConfiguration - { - get { return new DiagnosticsConfiguration { Password = @"password" }; } - } + protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" }; - protected override byte[] FavIcon - { - get - { - return null; - } - } + protected override byte[] FavIcon => null; } } \ No newline at end of file diff --git a/src/NzbDrone.Api/Profiles/Languages/LanguageResource.cs b/src/NzbDrone.Api/Profiles/Languages/LanguageResource.cs index 182e86a29..39ccf7d5f 100644 --- a/src/NzbDrone.Api/Profiles/Languages/LanguageResource.cs +++ b/src/NzbDrone.Api/Profiles/Languages/LanguageResource.cs @@ -9,6 +9,6 @@ public class LanguageResource : RestResource [JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)] public new int Id { get; set; } public string Name { get; set; } - public string NameLower { get { return Name.ToLowerInvariant(); } } + public string NameLower => Name.ToLowerInvariant(); } } \ No newline at end of file diff --git a/src/NzbDrone.Api/REST/RestResource.cs b/src/NzbDrone.Api/REST/RestResource.cs index cf9156199..ec9f195c6 100644 --- a/src/NzbDrone.Api/REST/RestResource.cs +++ b/src/NzbDrone.Api/REST/RestResource.cs @@ -8,12 +8,6 @@ public abstract class RestResource public int Id { get; set; } [JsonIgnore] - public virtual string ResourceName - { - get - { - return GetType().Name.ToLowerInvariant().Replace("resource", ""); - } - } + public virtual string ResourceName => GetType().Name.ToLowerInvariant().Replace("resource", ""); } } \ No newline at end of file diff --git a/src/NzbDrone.Api/TinyIoCNancyBootstrapper.cs b/src/NzbDrone.Api/TinyIoCNancyBootstrapper.cs index d2474352f..5be766761 100644 --- a/src/NzbDrone.Api/TinyIoCNancyBootstrapper.cs +++ b/src/NzbDrone.Api/TinyIoCNancyBootstrapper.cs @@ -31,10 +31,7 @@ public class TinyIoCNancyBootstrapper : NancyBootstrapperWithRequestContainerBas /// does not mean the assembly *will* be included, a true from another delegate will /// take precedence. /// - protected virtual IEnumerable> AutoRegisterIgnoredAssemblies - { - get { return DefaultAutoRegisterIgnoredAssemblies; } - } + protected virtual IEnumerable> AutoRegisterIgnoredAssemblies => DefaultAutoRegisterIgnoredAssemblies; /// /// Configures the container using AutoRegister followed by registration diff --git a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs index de4485a93..f835c39a6 100644 --- a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs +++ b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs @@ -47,52 +47,16 @@ public void WaitForNoSpinner(int timeout = 30) }); } - public IWebElement SeriesNavIcon - { - get - { - return FindByClass("x-series-nav"); - } - } + public IWebElement SeriesNavIcon => FindByClass("x-series-nav"); - public IWebElement CalendarNavIcon - { - get - { - return FindByClass("x-calendar-nav"); - } - } + public IWebElement CalendarNavIcon => FindByClass("x-calendar-nav"); - public IWebElement ActivityNavIcon - { - get - { - return FindByClass("x-activity-nav"); - } - } + public IWebElement ActivityNavIcon => FindByClass("x-activity-nav"); - public IWebElement WantedNavIcon - { - get - { - return FindByClass("x-wanted-nav"); - } - } + public IWebElement WantedNavIcon => FindByClass("x-wanted-nav"); - public IWebElement SettingNavIcon - { - get - { - return FindByClass("x-settings-nav"); - } - } + public IWebElement SettingNavIcon => FindByClass("x-settings-nav"); - public IWebElement SystemNavIcon - { - get - { - return FindByClass("x-system-nav"); - } - } + public IWebElement SystemNavIcon => FindByClass("x-system-nav"); } } \ No newline at end of file diff --git a/src/NzbDrone.Common/Cache/CacheManager.cs b/src/NzbDrone.Common/Cache/CacheManager.cs index ec44a8fa8..7c2ef01f3 100644 --- a/src/NzbDrone.Common/Cache/CacheManager.cs +++ b/src/NzbDrone.Common/Cache/CacheManager.cs @@ -28,7 +28,7 @@ public void Clear() _cache.Clear(); } - public ICollection Caches { get { return _cache.Values; } } + public ICollection Caches => _cache.Values; public ICached GetCache(Type host) { diff --git a/src/NzbDrone.Common/Cache/Cached.cs b/src/NzbDrone.Common/Cache/Cached.cs index f1dc9ab59..928809d30 100644 --- a/src/NzbDrone.Common/Cache/Cached.cs +++ b/src/NzbDrone.Common/Cache/Cached.cs @@ -67,13 +67,7 @@ public void Remove(string key) _store.TryRemove(key, out value); } - public int Count - { - get - { - return _store.Count; - } - } + public int Count => _store.Count; public T Get(string key, Func function, TimeSpan? lifeTime = null) { diff --git a/src/NzbDrone.Common/ConsoleService.cs b/src/NzbDrone.Common/ConsoleService.cs index b30febb6b..321831277 100644 --- a/src/NzbDrone.Common/ConsoleService.cs +++ b/src/NzbDrone.Common/ConsoleService.cs @@ -14,10 +14,7 @@ public interface IConsoleService public class ConsoleService : IConsoleService { - public static bool IsConsoleAvailable - { - get { return Console.In != StreamReader.Null; } - } + public static bool IsConsoleAvailable => Console.In != StreamReader.Null; public void PrintHelp() { diff --git a/src/NzbDrone.Common/Disk/DriveInfoMount.cs b/src/NzbDrone.Common/Disk/DriveInfoMount.cs index 5d53817a2..ac039d719 100644 --- a/src/NzbDrone.Common/Disk/DriveInfoMount.cs +++ b/src/NzbDrone.Common/Disk/DriveInfoMount.cs @@ -14,15 +14,9 @@ public DriveInfoMount(DriveInfo driveInfo, DriveType driveType = DriveType.Unkno _driveType = driveType; } - public long AvailableFreeSpace - { - get { return _driveInfo.AvailableFreeSpace; } - } + public long AvailableFreeSpace => _driveInfo.AvailableFreeSpace; - public string DriveFormat - { - get { return _driveInfo.DriveFormat; } - } + public string DriveFormat => _driveInfo.DriveFormat; public DriveType DriveType { @@ -37,35 +31,17 @@ public DriveType DriveType } } - public bool IsReady - { - get { return _driveInfo.IsReady; } - } + public bool IsReady => _driveInfo.IsReady; - public string Name - { - get { return _driveInfo.Name; } - } + public string Name => _driveInfo.Name; - public string RootDirectory - { - get { return _driveInfo.RootDirectory.FullName; } - } + public string RootDirectory => _driveInfo.RootDirectory.FullName; - public long TotalFreeSpace - { - get { return _driveInfo.TotalFreeSpace; } - } + public long TotalFreeSpace => _driveInfo.TotalFreeSpace; - public long TotalSize - { - get { return _driveInfo.TotalSize; } - } + public long TotalSize => _driveInfo.TotalSize; - public string VolumeLabel - { - get { return _driveInfo.VolumeLabel; } - } + public string VolumeLabel => _driveInfo.VolumeLabel; public string VolumeName { diff --git a/src/NzbDrone.Common/Disk/OsPath.cs b/src/NzbDrone.Common/Disk/OsPath.cs index cfd439632..bed4c67c6 100644 --- a/src/NzbDrone.Common/Disk/OsPath.cs +++ b/src/NzbDrone.Common/Disk/OsPath.cs @@ -77,28 +77,13 @@ private static string FixSlashes(string path, OsPathKind kind) return path; } - public OsPathKind Kind - { - get { return _kind; } - } + public OsPathKind Kind => _kind; - public bool IsWindowsPath - { - get { return _kind == OsPathKind.Windows; } - } + public bool IsWindowsPath => _kind == OsPathKind.Windows; - public bool IsUnixPath - { - get { return _kind == OsPathKind.Unix; } - } + public bool IsUnixPath => _kind == OsPathKind.Unix; - public bool IsEmpty - { - get - { - return _path.IsNullOrWhiteSpace(); - } - } + public bool IsEmpty => _path.IsNullOrWhiteSpace(); public bool IsRooted { @@ -132,13 +117,7 @@ public OsPath Directory } } - public string FullPath - { - get - { - return _path; - } - } + public string FullPath => _path; public string FileName { @@ -162,13 +141,7 @@ public string FileName } } - public bool IsValid - { - get - { - return _path.IsPathValid(); - } - } + public bool IsValid => _path.IsPathValid(); private int GetFileNameIndex() { diff --git a/src/NzbDrone.Common/EnvironmentInfo/BuildInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/BuildInfo.cs index 56a010dd0..03f0cd7c9 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/BuildInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/BuildInfo.cs @@ -6,10 +6,7 @@ namespace NzbDrone.Common.EnvironmentInfo { public static class BuildInfo { - public static Version Version - { - get { return Assembly.GetExecutingAssembly().GetName().Version; } - } + public static Version Version => Assembly.GetExecutingAssembly().GetName().Version; public static DateTime BuildDateTime { diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs index aaff1eec0..2db303551 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs @@ -36,18 +36,9 @@ static RuntimeInfoBase() IsProduction = InternalIsProduction(); } - public static bool IsUserInteractive - { - get { return Environment.UserInteractive; } - } + public static bool IsUserInteractive => Environment.UserInteractive; - bool IRuntimeInfo.IsUserInteractive - { - get - { - return IsUserInteractive; - } - } + bool IRuntimeInfo.IsUserInteractive => IsUserInteractive; public bool IsAdmin { diff --git a/src/NzbDrone.Common/EnvironmentInfo/StartupContext.cs b/src/NzbDrone.Common/EnvironmentInfo/StartupContext.cs index 064f57253..49925b415 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/StartupContext.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/StartupContext.cs @@ -47,21 +47,9 @@ public StartupContext(params string[] args) public HashSet Flags { get; private set; } public Dictionary Args { get; private set; } - public bool InstallService - { - get - { - return Flags.Contains(INSTALL_SERVICE); - } - } + public bool InstallService => Flags.Contains(INSTALL_SERVICE); - public bool UninstallService - { - get - { - return Flags.Contains(UNINSTALL_SERVICE); - } - } + public bool UninstallService => Flags.Contains(UNINSTALL_SERVICE); public string PreservedArguments { diff --git a/src/NzbDrone.Common/Exceptron/ExceptronClient.cs b/src/NzbDrone.Common/Exceptron/ExceptronClient.cs index 5dca71a4b..e87844eb7 100644 --- a/src/NzbDrone.Common/Exceptron/ExceptronClient.cs +++ b/src/NzbDrone.Common/Exceptron/ExceptronClient.cs @@ -15,19 +15,13 @@ public class ExceptronClient : IExceptronClient /// /// Version of Client /// - public string ClientVersion - { - get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } - } + public string ClientVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString(); /// /// Name of Client /// - public string ClientName - { - get { return "Official .NET"; } - } + public string ClientName => "Official .NET"; /// /// Client Configuration diff --git a/src/NzbDrone.Common/Exceptron/Message/ExceptionResponse.cs b/src/NzbDrone.Common/Exceptron/Message/ExceptionResponse.cs index 92dbd2b4c..7fad1ba3f 100644 --- a/src/NzbDrone.Common/Exceptron/Message/ExceptionResponse.cs +++ b/src/NzbDrone.Common/Exceptron/Message/ExceptionResponse.cs @@ -14,13 +14,7 @@ public class ExceptionResponse /// /// Was the report successfully processed on the server /// - public bool Successful - { - get - { - return !string.IsNullOrEmpty(RefId); - } - } + public bool Successful => !string.IsNullOrEmpty(RefId); /// /// Exception that caused the message to fail. diff --git a/src/NzbDrone.Common/Exceptron/fastJSON/SafeDictionary.cs b/src/NzbDrone.Common/Exceptron/fastJSON/SafeDictionary.cs index d35b98b49..a4cb5f06b 100644 --- a/src/NzbDrone.Common/Exceptron/fastJSON/SafeDictionary.cs +++ b/src/NzbDrone.Common/Exceptron/fastJSON/SafeDictionary.cs @@ -16,13 +16,7 @@ internal bool TryGetValue(TKey key, out TValue value) return _Dictionary.TryGetValue(key, out value); } - internal TValue this[TKey key] - { - get - { - return _Dictionary[key]; - } - } + internal TValue this[TKey key] => _Dictionary[key]; internal void Add(TKey key, TValue value) { diff --git a/src/NzbDrone.Common/Http/Dispatchers/CurlHttpDispatcher.cs b/src/NzbDrone.Common/Http/Dispatchers/CurlHttpDispatcher.cs index 0399dc914..2c456536c 100644 --- a/src/NzbDrone.Common/Http/Dispatchers/CurlHttpDispatcher.cs +++ b/src/NzbDrone.Common/Http/Dispatchers/CurlHttpDispatcher.cs @@ -328,9 +328,6 @@ protected override bool ReleaseHandle() return true; } - public override bool IsInvalid - { - get { return !_initialized || !_available; } - } + public override bool IsInvalid => !_initialized || !_available; } } diff --git a/src/NzbDrone.Common/Http/HttpResponse.cs b/src/NzbDrone.Common/Http/HttpResponse.cs index bbbf71d11..dd9df22c7 100644 --- a/src/NzbDrone.Common/Http/HttpResponse.cs +++ b/src/NzbDrone.Common/Http/HttpResponse.cs @@ -49,13 +49,7 @@ public string Content } - public bool HasHttpError - { - get - { - return (int)StatusCode >= 400; - } - } + public bool HasHttpError => (int)StatusCode >= 400; public Dictionary GetCookies() { diff --git a/src/NzbDrone.Common/Http/HttpUri.cs b/src/NzbDrone.Common/Http/HttpUri.cs index a52a06137..7e295780b 100644 --- a/src/NzbDrone.Common/Http/HttpUri.cs +++ b/src/NzbDrone.Common/Http/HttpUri.cs @@ -13,7 +13,7 @@ public class HttpUri : IEquatable private static readonly Regex RegexUri = new Regex(@"^(?:(?[a-z]+):)?(?://(?[-A-Z0-9.]+)(?::(?[0-9]{1,5}))?)?(?(?:(?:(?<=^)|/)[^/?#\r\n]+)+/?|/)?(?:\?(?[^#\r\n]*))?(?:\#(?.*))?$", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly string _uri; - public string FullUri { get { return _uri; } } + public string FullUri => _uri; public HttpUri(string uri) { diff --git a/src/NzbDrone.Common/Http/Proxy/HttpProxySettings.cs b/src/NzbDrone.Common/Http/Proxy/HttpProxySettings.cs index 84664bf8a..28dda0abc 100644 --- a/src/NzbDrone.Common/Http/Proxy/HttpProxySettings.cs +++ b/src/NzbDrone.Common/Http/Proxy/HttpProxySettings.cs @@ -45,19 +45,13 @@ public string[] BypassListAsArray } } - public string Key - { - get - { - return string.Join("_", - Type, - Host, - Port, - Username, - Password, - BypassFilter, - BypassLocalAddress); - } - } + public string Key => string.Join("_", + Type, + Host, + Port, + Username, + Password, + BypassFilter, + BypassLocalAddress); } } diff --git a/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs b/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs index bc17dcc95..8e336668e 100644 --- a/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs +++ b/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs @@ -111,7 +111,7 @@ protected sealed override bool TryDequeue(Task task) } /// Gets the maximum concurrency level supported by this scheduler. - public sealed override int MaximumConcurrencyLevel { get { return _maxDegreeOfParallelism; } } + public sealed override int MaximumConcurrencyLevel => _maxDegreeOfParallelism; /// Gets an enumerable of the tasks currently scheduled on this scheduler. /// An enumerable of the tasks currently scheduled. diff --git a/src/NzbDrone.Common/TinyIoC.cs b/src/NzbDrone.Common/TinyIoC.cs index 72b55f13a..7c5d7196f 100644 --- a/src/NzbDrone.Common/TinyIoC.cs +++ b/src/NzbDrone.Common/TinyIoC.cs @@ -669,13 +669,7 @@ public NamedParameterOverloads(IDictionary data) private static readonly NamedParameterOverloads _Default = new NamedParameterOverloads(); - public static NamedParameterOverloads Default - { - get - { - return _Default; - } - } + public static NamedParameterOverloads Default => _Default; } public enum UnregisteredResolutionActions @@ -741,46 +735,22 @@ public NamedResolutionFailureActions NamedResolutionFailureAction /// /// Gets the default options (attempt resolution of unregistered types, fail on named resolution if name not found) /// - public static ResolveOptions Default - { - get - { - return _Default; - } - } + public static ResolveOptions Default => _Default; /// /// Preconfigured option for attempting resolution of unregistered types and failing on named resolution if name not found /// - public static ResolveOptions FailNameNotFoundOnly - { - get - { - return _FailNameNotFoundOnly; - } - } + public static ResolveOptions FailNameNotFoundOnly => _FailNameNotFoundOnly; /// /// Preconfigured option for failing on resolving unregistered types and on named resolution if name not found /// - public static ResolveOptions FailUnregisteredAndNameNotFound - { - get - { - return _FailUnregisteredAndNameNotFound; - } - } + public static ResolveOptions FailUnregisteredAndNameNotFound => _FailUnregisteredAndNameNotFound; /// /// Preconfigured option for failing on resolving unregistered types, but attempting unnamed resolution if name not found /// - public static ResolveOptions FailUnregisteredOnly - { - get - { - return _FailUnregisteredOnly; - } - } + public static ResolveOptions FailUnregisteredOnly => _FailUnregisteredOnly; } #endregion @@ -2394,7 +2364,7 @@ private abstract class ObjectFactoryBase /// Generally set to true for delegate style factories as CanResolve cannot delve /// into the delegates they contain. /// - public virtual bool AssumeConstruction { get { return false; } } + public virtual bool AssumeConstruction => false; /// /// The type the factory instantiates @@ -2471,7 +2441,7 @@ private class MultiInstanceFactory : ObjectFactoryBase { private readonly Type registerType; private readonly Type registerImplementation; - public override Type CreatesType { get { return this.registerImplementation; } } + public override Type CreatesType => this.registerImplementation; public MultiInstanceFactory(Type registerType, Type registerImplementation) { @@ -2501,26 +2471,14 @@ public override object GetObject(Type requestedType, TinyIoCContainer container, } } - public override ObjectFactoryBase SingletonVariant - { - get - { - return new SingletonFactory(this.registerType, this.registerImplementation); - } - } + public override ObjectFactoryBase SingletonVariant => new SingletonFactory(this.registerType, this.registerImplementation); public override ObjectFactoryBase GetCustomObjectLifetimeVariant(ITinyIoCObjectLifetimeProvider lifetimeProvider, string errorString) { return new CustomObjectLifetimeFactory(this.registerType, this.registerImplementation, lifetimeProvider, errorString); } - public override ObjectFactoryBase MultiInstanceVariant - { - get - { - return this; - } - } + public override ObjectFactoryBase MultiInstanceVariant => this; } /// @@ -2532,9 +2490,9 @@ private class DelegateFactory : ObjectFactoryBase private Func _factory; - public override bool AssumeConstruction { get { return true; } } + public override bool AssumeConstruction => true; - public override Type CreatesType { get { return this.registerType; } } + public override Type CreatesType => this.registerType; public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) { @@ -2558,21 +2516,9 @@ public DelegateFactory(Type registerType, Func new WeakDelegateFactory(this.registerType, _factory); - public override ObjectFactoryBase StrongReferenceVariant - { - get - { - return this; - } - } + public override ObjectFactoryBase StrongReferenceVariant => this; public override void SetConstructor(ConstructorInfo constructor) { @@ -2590,9 +2536,9 @@ private class WeakDelegateFactory : ObjectFactoryBase private WeakReference _factory; - public override bool AssumeConstruction { get { return true; } } + public override bool AssumeConstruction => true; - public override Type CreatesType { get { return this.registerType; } } + public override Type CreatesType => this.registerType; public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) { @@ -2634,13 +2580,7 @@ public override ObjectFactoryBase StrongReferenceVariant } } - public override ObjectFactoryBase WeakReferenceVariant - { - get - { - return this; - } - } + public override ObjectFactoryBase WeakReferenceVariant => this; public override void SetConstructor(ConstructorInfo constructor) { @@ -2657,7 +2597,7 @@ private class InstanceFactory : ObjectFactoryBase, IDisposable private readonly Type registerImplementation; private object _instance; - public override bool AssumeConstruction { get { return true; } } + public override bool AssumeConstruction => true; public InstanceFactory(Type registerType, Type registerImplementation, object instance) { @@ -2669,36 +2609,18 @@ public InstanceFactory(Type registerType, Type registerImplementation, object in _instance = instance; } - public override Type CreatesType - { - get { return this.registerImplementation; } - } + public override Type CreatesType => this.registerImplementation; public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) { return _instance; } - public override ObjectFactoryBase MultiInstanceVariant - { - get { return new MultiInstanceFactory(this.registerType, this.registerImplementation); } - } + public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this.registerType, this.registerImplementation); - public override ObjectFactoryBase WeakReferenceVariant - { - get - { - return new WeakInstanceFactory(this.registerType, this.registerImplementation, this._instance); - } - } + public override ObjectFactoryBase WeakReferenceVariant => new WeakInstanceFactory(this.registerType, this.registerImplementation, this._instance); - public override ObjectFactoryBase StrongReferenceVariant - { - get - { - return this; - } - } + public override ObjectFactoryBase StrongReferenceVariant => this; public override void SetConstructor(ConstructorInfo constructor) { @@ -2735,10 +2657,7 @@ public WeakInstanceFactory(Type registerType, Type registerImplementation, objec _instance = new WeakReference(instance); } - public override Type CreatesType - { - get { return this.registerImplementation; } - } + public override Type CreatesType => this.registerImplementation; public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) { @@ -2750,21 +2669,9 @@ public override object GetObject(Type requestedType, TinyIoCContainer container, return instance; } - public override ObjectFactoryBase MultiInstanceVariant - { - get - { - return new MultiInstanceFactory(this.registerType, this.registerImplementation); - } - } + public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this.registerType, this.registerImplementation); - public override ObjectFactoryBase WeakReferenceVariant - { - get - { - return this; - } - } + public override ObjectFactoryBase WeakReferenceVariant => this; public override ObjectFactoryBase StrongReferenceVariant { @@ -2819,10 +2726,7 @@ public SingletonFactory(Type registerType, Type registerImplementation) this.registerImplementation = registerImplementation; } - public override Type CreatesType - { - get { return this.registerImplementation; } - } + public override Type CreatesType => this.registerImplementation; public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) { @@ -2836,26 +2740,14 @@ public override object GetObject(Type requestedType, TinyIoCContainer container, return _Current; } - public override ObjectFactoryBase SingletonVariant - { - get - { - return this; - } - } + public override ObjectFactoryBase SingletonVariant => this; public override ObjectFactoryBase GetCustomObjectLifetimeVariant(ITinyIoCObjectLifetimeProvider lifetimeProvider, string errorString) { return new CustomObjectLifetimeFactory(this.registerType, this.registerImplementation, lifetimeProvider, errorString); } - public override ObjectFactoryBase MultiInstanceVariant - { - get - { - return new MultiInstanceFactory(this.registerType, this.registerImplementation); - } - } + public override ObjectFactoryBase MultiInstanceVariant => new MultiInstanceFactory(this.registerType, this.registerImplementation); public override ObjectFactoryBase GetFactoryForChildContainer(Type type, TinyIoCContainer parent, TinyIoCContainer child) { @@ -2908,10 +2800,7 @@ public CustomObjectLifetimeFactory(Type registerType, Type registerImplementatio _LifetimeProvider = lifetimeProvider; } - public override Type CreatesType - { - get { return this.registerImplementation; } - } + public override Type CreatesType => this.registerImplementation; public override object GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options) { @@ -2980,13 +2869,8 @@ static TinyIoCContainer() /// /// Lazy created Singleton instance of the container for simple scenarios /// - public static TinyIoCContainer Current - { - get - { - return _Current; - } - } + public static TinyIoCContainer Current => _Current; + #endregion #region Type Registrations diff --git a/src/NzbDrone.Core.Test/Framework/DbTest.cs b/src/NzbDrone.Core.Test/Framework/DbTest.cs index ae59fbe23..f1ee43be5 100644 --- a/src/NzbDrone.Core.Test/Framework/DbTest.cs +++ b/src/NzbDrone.Core.Test/Framework/DbTest.cs @@ -23,21 +23,9 @@ public abstract class DbTest : DbTest protected BasicRepository Storage { get; private set; } - protected IList AllStoredModels - { - get - { - return Storage.All().ToList(); - } - } + protected IList AllStoredModels => Storage.All().ToList(); - protected TModel StoredModel - { - get - { - return Storage.All().Single(); - } - } + protected TModel StoredModel => Storage.All().Single(); [SetUp] public void CoreTestSetup() @@ -66,13 +54,7 @@ public abstract class DbTest : CoreTest { private ITestDatabase _db; - protected virtual MigrationType MigrationType - { - get - { - return MigrationType.Main; - } - } + protected virtual MigrationType MigrationType => MigrationType.Main; protected ITestDatabase Db { diff --git a/src/NzbDrone.Core.Test/Framework/MigrationTest.cs b/src/NzbDrone.Core.Test/Framework/MigrationTest.cs index 1a49bedfd..c1d0bfb21 100644 --- a/src/NzbDrone.Core.Test/Framework/MigrationTest.cs +++ b/src/NzbDrone.Core.Test/Framework/MigrationTest.cs @@ -45,9 +45,6 @@ public override void SetupDb() } [Obsolete("Don't use Mocker/Repositories in MigrationTests, query the DB.", true)] - public new AutoMoqer Mocker - { - get { return base.Mocker; } - } + public new AutoMoqer Mocker => base.Mocker; } } \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs b/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs index 528a88104..856f1900a 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs @@ -9,18 +9,12 @@ namespace NzbDrone.Core.Test.IndexerTests { public class TestIndexer : HttpIndexerBase { - public override string Name - { - get - { - return "Test Indexer"; - } - } + public override string Name => "Test Indexer"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Usenet; } } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; public int _supportedPageSize; - public override int PageSize { get { return _supportedPageSize; } } + public override int PageSize => _supportedPageSize; public TestIndexer(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs b/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs index ae7393eee..ad614e646 100644 --- a/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs +++ b/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs @@ -20,14 +20,8 @@ public class DatabaseTargetFixture : DbTest private static string _uniqueMessage; Logger _logger; - protected override MigrationType MigrationType - { - get - { - return MigrationType.Log; + protected override MigrationType MigrationType => MigrationType.Log; - } - } [SetUp] public void Setup() { diff --git a/src/NzbDrone.Core/Analytics/AnalyticsService.cs b/src/NzbDrone.Core/Analytics/AnalyticsService.cs index 8901817a9..0ddb9813d 100644 --- a/src/NzbDrone.Core/Analytics/AnalyticsService.cs +++ b/src/NzbDrone.Core/Analytics/AnalyticsService.cs @@ -17,12 +17,6 @@ public AnalyticsService(IConfigFileProvider configFileProvider) _configFileProvider = configFileProvider; } - public bool IsEnabled - { - get - { - return _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction; - } - } + public bool IsEnabled => _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Backup/BackupCommand.cs b/src/NzbDrone.Core/Backup/BackupCommand.cs index 72fd2ddcc..3a852cf7a 100644 --- a/src/NzbDrone.Core/Backup/BackupCommand.cs +++ b/src/NzbDrone.Core/Backup/BackupCommand.cs @@ -6,21 +6,9 @@ public class BackupCommand : Command { public BackupType Type { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; - public override bool UpdateScheduledTask - { - get - { - return Type == BackupType.Scheduled; - } - } + public override bool UpdateScheduledTask => Type == BackupType.Scheduled; } public enum BackupType diff --git a/src/NzbDrone.Core/Blacklisting/ClearBlacklistCommand.cs b/src/NzbDrone.Core/Blacklisting/ClearBlacklistCommand.cs index 03e9b2e5e..d8aa3af0a 100644 --- a/src/NzbDrone.Core/Blacklisting/ClearBlacklistCommand.cs +++ b/src/NzbDrone.Core/Blacklisting/ClearBlacklistCommand.cs @@ -4,12 +4,6 @@ namespace NzbDrone.Core.Blacklisting { public class ClearBlacklistCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs index a9bad109d..fa6d8a914 100644 --- a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs +++ b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs @@ -133,33 +133,15 @@ public string BindAddress } } - public int Port - { - get { return GetValueInt("Port", 8989); } - } + public int Port => GetValueInt("Port", 8989); - public int SslPort - { - get { return GetValueInt("SslPort", 9898); } - } + public int SslPort => GetValueInt("SslPort", 9898); - public bool EnableSsl - { - get { return GetValueBoolean("EnableSsl", false); } - } + public bool EnableSsl => GetValueBoolean("EnableSsl", false); - public bool LaunchBrowser - { - get { return GetValueBoolean("LaunchBrowser", true); } - } + public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true); - public string ApiKey - { - get - { - return GetValue("ApiKey", GenerateApiKey()); - } - } + public string ApiKey => GetValue("ApiKey", GenerateApiKey()); public AuthenticationType AuthenticationMethod { @@ -177,28 +159,13 @@ public AuthenticationType AuthenticationMethod } } - public bool AnalyticsEnabled - { - get - { - return GetValueBoolean("AnalyticsEnabled", true, persist: false); - } - } + public bool AnalyticsEnabled => GetValueBoolean("AnalyticsEnabled", true, persist: false); - public string Branch - { - get { return GetValue("Branch", "master").ToLowerInvariant(); } - } + public string Branch => GetValue("Branch", "master").ToLowerInvariant(); - public string LogLevel - { - get { return GetValue("LogLevel", "Info"); } - } + public string LogLevel => GetValue("LogLevel", "Info"); - public string SslCertHash - { - get { return GetValue("SslCertHash", ""); } - } + public string SslCertHash => GetValue("SslCertHash", ""); public string UrlBase { @@ -215,28 +182,13 @@ public string UrlBase } } - public string UiFolder - { - get - { - return GetValue("UiFolder", "UI", false); - } - } + public string UiFolder => GetValue("UiFolder", "UI", false); - public bool UpdateAutomatically - { - get { return GetValueBoolean("UpdateAutomatically", false, false); } - } + public bool UpdateAutomatically => GetValueBoolean("UpdateAutomatically", false, false); - public UpdateMechanism UpdateMechanism - { - get { return GetValueEnum("UpdateMechanism", UpdateMechanism.BuiltIn, false); } - } + public UpdateMechanism UpdateMechanism => GetValueEnum("UpdateMechanism", UpdateMechanism.BuiltIn, false); - public string UpdateScriptPath - { - get { return GetValue("UpdateScriptPath", "", false ); } - } + public string UpdateScriptPath => GetValue("UpdateScriptPath", "", false ); public int GetValueInt(string key, int defaultValue) { diff --git a/src/NzbDrone.Core/Configuration/ConfigService.cs b/src/NzbDrone.Core/Configuration/ConfigService.cs index e1ac74ee8..4eae607ae 100644 --- a/src/NzbDrone.Core/Configuration/ConfigService.cs +++ b/src/NzbDrone.Core/Configuration/ConfigService.cs @@ -300,65 +300,29 @@ public bool CleanupMetadataImages set { SetValue("CleanupMetadataImages", value); } } - public string RijndaelPassphrase - { - get { return GetValue("RijndaelPassphrase", Guid.NewGuid().ToString(), true); } - } + public string RijndaelPassphrase => GetValue("RijndaelPassphrase", Guid.NewGuid().ToString(), true); - public string HmacPassphrase - { - get { return GetValue("HmacPassphrase", Guid.NewGuid().ToString(), true); } - } + public string HmacPassphrase => GetValue("HmacPassphrase", Guid.NewGuid().ToString(), true); - public string RijndaelSalt - { - get { return GetValue("RijndaelSalt", Guid.NewGuid().ToString(), true); } - } + public string RijndaelSalt => GetValue("RijndaelSalt", Guid.NewGuid().ToString(), true); - public string HmacSalt - { - get { return GetValue("HmacSalt", Guid.NewGuid().ToString(), true); } - } + public string HmacSalt => GetValue("HmacSalt", Guid.NewGuid().ToString(), true); - public bool ProxyEnabled - { - get { return GetValueBoolean("ProxyEnabled", false); } - } + public bool ProxyEnabled => GetValueBoolean("ProxyEnabled", false); - public ProxyType ProxyType - { - get { return GetValueEnum("ProxyType", ProxyType.Http); } - } + public ProxyType ProxyType => GetValueEnum("ProxyType", ProxyType.Http); - public string ProxyHostname - { - get { return GetValue("ProxyHostname", string.Empty); } - } + public string ProxyHostname => GetValue("ProxyHostname", string.Empty); - public int ProxyPort - { - get { return GetValueInt("ProxyPort", 8080); } - } + public int ProxyPort => GetValueInt("ProxyPort", 8080); - public string ProxyUsername - { - get { return GetValue("ProxyUsername", string.Empty); } - } + public string ProxyUsername => GetValue("ProxyUsername", string.Empty); - public string ProxyPassword - { - get { return GetValue("ProxyPassword", string.Empty); } - } + public string ProxyPassword => GetValue("ProxyPassword", string.Empty); - public string ProxyBypassFilter - { - get { return GetValue("ProxyBypassFilter", string.Empty); } - } + public string ProxyBypassFilter => GetValue("ProxyBypassFilter", string.Empty); - public bool ProxyBypassLocalAddresses - { - get { return GetValueBoolean("ProxyBypassLocalAddresses", true); } - } + public bool ProxyBypassLocalAddresses => GetValueBoolean("ProxyBypassLocalAddresses", true); private string GetValue(string key) { diff --git a/src/NzbDrone.Core/Configuration/ResetApiKeyCommand.cs b/src/NzbDrone.Core/Configuration/ResetApiKeyCommand.cs index 54ab97643..f8bf1b5d8 100644 --- a/src/NzbDrone.Core/Configuration/ResetApiKeyCommand.cs +++ b/src/NzbDrone.Core/Configuration/ResetApiKeyCommand.cs @@ -4,12 +4,6 @@ namespace NzbDrone.Core.Configuration { public class ResetApiKeyCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } diff --git a/src/NzbDrone.Core/Datastore/BasicRepository.cs b/src/NzbDrone.Core/Datastore/BasicRepository.cs index 0e7531580..db36edc1e 100644 --- a/src/NzbDrone.Core/Datastore/BasicRepository.cs +++ b/src/NzbDrone.Core/Datastore/BasicRepository.cs @@ -40,10 +40,7 @@ namespace NzbDrone.Core.Datastore private readonly IDatabase _database; private readonly IEventAggregator _eventAggregator; - protected IDataMapper DataMapper - { - get { return _database.GetDataMapper(); } - } + protected IDataMapper DataMapper => _database.GetDataMapper(); public BasicRepository(IDatabase database, IEventAggregator eventAggregator) { @@ -51,10 +48,7 @@ public BasicRepository(IDatabase database, IEventAggregator eventAggregator) _eventAggregator = eventAggregator; } - protected QueryBuilder Query - { - get { return DataMapper.Query(); } - } + protected QueryBuilder Query => DataMapper.Query(); protected void Delete(Expression> filter) { @@ -289,9 +283,6 @@ private void PublishModelEvent(TModel model, ModelAction action) } } - protected virtual bool PublishModelEvents - { - get { return false; } - } + protected virtual bool PublishModelEvents => false; } } diff --git a/src/NzbDrone.Core/Datastore/Converters/BooleanIntConverter.cs b/src/NzbDrone.Core/Datastore/Converters/BooleanIntConverter.cs index df5980e08..397746b23 100644 --- a/src/NzbDrone.Core/Datastore/Converters/BooleanIntConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/BooleanIntConverter.cs @@ -46,12 +46,6 @@ public object ToDB(object clrValue) } } - public Type DbType - { - get - { - return typeof(int); - } - } + public Type DbType => typeof(int); } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs b/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs index 222c53b2a..d5321d794 100644 --- a/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs @@ -60,12 +60,6 @@ public object ToDB(object clrValue) return JsonConvert.SerializeObject(clrValue, SerializerSetting); } - public Type DbType - { - get - { - return typeof(string); - } - } + public Type DbType => typeof(string); } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Datastore/Converters/EnumIntConverter.cs b/src/NzbDrone.Core/Datastore/Converters/EnumIntConverter.cs index e7a17ed1e..22d6b5336 100644 --- a/src/NzbDrone.Core/Datastore/Converters/EnumIntConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/EnumIntConverter.cs @@ -6,13 +6,7 @@ namespace NzbDrone.Core.Datastore.Converters { public class EnumIntConverter : IConverter { - public Type DbType - { - get - { - return typeof(int); - } - } + public Type DbType => typeof(int); public object FromDB(ConverterContext context) { diff --git a/src/NzbDrone.Core/Datastore/Converters/GuidConverter.cs b/src/NzbDrone.Core/Datastore/Converters/GuidConverter.cs index d26cb9928..b2bf33526 100644 --- a/src/NzbDrone.Core/Datastore/Converters/GuidConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/GuidConverter.cs @@ -30,9 +30,6 @@ public object ToDB(object clrValue) return value.ToString(); } - public Type DbType - { - get { return typeof(string); } - } + public Type DbType => typeof(string); } } diff --git a/src/NzbDrone.Core/Datastore/Converters/OsPathConverter.cs b/src/NzbDrone.Core/Datastore/Converters/OsPathConverter.cs index ba35fef3d..ba2b239fd 100644 --- a/src/NzbDrone.Core/Datastore/Converters/OsPathConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/OsPathConverter.cs @@ -31,9 +31,6 @@ public object ToDB(object clrValue) return value.FullPath; } - public Type DbType - { - get { return typeof(string); } - } + public Type DbType => typeof(string); } } diff --git a/src/NzbDrone.Core/Datastore/Converters/QualityIntConverter.cs b/src/NzbDrone.Core/Datastore/Converters/QualityIntConverter.cs index 18fd52eb2..254dde15e 100644 --- a/src/NzbDrone.Core/Datastore/Converters/QualityIntConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/QualityIntConverter.cs @@ -38,13 +38,7 @@ public object ToDB(object clrValue) return (int)quality; } - public Type DbType - { - get - { - return typeof(int); - } - } + public Type DbType => typeof(int); public override bool CanConvert(Type objectType) { diff --git a/src/NzbDrone.Core/Datastore/Converters/UtcConverter.cs b/src/NzbDrone.Core/Datastore/Converters/UtcConverter.cs index 25d313a6c..1225f0806 100644 --- a/src/NzbDrone.Core/Datastore/Converters/UtcConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/UtcConverter.cs @@ -27,12 +27,6 @@ public object ToDB(object clrValue) return dateTime.ToUniversalTime(); } - public Type DbType - { - get - { - return typeof(DateTime); - } - } + public Type DbType => typeof(DateTime); } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Datastore/LogDatabase.cs b/src/NzbDrone.Core/Datastore/LogDatabase.cs index a76183ae0..403d495e6 100644 --- a/src/NzbDrone.Core/Datastore/LogDatabase.cs +++ b/src/NzbDrone.Core/Datastore/LogDatabase.cs @@ -25,10 +25,7 @@ public IDataMapper GetDataMapper() return _database.GetDataMapper(); } - public Version Version - { - get { return _database.Version; } - } + public Version Version => _database.Version; public void Vacuum() { diff --git a/src/NzbDrone.Core/Datastore/MainDatabase.cs b/src/NzbDrone.Core/Datastore/MainDatabase.cs index 6b3406151..632e569ce 100644 --- a/src/NzbDrone.Core/Datastore/MainDatabase.cs +++ b/src/NzbDrone.Core/Datastore/MainDatabase.cs @@ -25,10 +25,7 @@ public IDataMapper GetDataMapper() return _database.GetDataMapper(); } - public Version Version - { - get { return _database.Version; } - } + public Version Version => _database.Version; public void Vacuum() { diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs index 8c42dbc6c..79a9eca45 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs @@ -18,13 +18,7 @@ public NzbDroneSqliteProcessor(IDbConnection connection, IMigrationGenerator gen } - public override bool SupportsTransactions - { - get - { - return true; - } - } + public override bool SupportsTransactions => true; public override void Process(AlterColumnExpression expression) { diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs index 3eb4b3ffd..e60ef4c70 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSyntaxReader.cs @@ -16,15 +16,9 @@ public class SqliteSyntaxReader public TokenType Type { get; private set; } public string Value { get; private set; } - public string ValueToUpper - { - get { return Value.ToUpperInvariant(); } - } + public string ValueToUpper => Value.ToUpperInvariant(); - public bool IsEndOfFile - { - get { return Index >= Buffer.Length; } - } + public bool IsEndOfFile => Index >= Buffer.Length; public enum TokenType { diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs index b10ed9d09..cad8177cb 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs @@ -9,13 +9,7 @@ public class DownloadDecision public RemoteEpisode RemoteEpisode { get; private set; } public IEnumerable Rejections { get; private set; } - public bool Approved - { - get - { - return !Rejections.Any(); - } - } + public bool Approved => !Rejections.Any(); public bool TemporarilyRejected { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs index 6e05e7717..4ab566d2e 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs @@ -22,7 +22,7 @@ public AcceptableSizeSpecification(IQualityDefinitionService qualityDefinitionSe _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/AnimeVersionUpgradeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/AnimeVersionUpgradeSpecification.cs index 13e632daa..c2f93f7c0 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/AnimeVersionUpgradeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/AnimeVersionUpgradeSpecification.cs @@ -18,7 +18,7 @@ public AnimeVersionUpgradeSpecification(QualityUpgradableSpecification qualityUp _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs index d3b1bd523..9bbf12732 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs @@ -17,7 +17,7 @@ public BlacklistSpecification(IBlacklistService blacklistService, Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs index a45d27fba..6dfdbc64c 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs @@ -16,7 +16,7 @@ public CutoffSpecification(QualityUpgradableSpecification qualityUpgradableSpeci _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/FullSeasonSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/FullSeasonSpecification.cs index 301e28077..023b6be60 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/FullSeasonSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/FullSeasonSpecification.cs @@ -19,7 +19,7 @@ public FullSeasonSpecification(Logger logger, IEpisodeService episodeService) _episodeService = episodeService; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/LanguageSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/LanguageSpecification.cs index 54bbecce1..9f7f75038 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/LanguageSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/LanguageSpecification.cs @@ -13,7 +13,7 @@ public LanguageSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/MinimumAgeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/MinimumAgeSpecification.cs index a46b3f0fc..449d7be76 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/MinimumAgeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/MinimumAgeSpecification.cs @@ -16,7 +16,7 @@ public MinimumAgeSpecification(IConfigService configService, Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Temporary; } } + public RejectionType Type => RejectionType.Temporary; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs index da2c4bc35..02ff7653a 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs @@ -8,7 +8,7 @@ public class NotSampleSpecification : IDecisionEngineSpecification { private readonly Logger _logger; - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public NotSampleSpecification(Logger logger) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/ProtocolSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/ProtocolSpecification.cs index 60df58f61..008e58812 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/ProtocolSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/ProtocolSpecification.cs @@ -18,7 +18,7 @@ public ProtocolSpecification(IDelayProfileService delayProfileService, _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs index 3e8b7259d..7913e0e7e 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs @@ -13,7 +13,7 @@ public QualityAllowedByProfileSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/QueueSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/QueueSpecification.cs index 9c2c31a3e..09431855a 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/QueueSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/QueueSpecification.cs @@ -23,7 +23,7 @@ public QueueSpecification(IQueueService queueService, _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs index e4a1995c7..7f278cb7e 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs @@ -19,7 +19,7 @@ public RawDiskSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/ReleaseRestrictionsSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/ReleaseRestrictionsSpecification.cs index 4fe6e5643..9fb8c13f5 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/ReleaseRestrictionsSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/ReleaseRestrictionsSpecification.cs @@ -20,7 +20,7 @@ public ReleaseRestrictionsSpecification(IRestrictionService restrictionService, _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RetentionSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RetentionSpecification.cs index 449b1c4ab..97802f871 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RetentionSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RetentionSpecification.cs @@ -16,7 +16,7 @@ public RetentionSpecification(IConfigService configService, Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs index 1f440b41e..68551c66c 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs @@ -26,7 +26,7 @@ public DelaySpecification(IPendingReleaseService pendingReleaseService, _logger = logger; } - public RejectionType Type { get { return RejectionType.Temporary; } } + public RejectionType Type => RejectionType.Temporary; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs index 159678d88..9aa4fabf1 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs @@ -26,7 +26,7 @@ public HistorySpecification(IHistoryService historyService, _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/MonitoredEpisodeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/MonitoredEpisodeSpecification.cs index 94739b1e9..f56f26478 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/MonitoredEpisodeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/MonitoredEpisodeSpecification.cs @@ -14,7 +14,7 @@ public MonitoredEpisodeSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs index 151b45e46..0c6632d25 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs @@ -20,7 +20,7 @@ public ProperSpecification(QualityUpgradableSpecification qualityUpgradableSpeci _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/SameEpisodesGrabSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/SameEpisodesGrabSpecification.cs index 2afea3032..1a8c5db5b 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/SameEpisodesGrabSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/SameEpisodesGrabSpecification.cs @@ -15,7 +15,7 @@ public SameEpisodesGrabSpecification(SameEpisodesSpecification sameEpisodesSpeci _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/DailyEpisodeMatchSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/DailyEpisodeMatchSpecification.cs index fe21a2537..50fd9b3cc 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/DailyEpisodeMatchSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/DailyEpisodeMatchSpecification.cs @@ -16,7 +16,7 @@ public DailyEpisodeMatchSpecification(Logger logger, IEpisodeService episodeServ _episodeService = episodeService; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/EpisodeRequestedSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/EpisodeRequestedSpecification.cs index fa4538546..60640442f 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/EpisodeRequestedSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/EpisodeRequestedSpecification.cs @@ -15,7 +15,7 @@ public EpisodeRequestedSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeasonMatchSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeasonMatchSpecification.cs index 6a3cad319..b09d888ec 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeasonMatchSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeasonMatchSpecification.cs @@ -13,7 +13,7 @@ public SeasonMatchSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeriesSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeriesSpecification.cs index 2ce382f6a..7f1201b33 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeriesSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SeriesSpecification.cs @@ -13,7 +13,7 @@ public SeriesSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SingleEpisodeSearchMatchSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SingleEpisodeSearchMatchSpecification.cs index 3ac1a6991..fb056734f 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SingleEpisodeSearchMatchSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/SingleEpisodeSearchMatchSpecification.cs @@ -14,7 +14,7 @@ public SingleEpisodeSearchMatchSpecification(Logger logger) _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/TorrentSeedingSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/TorrentSeedingSpecification.cs index ab8571cdb..87c244b53 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/Search/TorrentSeedingSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/Search/TorrentSeedingSpecification.cs @@ -13,13 +13,7 @@ public TorrentSeedingSpecification(Logger logger) _logger = logger; } - public RejectionType Type - { - get - { - return RejectionType.Permanent; - } - } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria) diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs index 3520f6d6a..5a24b6305 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs @@ -16,7 +16,7 @@ public UpgradeDiskSpecification(QualityUpgradableSpecification qualityUpgradable _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs index 5617df565..1aba08bca 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs @@ -24,13 +24,7 @@ public class TorrentBlackhole : TorrentClientBase public TimeSpan ScanGracePeriod { get; set; } - public override bool PreferTorrentFile - { - get - { - return true; - } - } + public override bool PreferTorrentFile => true; public TorrentBlackhole(IScanWatchFolder scanWatchFolder, ITorrentFileInfoReader torrentFileInfoReader, @@ -88,22 +82,9 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string return null; } - public override string Name - { - get - { - return "Torrent Blackhole"; - } - } - - public override ProviderMessage Message - { - get - { - return new ProviderMessage("Magnet links are not supported.", ProviderMessageType.Warning); - } - } + public override string Name => "Torrent Blackhole"; + public override ProviderMessage Message => new ProviderMessage("Magnet links are not supported.", ProviderMessageType.Warning); public override IEnumerable GetItems() diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs index 52377e339..9dce62231 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs @@ -52,13 +52,7 @@ protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string fil return null; } - public override string Name - { - get - { - return "Usenet Blackhole"; - } - } + public override string Name => "Usenet Blackhole"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index 6d2b81cba..39174d3b8 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -75,13 +75,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string return actualHash.ToUpper(); } - public override string Name - { - get - { - return "Deluge"; - } - } + public override string Name => "Deluge"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs b/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs index 51881debc..5727dea8b 100644 --- a/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs +++ b/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs @@ -31,10 +31,7 @@ public Hadouken(IHadoukenProxy proxy, _proxy = proxy; } - public override string Name - { - get { return "Hadouken"; } - } + public override string Name => "Hadouken"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs index 3d8017d57..6d45f0386 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs @@ -43,13 +43,7 @@ protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string fil return response; } - public override string Name - { - get - { - return "NZBVortex"; - } - } + public override string Name => "NZBVortex"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexJsonError.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexJsonError.cs index 47017cee0..487c8390e 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexJsonError.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexJsonError.cs @@ -7,13 +7,7 @@ public class NzbVortexJsonError public string Status { get; set; } public string Error { get; set; } - public bool Failed - { - get - { - return !string.IsNullOrWhiteSpace(Status) && - Status.Equals("false", StringComparison.InvariantCultureIgnoreCase); - } - } + public bool Failed => !string.IsNullOrWhiteSpace(Status) && + Status.Equals("false", StringComparison.InvariantCultureIgnoreCase); } } diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs index 8a3ae8884..5b6d756cc 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs @@ -194,13 +194,7 @@ private IEnumerable GetHistory() return historyItems; } - public override string Name - { - get - { - return "NZBGet"; - } - } + public override string Name => "NZBGet"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs index 5fc631ecd..5eab58b3b 100644 --- a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs +++ b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs @@ -28,21 +28,9 @@ public Pneumatic(IHttpClient httpClient, _httpClient = httpClient; } - public override string Name - { - get - { - return "Pneumatic"; - } - } + public override string Name => "Pneumatic"; - public override DownloadProtocol Protocol - { - get - { - return DownloadProtocol.Usenet; - } - } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; public override string Download(RemoteEpisode remoteEpisode) { @@ -70,13 +58,7 @@ public override string Download(RemoteEpisode remoteEpisode) return GetDownloadClientId(strmFile); } - public bool IsConfigured - { - get - { - return !string.IsNullOrWhiteSpace(Settings.NzbFolder); - } - } + public bool IsConfigured => !string.IsNullOrWhiteSpace(Settings.NzbFolder); public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index 89de6f527..64a5e23de 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -189,13 +189,7 @@ private IEnumerable GetHistory() return historyItems; } - public override string Name - { - get - { - return "SABnzbd"; - } - } + public override string Name => "SABnzbd"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdJsonError.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdJsonError.cs index 1054cf393..d723e710b 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdJsonError.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdJsonError.cs @@ -7,13 +7,7 @@ public class SabnzbdJsonError public string Status { get; set; } public string Error { get; set; } - public bool Failed - { - get - { - return !string.IsNullOrWhiteSpace(Status) && - Status.Equals("false", StringComparison.InvariantCultureIgnoreCase); - } - } + public bool Failed => !string.IsNullOrWhiteSpace(Status) && + Status.Equals("false", StringComparison.InvariantCultureIgnoreCase); } } diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/Transmission.cs b/src/NzbDrone.Core/Download/Clients/Transmission/Transmission.cs index 4ea717d49..058023d0c 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/Transmission.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/Transmission.cs @@ -40,12 +40,6 @@ protected override ValidationFailure ValidateVersion() return null; } - public override string Name - { - get - { - return "Transmission"; - } - } + public override string Name => "Transmission"; } } diff --git a/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs b/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs index 79721b120..7643d6653 100644 --- a/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs +++ b/src/NzbDrone.Core/Download/Clients/Vuze/Vuze.cs @@ -49,12 +49,6 @@ protected override ValidationFailure ValidateVersion() return null; } - public override string Name - { - get - { - return "Vuze"; - } - } + public override string Name => "Vuze"; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs index 1e82cb196..ecd75c911 100644 --- a/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/qBittorrent/QBittorrent.cs @@ -71,13 +71,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string return hash; } - public override string Name - { - get - { - return "qBittorrent"; - } - } + public override string Name => "qBittorrent"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs index 58b0f15c6..041708a93 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs @@ -94,21 +94,9 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string } } - public override string Name - { - get - { - return "rTorrent"; - } - } + public override string Name => "rTorrent"; - public override ProviderMessage Message - { - get - { - return new ProviderMessage("Sonarr is unable to remove torrents that have finished seeding when using rTorrent", ProviderMessageType.Warning); - } - } + public override ProviderMessage Message => new ProviderMessage("Sonarr is unable to remove torrents that have finished seeding when using rTorrent", ProviderMessageType.Warning); public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs index 3e76ad4eb..da942b7f1 100644 --- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs @@ -68,13 +68,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string return hash; } - public override string Name - { - get - { - return "uTorrent"; - } - } + public override string Name => "uTorrent"; public override IEnumerable GetItems() { diff --git a/src/NzbDrone.Core/Download/DownloadClientBase.cs b/src/NzbDrone.Core/Download/DownloadClientBase.cs index a7d85f2f6..98ade2a69 100644 --- a/src/NzbDrone.Core/Download/DownloadClientBase.cs +++ b/src/NzbDrone.Core/Download/DownloadClientBase.cs @@ -24,41 +24,17 @@ public abstract class DownloadClientBase : IDownloadClient public abstract string Name { get; } - public Type ConfigContract - { - get - { - return typeof(TSettings); - } - } + public Type ConfigContract => typeof(TSettings); - public virtual ProviderMessage Message - { - get - { - return null; - } - } + public virtual ProviderMessage Message => null; - public IEnumerable DefaultDefinitions - { - get - { - return new List(); - } - } + public IEnumerable DefaultDefinitions => new List(); public ProviderDefinition Definition { get; set; } public virtual object RequestAction(string action, IDictionary query) { return null; } - protected TSettings Settings - { - get - { - return (TSettings)Definition.Settings; - } - } + protected TSettings Settings => (TSettings)Definition.Settings; protected DownloadClientBase(IConfigService configService, IDiskProvider diskProvider, diff --git a/src/NzbDrone.Core/Download/TorrentClientBase.cs b/src/NzbDrone.Core/Download/TorrentClientBase.cs index 68b78b40c..b1fcd7e2e 100644 --- a/src/NzbDrone.Core/Download/TorrentClientBase.cs +++ b/src/NzbDrone.Core/Download/TorrentClientBase.cs @@ -34,21 +34,9 @@ protected TorrentClientBase(ITorrentFileInfoReader torrentFileInfoReader, _torrentFileInfoReader = torrentFileInfoReader; } - public override DownloadProtocol Protocol - { - get - { - return DownloadProtocol.Torrent; - } - } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public virtual bool PreferTorrentFile - { - get - { - return false; - } - } + public virtual bool PreferTorrentFile => false; protected abstract string AddFromMagnetLink(RemoteEpisode remoteEpisode, string hash, string magnetLink); protected abstract string AddFromTorrentFile(RemoteEpisode remoteEpisode, string hash, string filename, byte[] fileContent); diff --git a/src/NzbDrone.Core/Download/UsenetClientBase.cs b/src/NzbDrone.Core/Download/UsenetClientBase.cs index 5c9103581..9edd2a3ef 100644 --- a/src/NzbDrone.Core/Download/UsenetClientBase.cs +++ b/src/NzbDrone.Core/Download/UsenetClientBase.cs @@ -28,13 +28,7 @@ protected UsenetClientBase(IHttpClient httpClient, _httpClient = httpClient; } - public override DownloadProtocol Protocol - { - get - { - return DownloadProtocol.Usenet; - } - } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; protected abstract string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent); diff --git a/src/NzbDrone.Core/Extras/Files/ExtraFileService.cs b/src/NzbDrone.Core/Extras/Files/ExtraFileService.cs index d8e6b3fa7..54d86e908 100644 --- a/src/NzbDrone.Core/Extras/Files/ExtraFileService.cs +++ b/src/NzbDrone.Core/Extras/Files/ExtraFileService.cs @@ -48,13 +48,7 @@ public ExtraFileService(IExtraFileRepository repository, _logger = logger; } - public virtual bool PermanentlyDelete - { - get - { - return false; - } - } + public virtual bool PermanentlyDelete => false; public List GetFilesBySeries(int seriesId) { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadata.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadata.cs index 38d999886..d2ea82bae 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadata.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadata.cs @@ -23,13 +23,7 @@ public MediaBrowserMetadata( _logger = logger; } - public override string Name - { - get - { - return "Emby (Legacy)"; - } - } + public override string Name => "Emby (Legacy)"; public override MetadataFile FindMetadataFile(Series series, string path) { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadataSettings.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadataSettings.cs index c0e5d75bc..11899124f 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadataSettings.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/MediaBrowser/MediaBrowserMetadataSettings.cs @@ -24,13 +24,7 @@ public MediaBrowserMetadataSettings() [FieldDefinition(0, Label = "Series Metadata", Type = FieldType.Checkbox)] public bool SeriesMetadata { get; set; } - public bool IsValid - { - get - { - return true; - } - } + public bool IsValid => true; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadata.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadata.cs index de6b17a97..a96ae4edf 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadata.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadata.cs @@ -35,13 +35,7 @@ public RoksboxMetadata(IMapCoversToLocal mediaCoverService, private static List ValidCertification = new List { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" }; private static readonly Regex SeasonImagesRegex = new Regex(@"^(season (?\d+))|(?specials)", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public override string Name - { - get - { - return "Roksbox"; - } - } + public override string Name => "Roksbox"; public override string GetFilenameAfterMove(Series series, EpisodeFile episodeFile, MetadataFile metadataFile) { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadataSettings.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadataSettings.cs index 5ac09ef78..f0da481bf 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadataSettings.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/Roksbox/RoksboxMetadataSettings.cs @@ -36,13 +36,7 @@ public RoksboxMetadataSettings() [FieldDefinition(3, Label = "Episode Images", Type = FieldType.Checkbox)] public bool EpisodeImages { get; set; } - public bool IsValid - { - get - { - return true; - } - } + public bool IsValid => true; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadata.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadata.cs index 4964caeb4..ab031c396 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadata.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadata.cs @@ -34,13 +34,7 @@ public WdtvMetadata(IMapCoversToLocal mediaCoverService, private static readonly Regex SeasonImagesRegex = new Regex(@"^(season (?\d+))|(?specials)", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public override string Name - { - get - { - return "WDTV"; - } - } + public override string Name => "WDTV"; public override string GetFilenameAfterMove(Series series, EpisodeFile episodeFile, MetadataFile metadataFile) { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadataSettings.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadataSettings.cs index 052c6deae..e010ff7e5 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadataSettings.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/Wdtv/WdtvMetadataSettings.cs @@ -36,13 +36,7 @@ public WdtvMetadataSettings() [FieldDefinition(3, Label = "Episode Images", Type = FieldType.Checkbox)] public bool EpisodeImages { get; set; } - public bool IsValid - { - get - { - return true; - } - } + public bool IsValid => true; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadata.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadata.cs index 355f2a0fb..662b843c0 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadata.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadata.cs @@ -33,13 +33,7 @@ public XbmcMetadata(IMapCoversToLocal mediaCoverService, private static readonly Regex SeasonImagesRegex = new Regex(@"^season(?\d{2,}|-all|-specials)-(?poster|banner|fanart)\.(?:png|jpg)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex EpisodeImageRegex = new Regex(@"-thumb\.(?:png|jpg)", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public override string Name - { - get - { - return "Kodi (XBMC) / Emby"; - } - } + public override string Name => "Kodi (XBMC) / Emby"; public override string GetFilenameAfterMove(Series series, EpisodeFile episodeFile, MetadataFile metadataFile) { diff --git a/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadataSettings.cs b/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadataSettings.cs index 35ec5ee32..cd4b833ae 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadataSettings.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Consumers/Xbmc/XbmcMetadataSettings.cs @@ -40,13 +40,7 @@ public XbmcMetadataSettings() [FieldDefinition(4, Label = "Episode Images", Type = FieldType.Checkbox)] public bool EpisodeImages { get; set; } - public bool IsValid - { - get - { - return true; - } - } + public bool IsValid => true; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Extras/MetaData/ExistingMetadataImporter.cs b/src/NzbDrone.Core/Extras/MetaData/ExistingMetadataImporter.cs index ca5696ef1..fa271f575 100644 --- a/src/NzbDrone.Core/Extras/MetaData/ExistingMetadataImporter.cs +++ b/src/NzbDrone.Core/Extras/MetaData/ExistingMetadataImporter.cs @@ -30,13 +30,7 @@ public ExistingMetadataImporter(IExtraFileService metadataFileServ _consumers = consumers.ToList(); } - public override int Order - { - get - { - return 0; - } - } + public override int Order => 0; public override IEnumerable ProcessFiles(Series series, List filesOnDisk, List importedFiles) { diff --git a/src/NzbDrone.Core/Extras/MetaData/Files/MetadataFileService.cs b/src/NzbDrone.Core/Extras/MetaData/Files/MetadataFileService.cs index ae14676c1..f5fc2ba69 100644 --- a/src/NzbDrone.Core/Extras/MetaData/Files/MetadataFileService.cs +++ b/src/NzbDrone.Core/Extras/MetaData/Files/MetadataFileService.cs @@ -17,12 +17,6 @@ public MetadataFileService(IExtraFileRepository repository, ISerie { } - public override bool PermanentlyDelete - { - get - { - return true; - } - } + public override bool PermanentlyDelete => true; } } diff --git a/src/NzbDrone.Core/Extras/MetaData/MetadataBase.cs b/src/NzbDrone.Core/Extras/MetaData/MetadataBase.cs index 39a4162ce..a5673798b 100644 --- a/src/NzbDrone.Core/Extras/MetaData/MetadataBase.cs +++ b/src/NzbDrone.Core/Extras/MetaData/MetadataBase.cs @@ -14,29 +14,11 @@ namespace NzbDrone.Core.Extras.Metadata { public abstract string Name { get; } - public Type ConfigContract - { - get - { - return typeof(TSettings); - } - } + public Type ConfigContract => typeof(TSettings); - public virtual ProviderMessage Message - { - get - { - return null; - } - } + public virtual ProviderMessage Message => null; - public IEnumerable DefaultDefinitions - { - get - { - return new List(); - } - } + public IEnumerable DefaultDefinitions => new List(); public ProviderDefinition Definition { get; set; } @@ -64,13 +46,7 @@ public virtual string GetFilenameAfterMove(Series series, EpisodeFile episodeFil public virtual object RequestAction(string action, IDictionary query) { return null; } - protected TSettings Settings - { - get - { - return (TSettings)Definition.Settings; - } - } + protected TSettings Settings => (TSettings)Definition.Settings; public override string ToString() { diff --git a/src/NzbDrone.Core/Extras/MetaData/MetadataService.cs b/src/NzbDrone.Core/Extras/MetaData/MetadataService.cs index 278ceeab1..95198f2f0 100644 --- a/src/NzbDrone.Core/Extras/MetaData/MetadataService.cs +++ b/src/NzbDrone.Core/Extras/MetaData/MetadataService.cs @@ -47,13 +47,7 @@ public MetadataService(IConfigService configService, _logger = logger; } - public override int Order - { - get - { - return 0; - } - } + public override int Order => 0; public override IEnumerable CreateAfterSeriesScan(Series series, List episodeFiles) { diff --git a/src/NzbDrone.Core/Extras/Others/ExistingOtherExtraImporter.cs b/src/NzbDrone.Core/Extras/Others/ExistingOtherExtraImporter.cs index 6b3d3682b..6315daeb1 100644 --- a/src/NzbDrone.Core/Extras/Others/ExistingOtherExtraImporter.cs +++ b/src/NzbDrone.Core/Extras/Others/ExistingOtherExtraImporter.cs @@ -25,13 +25,7 @@ public ExistingOtherExtraImporter(IExtraFileService otherExtraFi _logger = logger; } - public override int Order - { - get - { - return 2; - } - } + public override int Order => 2; public override IEnumerable ProcessFiles(Series series, List filesOnDisk, List importedFiles) { diff --git a/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs b/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs index d1eb1f0cc..71b635710 100644 --- a/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs +++ b/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs @@ -30,13 +30,7 @@ public OtherExtraService(IConfigService configService, _logger = logger; } - public override int Order - { - get - { - return 2; - } - } + public override int Order => 2; public override IEnumerable CreateAfterSeriesScan(Series series, List episodeFiles) { diff --git a/src/NzbDrone.Core/Extras/Subtitles/ExistingSubtitleImporter.cs b/src/NzbDrone.Core/Extras/Subtitles/ExistingSubtitleImporter.cs index eb095123e..d3ae8d46b 100644 --- a/src/NzbDrone.Core/Extras/Subtitles/ExistingSubtitleImporter.cs +++ b/src/NzbDrone.Core/Extras/Subtitles/ExistingSubtitleImporter.cs @@ -25,13 +25,7 @@ public ExistingSubtitleImporter(IExtraFileService subtitleFileServ _logger = logger; } - public override int Order - { - get - { - return 1; - } - } + public override int Order => 1; public override IEnumerable ProcessFiles(Series series, List filesOnDisk, List importedFiles) { diff --git a/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs b/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs index 92f07a11a..423d14656 100644 --- a/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs +++ b/src/NzbDrone.Core/Extras/Subtitles/SubtitleFileExtensions.cs @@ -27,9 +27,6 @@ static SubtitleFileExtensions() }; } - public static HashSet Extensions - { - get { return _fileExtensions; } - } + public static HashSet Extensions => _fileExtensions; } } diff --git a/src/NzbDrone.Core/Extras/Subtitles/SubtitleService.cs b/src/NzbDrone.Core/Extras/Subtitles/SubtitleService.cs index 6361b7d84..0371efd66 100644 --- a/src/NzbDrone.Core/Extras/Subtitles/SubtitleService.cs +++ b/src/NzbDrone.Core/Extras/Subtitles/SubtitleService.cs @@ -33,13 +33,7 @@ public SubtitleService(IConfigService configService, _logger = logger; } - public override int Order - { - get - { - return 1; - } - } + public override int Order => 1; public override IEnumerable CreateAfterSeriesScan(Series series, List episodeFiles) { diff --git a/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs index 88b7e94b3..ad4f2db9e 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/AppDataLocationCheck.cs @@ -23,12 +23,6 @@ public override HealthCheck Check() return new HealthCheck(GetType()); } - public override bool CheckOnConfigChange - { - get - { - return false; - } - } + public override bool CheckOnConfigChange => false; } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs index d52e6e58f..94ea38710 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/MediaInfoDllCheck.cs @@ -21,12 +21,6 @@ public override HealthCheck Check() return new HealthCheck(GetType()); } - public override bool CheckOnConfigChange - { - get - { - return false; - } - } + public override bool CheckOnConfigChange => false; } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/MonoVersionCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/MonoVersionCheck.cs index 113af9b37..f74156cb3 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/MonoVersionCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/MonoVersionCheck.cs @@ -55,21 +55,9 @@ public override HealthCheck Check() return new HealthCheck(GetType(), HealthCheckResult.Warning, "mono version is less than 3.10, upgrade for improved stability"); } - public override bool CheckOnConfigChange - { - get - { - return false; - } - } + public override bool CheckOnConfigChange => false; - public override bool CheckOnSchedule - { - get - { - return false; - } - } + public override bool CheckOnSchedule => false; private bool HasMonoBug18599() { diff --git a/src/NzbDrone.Core/HealthCheck/Checks/RootFolderCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/RootFolderCheck.cs index f84d0054b..e35ad32e7 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/RootFolderCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/RootFolderCheck.cs @@ -38,12 +38,6 @@ public override HealthCheck Check() return new HealthCheck(GetType()); } - public override bool CheckOnConfigChange - { - get - { - return false; - } - } + public override bool CheckOnConfigChange => false; } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs index a27fab3c1..c0d7a5c31 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs @@ -67,12 +67,6 @@ public override HealthCheck Check() return new HealthCheck(GetType()); } - public override bool CheckOnConfigChange - { - get - { - return false; - } - } + public override bool CheckOnConfigChange => false; } } diff --git a/src/NzbDrone.Core/HealthCheck/HealthCheckBase.cs b/src/NzbDrone.Core/HealthCheck/HealthCheckBase.cs index 156a925a2..5e1700ac6 100644 --- a/src/NzbDrone.Core/HealthCheck/HealthCheckBase.cs +++ b/src/NzbDrone.Core/HealthCheck/HealthCheckBase.cs @@ -4,28 +4,10 @@ public abstract class HealthCheckBase : IProvideHealthCheck { public abstract HealthCheck Check(); - public virtual bool CheckOnStartup - { - get - { - return true; - } - } + public virtual bool CheckOnStartup => true; - public virtual bool CheckOnConfigChange - { - get - { - return true; - } - } + public virtual bool CheckOnConfigChange => true; - public virtual bool CheckOnSchedule - { - get - { - return true; - } - } + public virtual bool CheckOnSchedule => true; } } diff --git a/src/NzbDrone.Core/Http/CloudFlare/CloudFlareCaptchaException.cs b/src/NzbDrone.Core/Http/CloudFlare/CloudFlareCaptchaException.cs index 3368bd9ce..db88d5c7b 100644 --- a/src/NzbDrone.Core/Http/CloudFlare/CloudFlareCaptchaException.cs +++ b/src/NzbDrone.Core/Http/CloudFlare/CloudFlareCaptchaException.cs @@ -16,9 +16,6 @@ public CloudFlareCaptchaException(HttpResponse response, CloudFlareCaptchaReques CaptchaRequest = captchaRequest; } - public bool IsExpired - { - get { return Response.Request.Cookies.ContainsKey("cf_clearance"); } - } + public bool IsExpired => Response.Request.Cookies.ContainsKey("cf_clearance"); } } diff --git a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs index ea0048a11..48cb001b2 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs @@ -20,13 +20,7 @@ public abstract class SearchCriteriaBase public virtual bool MonitoredEpisodesOnly { get; set; } public virtual bool UserInvokedSearch { get; set; } - public List QueryTitles - { - get - { - return SceneTitles.Select(GetQueryTitle).ToList(); - } - } + public List QueryTitles => SceneTitles.Select(GetQueryTitle).ToList(); public static string GetQueryTitle(string title) { diff --git a/src/NzbDrone.Core/IndexerSearch/Definitions/SeasonSearchCriteria.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/SeasonSearchCriteria.cs index bf36769dc..122df795d 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/SeasonSearchCriteria.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/SeasonSearchCriteria.cs @@ -4,13 +4,7 @@ public class SeasonSearchCriteria : SearchCriteriaBase { public int SeasonNumber { get; set; } - public override bool MonitoredEpisodesOnly - { - get - { - return true; - } - } + public override bool MonitoredEpisodesOnly => true; public override string ToString() { diff --git a/src/NzbDrone.Core/IndexerSearch/EpisodeSearchCommand.cs b/src/NzbDrone.Core/IndexerSearch/EpisodeSearchCommand.cs index 78f7ad038..dfb4f3648 100644 --- a/src/NzbDrone.Core/IndexerSearch/EpisodeSearchCommand.cs +++ b/src/NzbDrone.Core/IndexerSearch/EpisodeSearchCommand.cs @@ -8,13 +8,7 @@ public class EpisodeSearchCommand : Command { public List EpisodeIds { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; public EpisodeSearchCommand() { diff --git a/src/NzbDrone.Core/IndexerSearch/MissingEpisodeSearchCommand.cs b/src/NzbDrone.Core/IndexerSearch/MissingEpisodeSearchCommand.cs index 978b3ab64..3e2097be3 100644 --- a/src/NzbDrone.Core/IndexerSearch/MissingEpisodeSearchCommand.cs +++ b/src/NzbDrone.Core/IndexerSearch/MissingEpisodeSearchCommand.cs @@ -6,13 +6,7 @@ public class MissingEpisodeSearchCommand : Command { public int? SeriesId { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; public MissingEpisodeSearchCommand() { diff --git a/src/NzbDrone.Core/IndexerSearch/SeasonSearchCommand.cs b/src/NzbDrone.Core/IndexerSearch/SeasonSearchCommand.cs index 56be0e0d9..2ac6cd439 100644 --- a/src/NzbDrone.Core/IndexerSearch/SeasonSearchCommand.cs +++ b/src/NzbDrone.Core/IndexerSearch/SeasonSearchCommand.cs @@ -7,12 +7,6 @@ public class SeasonSearchCommand : Command public int SeriesId { get; set; } public int SeasonNumber { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/IndexerSearch/SeriesSearchCommand.cs b/src/NzbDrone.Core/IndexerSearch/SeriesSearchCommand.cs index 36b75f316..bc1a0a51a 100644 --- a/src/NzbDrone.Core/IndexerSearch/SeriesSearchCommand.cs +++ b/src/NzbDrone.Core/IndexerSearch/SeriesSearchCommand.cs @@ -6,12 +6,6 @@ public class SeriesSearchCommand : Command { public int SeriesId { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Indexers/BitMeTv/BitMeTv.cs b/src/NzbDrone.Core/Indexers/BitMeTv/BitMeTv.cs index cb9a0b2cc..b4ae2fc13 100644 --- a/src/NzbDrone.Core/Indexers/BitMeTv/BitMeTv.cs +++ b/src/NzbDrone.Core/Indexers/BitMeTv/BitMeTv.cs @@ -8,17 +8,11 @@ namespace NzbDrone.Core.Indexers.BitMeTv { public class BitMeTv : HttpIndexerBase { - public override string Name - { - get - { - return "BitMeTV"; - } - } + public override string Name => "BitMeTV"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override bool SupportsSearch { get { return false; } } - public override int PageSize { get { return 0; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override bool SupportsSearch => false; + public override int PageSize => 0; public BitMeTv(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNet.cs b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNet.cs index 95cd232fc..fec611710 100644 --- a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNet.cs +++ b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNet.cs @@ -7,18 +7,12 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet { public class BroadcastheNet : HttpIndexerBase { - public override string Name - { - get - { - return "BroadcastheNet"; - } - } + public override string Name => "BroadcastheNet"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override bool SupportsRss { get { return true; } } - public override bool SupportsSearch { get { return true; } } - public override int PageSize { get { return 100; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override bool SupportsRss => true; + public override bool SupportsSearch => true; + public override int PageSize => 100; public BroadcastheNet(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs b/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs index f93ef990e..629f596a8 100644 --- a/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs +++ b/src/NzbDrone.Core/Indexers/Exceptions/IndexerException.cs @@ -18,9 +18,6 @@ public IndexerException(IndexerResponse response, string message) _indexerResponse = response; } - public IndexerResponse Response - { - get { return _indexerResponse; } - } + public IndexerResponse Response => _indexerResponse; } } diff --git a/src/NzbDrone.Core/Indexers/Fanzub/Fanzub.cs b/src/NzbDrone.Core/Indexers/Fanzub/Fanzub.cs index ad1231aeb..fc66a83f1 100644 --- a/src/NzbDrone.Core/Indexers/Fanzub/Fanzub.cs +++ b/src/NzbDrone.Core/Indexers/Fanzub/Fanzub.cs @@ -7,15 +7,9 @@ namespace NzbDrone.Core.Indexers.Fanzub { public class Fanzub : HttpIndexerBase { - public override string Name - { - get - { - return "Fanzub"; - } - } + public override string Name => "Fanzub"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Usenet; } } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; public Fanzub(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/HDBits/HDBits.cs b/src/NzbDrone.Core/Indexers/HDBits/HDBits.cs index 7cdf779e9..97ddeadf5 100644 --- a/src/NzbDrone.Core/Indexers/HDBits/HDBits.cs +++ b/src/NzbDrone.Core/Indexers/HDBits/HDBits.cs @@ -8,11 +8,11 @@ namespace NzbDrone.Core.Indexers.HDBits { public class HDBits : HttpIndexerBase { - public override string Name { get { return "HDBits"; } } - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override bool SupportsRss { get { return true; } } - public override bool SupportsSearch { get { return true; } } - public override int PageSize { get { return 30; } } + public override string Name => "HDBits"; + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override bool SupportsRss => true; + public override bool SupportsSearch => true; + public override int PageSize => 30; public HDBits(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index c9cfff122..f91bc17a7 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -24,12 +24,12 @@ public abstract class HttpIndexerBase : IndexerBase protected readonly IHttpClient _httpClient; - public override bool SupportsRss { get { return true; } } - public override bool SupportsSearch { get { return true; } } - public bool SupportsPaging { get { return PageSize > 0; } } + public override bool SupportsRss => true; + public override bool SupportsSearch => true; + public bool SupportsPaging => PageSize > 0; - public virtual int PageSize { get { return 0; } } - public virtual TimeSpan RateLimit { get { return TimeSpan.FromSeconds(2); } } + public virtual int PageSize => 0; + public virtual TimeSpan RateLimit => TimeSpan.FromSeconds(2); public abstract IIndexerRequestGenerator GetRequestGenerator(); public abstract IParseIndexerResponse GetParser(); diff --git a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrents.cs b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrents.cs index 0e602bafc..2042a6268 100644 --- a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrents.cs +++ b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrents.cs @@ -8,17 +8,11 @@ namespace NzbDrone.Core.Indexers.IPTorrents { public class IPTorrents : HttpIndexerBase { - public override string Name - { - get - { - return "IP Torrents"; - } - } + public override string Name => "IP Torrents"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override bool SupportsSearch { get { return false; } } - public override int PageSize { get { return 0; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override bool SupportsSearch => false; + public override int PageSize => 0; public IPTorrents(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/IndexerBase.cs b/src/NzbDrone.Core/Indexers/IndexerBase.cs index 17a73c398..4e08e5aad 100644 --- a/src/NzbDrone.Core/Indexers/IndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/IndexerBase.cs @@ -34,18 +34,9 @@ public IndexerBase(IIndexerStatusService indexerStatusService, IConfigService co _logger = logger; } - public Type ConfigContract - { - get { return typeof(TSettings); } - } + public Type ConfigContract => typeof(TSettings); - public virtual ProviderMessage Message - { - get - { - return null; - } - } + public virtual ProviderMessage Message => null; public virtual IEnumerable DefaultDefinitions { @@ -68,13 +59,7 @@ public virtual IEnumerable DefaultDefinitions public virtual object RequestAction(string action, IDictionary query) { return null; } - protected TSettings Settings - { - get - { - return (TSettings)Definition.Settings; - } - } + protected TSettings Settings => (TSettings)Definition.Settings; public abstract IList FetchRecent(); public abstract IList Fetch(SeasonSearchCriteria searchCriteria); diff --git a/src/NzbDrone.Core/Indexers/IndexerDefinition.cs b/src/NzbDrone.Core/Indexers/IndexerDefinition.cs index 499487b15..b4f1d7ddb 100644 --- a/src/NzbDrone.Core/Indexers/IndexerDefinition.cs +++ b/src/NzbDrone.Core/Indexers/IndexerDefinition.cs @@ -11,13 +11,7 @@ public class IndexerDefinition : ProviderDefinition public bool SupportsRss { get; set; } public bool SupportsSearch { get; set; } - public override bool Enable - { - get - { - return EnableRss || EnableSearch; - } - } + public override bool Enable => EnableRss || EnableSearch; public IndexerStatus Status { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/IndexerPageableRequestChain.cs b/src/NzbDrone.Core/Indexers/IndexerPageableRequestChain.cs index 498f21ec1..b44cfaf76 100644 --- a/src/NzbDrone.Core/Indexers/IndexerPageableRequestChain.cs +++ b/src/NzbDrone.Core/Indexers/IndexerPageableRequestChain.cs @@ -13,10 +13,7 @@ public IndexerPageableRequestChain() _chains.Add(new List()); } - public int Tiers - { - get { return _chains.Count; } - } + public int Tiers => _chains.Count; public IEnumerable GetAllTiers() { diff --git a/src/NzbDrone.Core/Indexers/IndexerRequest.cs b/src/NzbDrone.Core/Indexers/IndexerRequest.cs index 187e46954..d2eb6a9f3 100644 --- a/src/NzbDrone.Core/Indexers/IndexerRequest.cs +++ b/src/NzbDrone.Core/Indexers/IndexerRequest.cs @@ -17,9 +17,6 @@ public IndexerRequest(HttpRequest httpRequest) HttpRequest = httpRequest; } - public HttpUri Url - { - get { return HttpRequest.Url; } - } + public HttpUri Url => HttpRequest.Url; } } diff --git a/src/NzbDrone.Core/Indexers/IndexerResponse.cs b/src/NzbDrone.Core/Indexers/IndexerResponse.cs index ffc4dc5e2..fd3d3d90c 100644 --- a/src/NzbDrone.Core/Indexers/IndexerResponse.cs +++ b/src/NzbDrone.Core/Indexers/IndexerResponse.cs @@ -14,24 +14,12 @@ public IndexerResponse(IndexerRequest indexerRequest, HttpResponse httpResponse) _httpResponse = httpResponse; } - public IndexerRequest Request - { - get { return _indexerRequest; } - } + public IndexerRequest Request => _indexerRequest; - public HttpRequest HttpRequest - { - get { return _httpResponse.Request; } - } + public HttpRequest HttpRequest => _httpResponse.Request; - public HttpResponse HttpResponse - { - get { return _httpResponse; } - } + public HttpResponse HttpResponse => _httpResponse; - public string Content - { - get { return _httpResponse.Content; } - } + public string Content => _httpResponse.Content; } } diff --git a/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrents.cs b/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrents.cs index 34a545b78..74f537aa7 100644 --- a/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrents.cs +++ b/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrents.cs @@ -8,16 +8,10 @@ namespace NzbDrone.Core.Indexers.KickassTorrents { public class KickassTorrents : HttpIndexerBase { - public override string Name - { - get - { - return "Kickass Torrents"; - } - } + public override string Name => "Kickass Torrents"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override int PageSize { get { return 25; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override int PageSize => 25; public KickassTorrents(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs index 9733dc0e5..bd75f0382 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -15,19 +15,11 @@ public class Newznab : HttpIndexerBase { private readonly INewznabCapabilitiesProvider _capabilitiesProvider; - public override string Name - { - get - { - return "Newznab"; - } - } + public override string Name => "Newznab"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Usenet; } } - public override int PageSize - { - get { return _capabilitiesProvider.GetCapabilities(Settings).DefaultPageSize; } - } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; + + public override int PageSize => _capabilitiesProvider.GetCapabilities(Settings).DefaultPageSize; public override IIndexerRequestGenerator GetRequestGenerator() { diff --git a/src/NzbDrone.Core/Indexers/Nyaa/Nyaa.cs b/src/NzbDrone.Core/Indexers/Nyaa/Nyaa.cs index 12ad72197..fc16dfb91 100644 --- a/src/NzbDrone.Core/Indexers/Nyaa/Nyaa.cs +++ b/src/NzbDrone.Core/Indexers/Nyaa/Nyaa.cs @@ -8,16 +8,10 @@ namespace NzbDrone.Core.Indexers.Nyaa { public class Nyaa : HttpIndexerBase { - public override string Name - { - get - { - return "Nyaa"; - } - } + public override string Name => "Nyaa"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override int PageSize { get { return 100; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override int PageSize => 100; public Nyaa(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/Omgwtfnzbs.cs b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/Omgwtfnzbs.cs index 473802994..d957b5cbd 100644 --- a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/Omgwtfnzbs.cs +++ b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/Omgwtfnzbs.cs @@ -7,15 +7,9 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs { public class Omgwtfnzbs : HttpIndexerBase { - public override string Name - { - get - { - return "omgwtfnzbs"; - } - } + public override string Name => "omgwtfnzbs"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Usenet; } } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; public Omgwtfnzbs(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs b/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs index f300caf96..049809dce 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs @@ -15,10 +15,10 @@ public class Rarbg : HttpIndexerBase { private readonly IRarbgTokenProvider _tokenProvider; - public override string Name { get { return "Rarbg"; } } - - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override TimeSpan RateLimit { get { return TimeSpan.FromSeconds(2); } } + public override string Name => "Rarbg"; + + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override TimeSpan RateLimit => TimeSpan.FromSeconds(2); public Rarbg(IRarbgTokenProvider tokenProvider, IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/RssSyncCommand.cs b/src/NzbDrone.Core/Indexers/RssSyncCommand.cs index 56b4532bf..308a9de2e 100644 --- a/src/NzbDrone.Core/Indexers/RssSyncCommand.cs +++ b/src/NzbDrone.Core/Indexers/RssSyncCommand.cs @@ -5,13 +5,6 @@ namespace NzbDrone.Core.Indexers public class RssSyncCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } - + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexer.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexer.cs index f67506bf3..b5537f2d7 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexer.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexer.cs @@ -8,17 +8,11 @@ namespace NzbDrone.Core.Indexers.TorrentRss { public class TorrentRssIndexer : HttpIndexerBase { - public override string Name - { - get - { - return "Torrent RSS Feed"; - } - } + public override string Name => "Torrent RSS Feed"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override bool SupportsSearch { get { return false; } } - public override int PageSize { get { return 0; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override bool SupportsSearch => false; + public override int PageSize => 0; private readonly ITorrentRssParserFactory _torrentRssParserFactory; diff --git a/src/NzbDrone.Core/Indexers/Torrentleech/Torrentleech.cs b/src/NzbDrone.Core/Indexers/Torrentleech/Torrentleech.cs index f7ef5366c..62f18ef34 100644 --- a/src/NzbDrone.Core/Indexers/Torrentleech/Torrentleech.cs +++ b/src/NzbDrone.Core/Indexers/Torrentleech/Torrentleech.cs @@ -8,17 +8,11 @@ namespace NzbDrone.Core.Indexers.Torrentleech { public class Torrentleech : HttpIndexerBase { - public override string Name - { - get - { - return "TorrentLeech"; - } - } + public override string Name => "TorrentLeech"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override bool SupportsSearch { get { return false; } } - public override int PageSize { get { return 0; } } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override bool SupportsSearch => false; + public override int PageSize => 0; public Torrentleech(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger) : base(httpClient, indexerStatusService, configService, parsingService, logger) diff --git a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs index 840c3b51e..8d2649c2d 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs @@ -16,19 +16,10 @@ public class Torznab : HttpIndexerBase { private readonly INewznabCapabilitiesProvider _capabilitiesProvider; - public override string Name - { - get - { - return "Torznab"; - } - } + public override string Name => "Torznab"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Torrent; } } - public override int PageSize - { - get { return _capabilitiesProvider.GetCapabilities(Settings).DefaultPageSize; } - } + public override DownloadProtocol Protocol => DownloadProtocol.Torrent; + public override int PageSize => _capabilitiesProvider.GetCapabilities(Settings).DefaultPageSize; public override IIndexerRequestGenerator GetRequestGenerator() { diff --git a/src/NzbDrone.Core/Indexers/Wombles/Wombles.cs b/src/NzbDrone.Core/Indexers/Wombles/Wombles.cs index dd33c38af..571a85288 100644 --- a/src/NzbDrone.Core/Indexers/Wombles/Wombles.cs +++ b/src/NzbDrone.Core/Indexers/Wombles/Wombles.cs @@ -8,16 +8,10 @@ namespace NzbDrone.Core.Indexers.Wombles { public class Wombles : HttpIndexerBase { - public override string Name - { - get - { - return "Womble's"; - } - } + public override string Name => "Womble's"; - public override DownloadProtocol Protocol { get { return DownloadProtocol.Usenet; } } - public override bool SupportsSearch { get { return false; } } + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; + public override bool SupportsSearch => false; public override IParseIndexerResponse GetParser() { diff --git a/src/NzbDrone.Core/Instrumentation/Commands/ClearLogCommand.cs b/src/NzbDrone.Core/Instrumentation/Commands/ClearLogCommand.cs index 986331002..f8eb71ee7 100644 --- a/src/NzbDrone.Core/Instrumentation/Commands/ClearLogCommand.cs +++ b/src/NzbDrone.Core/Instrumentation/Commands/ClearLogCommand.cs @@ -4,12 +4,6 @@ namespace NzbDrone.Core.Instrumentation.Commands { public class ClearLogCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Instrumentation/Commands/DeleteLogFilesCommand.cs b/src/NzbDrone.Core/Instrumentation/Commands/DeleteLogFilesCommand.cs index 1a331247e..7676baa52 100644 --- a/src/NzbDrone.Core/Instrumentation/Commands/DeleteLogFilesCommand.cs +++ b/src/NzbDrone.Core/Instrumentation/Commands/DeleteLogFilesCommand.cs @@ -4,12 +4,6 @@ namespace NzbDrone.Core.Instrumentation.Commands { public class DeleteLogFilesCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Instrumentation/Commands/DeleteUpdateLogFilesCommand.cs b/src/NzbDrone.Core/Instrumentation/Commands/DeleteUpdateLogFilesCommand.cs index a55e91502..5a909bdf6 100644 --- a/src/NzbDrone.Core/Instrumentation/Commands/DeleteUpdateLogFilesCommand.cs +++ b/src/NzbDrone.Core/Instrumentation/Commands/DeleteUpdateLogFilesCommand.cs @@ -4,12 +4,6 @@ namespace NzbDrone.Core.Instrumentation.Commands { public class DeleteUpdateLogFilesCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/MediaFiles/Commands/DownloadedEpisodesScanCommand.cs b/src/NzbDrone.Core/MediaFiles/Commands/DownloadedEpisodesScanCommand.cs index a36e6a093..36c0386bd 100644 --- a/src/NzbDrone.Core/MediaFiles/Commands/DownloadedEpisodesScanCommand.cs +++ b/src/NzbDrone.Core/MediaFiles/Commands/DownloadedEpisodesScanCommand.cs @@ -6,13 +6,7 @@ namespace NzbDrone.Core.MediaFiles.Commands { public class DownloadedEpisodesScanCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return SendUpdates; - } - } + public override bool SendUpdatesToClient => SendUpdates; public bool SendUpdates { get; set; } diff --git a/src/NzbDrone.Core/MediaFiles/Commands/RenameFilesCommand.cs b/src/NzbDrone.Core/MediaFiles/Commands/RenameFilesCommand.cs index 2003a3e9f..e0dc34e10 100644 --- a/src/NzbDrone.Core/MediaFiles/Commands/RenameFilesCommand.cs +++ b/src/NzbDrone.Core/MediaFiles/Commands/RenameFilesCommand.cs @@ -8,13 +8,7 @@ public class RenameFilesCommand : Command public int SeriesId { get; set; } public List Files { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; public RenameFilesCommand() { diff --git a/src/NzbDrone.Core/MediaFiles/Commands/RenameSeriesCommand.cs b/src/NzbDrone.Core/MediaFiles/Commands/RenameSeriesCommand.cs index e50cc18e0..a2bcda88c 100644 --- a/src/NzbDrone.Core/MediaFiles/Commands/RenameSeriesCommand.cs +++ b/src/NzbDrone.Core/MediaFiles/Commands/RenameSeriesCommand.cs @@ -7,13 +7,7 @@ public class RenameSeriesCommand : Command { public List SeriesIds { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; public RenameSeriesCommand() { diff --git a/src/NzbDrone.Core/MediaFiles/Commands/RescanSeriesCommand.cs b/src/NzbDrone.Core/MediaFiles/Commands/RescanSeriesCommand.cs index 4523b1deb..6330574ab 100644 --- a/src/NzbDrone.Core/MediaFiles/Commands/RescanSeriesCommand.cs +++ b/src/NzbDrone.Core/MediaFiles/Commands/RescanSeriesCommand.cs @@ -6,13 +6,7 @@ public class RescanSeriesCommand : Command { public int? SeriesId { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; public RescanSeriesCommand() { diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/DetectSample.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/DetectSample.cs index 6b7b3d69e..b517cd76c 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/DetectSample.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/DetectSample.cs @@ -26,13 +26,7 @@ public DetectSample(IVideoFileInfoReader videoFileInfoReader, Logger logger) _logger = logger; } - public static long SampleSizeLimit - { - get - { - return 70.Megabytes(); - } - } + public static long SampleSizeLimit => 70.Megabytes(); public bool IsSample(Series series, QualityModel quality, string path, long size, bool isSpecial) { diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecision.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecision.cs index ba55a4aec..5e4e2ede2 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecision.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecision.cs @@ -11,13 +11,7 @@ public class ImportDecision public LocalEpisode LocalEpisode { get; private set; } public IEnumerable Rejections { get; private set; } - public bool Approved - { - get - { - return Rejections.Empty(); - } - } + public bool Approved => Rejections.Empty(); public ImportDecision(LocalEpisode localEpisode, params Rejection[] rejections) { diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Manual/ManualImportCommand.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Manual/ManualImportCommand.cs index c3c077609..38ed485b7 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Manual/ManualImportCommand.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Manual/ManualImportCommand.cs @@ -7,13 +7,7 @@ public class ManualImportCommand : Command { public List Files { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; public ImportMode ImportMode { get; set; } } diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/SameEpisodesImportSpecification.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/SameEpisodesImportSpecification.cs index da909fb79..ee6c02c53 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/SameEpisodesImportSpecification.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Specifications/SameEpisodesImportSpecification.cs @@ -15,7 +15,7 @@ public SameEpisodesImportSpecification(SameEpisodesSpecification sameEpisodesSpe _logger = logger; } - public RejectionType Type { get { return RejectionType.Permanent; } } + public RejectionType Type => RejectionType.Permanent; public Decision IsSatisfiedBy(LocalEpisode localEpisode) { diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs b/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs index 2d78b4b56..56413b564 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs @@ -71,10 +71,7 @@ static MediaFileExtensions() }; } - public static HashSet Extensions - { - get { return new HashSet(_fileExtensions.Keys); } - } + public static HashSet Extensions => new HashSet(_fileExtensions.Keys); public static Quality GetQualityForExtension(string extension) { diff --git a/src/NzbDrone.Core/Messaging/Commands/Command.cs b/src/NzbDrone.Core/Messaging/Commands/Command.cs index 7dd845a04..20becd1f0 100644 --- a/src/NzbDrone.Core/Messaging/Commands/Command.cs +++ b/src/NzbDrone.Core/Messaging/Commands/Command.cs @@ -4,29 +4,11 @@ namespace NzbDrone.Core.Messaging.Commands { public abstract class Command { - public virtual bool SendUpdatesToClient - { - get - { - return false; - } - } + public virtual bool SendUpdatesToClient => false; - public virtual bool UpdateScheduledTask - { - get - { - return true; - } - } + public virtual bool UpdateScheduledTask => true; - public virtual string CompletionMessage - { - get - { - return "Completed"; - } - } + public virtual string CompletionMessage => "Completed"; public string Name { get; private set; } public DateTime? LastExecutionTime { get; set; } diff --git a/src/NzbDrone.Core/Messaging/Commands/CommandQueue.cs b/src/NzbDrone.Core/Messaging/Commands/CommandQueue.cs index 1301ef245..ad555fe6c 100644 --- a/src/NzbDrone.Core/Messaging/Commands/CommandQueue.cs +++ b/src/NzbDrone.Core/Messaging/Commands/CommandQueue.cs @@ -42,29 +42,11 @@ public void CopyTo(Array array, int index) } } - public int Count - { - get - { - return _items.Count; - } - } + public int Count => _items.Count; - public object SyncRoot - { - get - { - return Mutex; - } - } + public object SyncRoot => Mutex; - public bool IsSynchronized - { - get - { - return true; - } - } + public bool IsSynchronized => true; public void CopyTo(CommandModel[] array, int index) { diff --git a/src/NzbDrone.Core/Messaging/Commands/TestCommand.cs b/src/NzbDrone.Core/Messaging/Commands/TestCommand.cs index 616c99ee7..f52fdeae7 100644 --- a/src/NzbDrone.Core/Messaging/Commands/TestCommand.cs +++ b/src/NzbDrone.Core/Messaging/Commands/TestCommand.cs @@ -4,14 +4,8 @@ public class TestCommand : Command { public int Duration { get; set; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } - + public override bool SendUpdatesToClient => true; + public TestCommand() { Duration = 4000; diff --git a/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs b/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs index fd238b7f5..c3443c33b 100644 --- a/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs +++ b/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs @@ -14,10 +14,7 @@ public Boxcar(IBoxcarProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "https://boxcar.io/client"; } - } + public override string Link => "https://boxcar.io/client"; public override void OnGrab(GrabMessage grabMessage) { @@ -37,21 +34,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Boxcar"; - } - } + public override string Name => "Boxcar"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index 87f4d7c75..a160963c7 100644 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -24,10 +24,7 @@ public CustomScript(IDiskProvider diskProvider, IProcessProvider processProvider _logger = logger; } - public override string Link - { - get { return "https://github.com/Sonarr/Sonarr/wiki/Custom-Post-Processing-Scripts"; } - } + public override string Link => "https://github.com/Sonarr/Sonarr/wiki/Custom-Post-Processing-Scripts"; public override void OnGrab(GrabMessage message) { @@ -98,13 +95,7 @@ public override void OnRename(Series series) ExecuteScript(environmentVariables); } - public override string Name - { - get - { - return "Custom Script"; - } - } + public override string Name => "Custom Script"; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Email/Email.cs b/src/NzbDrone.Core/Notifications/Email/Email.cs index bc49e6c71..e71ad171a 100644 --- a/src/NzbDrone.Core/Notifications/Email/Email.cs +++ b/src/NzbDrone.Core/Notifications/Email/Email.cs @@ -15,10 +15,7 @@ public Email(IEmailService emailService) _emailService = emailService; } - public override string Link - { - get { return null; } - } + public override string Link => null; public override void OnGrab(GrabMessage grabMessage) { @@ -40,21 +37,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Email"; - } - } + public override string Name => "Email"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Growl/Growl.cs b/src/NzbDrone.Core/Notifications/Growl/Growl.cs index c2bf31fa5..99b43f625 100644 --- a/src/NzbDrone.Core/Notifications/Growl/Growl.cs +++ b/src/NzbDrone.Core/Notifications/Growl/Growl.cs @@ -14,10 +14,7 @@ public Growl(IGrowlService growlService) _growlService = growlService; } - public override string Link - { - get { return "http://growl.info/"; } - } + public override string Link => "http://growl.info/"; public override void OnGrab(GrabMessage grabMessage) { @@ -37,21 +34,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Growl"; - } - } + public override string Name => "Growl"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Growl/GrowlSettings.cs b/src/NzbDrone.Core/Notifications/Growl/GrowlSettings.cs index a6cab3db9..eaf960355 100644 --- a/src/NzbDrone.Core/Notifications/Growl/GrowlSettings.cs +++ b/src/NzbDrone.Core/Notifications/Growl/GrowlSettings.cs @@ -33,13 +33,7 @@ public GrowlSettings() [FieldDefinition(2, Label = "Password")] public string Password { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(Host) && !string.IsNullOrWhiteSpace(Password) && Port > 0; - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(Host) && !string.IsNullOrWhiteSpace(Password) && Port > 0; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Join/Join.cs b/src/NzbDrone.Core/Notifications/Join/Join.cs index 78a47dd5e..747a141e1 100644 --- a/src/NzbDrone.Core/Notifications/Join/Join.cs +++ b/src/NzbDrone.Core/Notifications/Join/Join.cs @@ -14,10 +14,7 @@ public Join(IJoinProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "https://joinjoaomgcd.appspot.com/"; } - } + public override string Link => "https://joinjoaomgcd.appspot.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -37,21 +34,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Join"; - } - } + public override string Name => "Join"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs index 7102da090..44d4d2508 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs @@ -15,10 +15,7 @@ public MediaBrowser(IMediaBrowserService mediaBrowserService) _mediaBrowserService = mediaBrowserService; } - public override string Link - { - get { return "http://mediabrowser.tv/"; } - } + public override string Link => "http://mediabrowser.tv/"; public override void OnGrab(GrabMessage grabMessage) { @@ -53,13 +50,7 @@ public override void OnRename(Series series) } } - public override string Name - { - get - { - return "Emby (Media Browser)"; - } - } + public override string Name => "Emby (Media Browser)"; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs index f80800b40..ef51e4913 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs @@ -41,15 +41,9 @@ public MediaBrowserSettings() public bool UpdateLibrary { get; set; } [JsonIgnore] - public string Address { get { return string.Format("{0}:{1}", Host, Port); } } - - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(Host) && Port > 0; - } - } + public string Address => string.Format("{0}:{1}", Host, Port); + + public bool IsValid => !string.IsNullOrWhiteSpace(Host) && Port > 0; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/NotificationBase.cs b/src/NzbDrone.Core/Notifications/NotificationBase.cs index 49d28f169..197fadae0 100644 --- a/src/NzbDrone.Core/Notifications/NotificationBase.cs +++ b/src/NzbDrone.Core/Notifications/NotificationBase.cs @@ -10,29 +10,11 @@ namespace NzbDrone.Core.Notifications { public abstract string Name { get; } - public Type ConfigContract - { - get - { - return typeof(TSettings); - } - } + public Type ConfigContract => typeof(TSettings); - public virtual ProviderMessage Message - { - get - { - return null; - } - } + public virtual ProviderMessage Message => null; - public IEnumerable DefaultDefinitions - { - get - { - return new List(); - } - } + public IEnumerable DefaultDefinitions => new List(); public ProviderDefinition Definition { get; set; } public abstract ValidationResult Test(); @@ -43,18 +25,12 @@ public IEnumerable DefaultDefinitions public abstract void OnDownload(DownloadMessage message); public abstract void OnRename(Series series); - public virtual bool SupportsOnGrab { get { return true; } } - public virtual bool SupportsOnDownload { get { return true; } } - public virtual bool SupportsOnUpgrade { get { return true; } } - public virtual bool SupportsOnRename { get { return true; } } + public virtual bool SupportsOnGrab => true; + public virtual bool SupportsOnDownload => true; + public virtual bool SupportsOnUpgrade => true; + public virtual bool SupportsOnRename => true; - protected TSettings Settings - { - get - { - return (TSettings)Definition.Settings; - } - } + protected TSettings Settings => (TSettings)Definition.Settings; public override string ToString() { diff --git a/src/NzbDrone.Core/Notifications/NotificationDefinition.cs b/src/NzbDrone.Core/Notifications/NotificationDefinition.cs index df1b89e0e..dc4248289 100644 --- a/src/NzbDrone.Core/Notifications/NotificationDefinition.cs +++ b/src/NzbDrone.Core/Notifications/NotificationDefinition.cs @@ -21,12 +21,6 @@ public NotificationDefinition() public bool SupportsOnRename { get; set; } public HashSet Tags { get; set; } - public override bool Enable - { - get - { - return OnGrab || OnDownload || (OnDownload && OnUpgrade); - } - } + public override bool Enable => OnGrab || OnDownload || (OnDownload && OnUpgrade); } } diff --git a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs index 3d4a7f813..176612065 100644 --- a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs +++ b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs @@ -15,10 +15,7 @@ public NotifyMyAndroid(INotifyMyAndroidProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "http://www.notifymyandroid.com/"; } - } + public override string Link => "http://www.notifymyandroid.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -38,21 +35,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Notify My Android"; - } - } + public override string Name => "Notify My Android"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroidSettings.cs b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroidSettings.cs index f8b99cfa1..e369ddee0 100644 --- a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroidSettings.cs +++ b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroidSettings.cs @@ -24,13 +24,7 @@ public class NotifyMyAndroidSettings : IProviderConfig [FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions = typeof(NotifyMyAndroidPriority))] public int Priority { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(ApiKey) && Priority >= -1 && Priority <= 2; - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(ApiKey) && Priority >= -1 && Priority <= 2; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs b/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs index 3b5a25b6d..844b3bb0a 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs @@ -14,10 +14,7 @@ public PlexClient(IPlexClientService plexClientService) _plexClientService = plexClientService; } - public override string Link - { - get { return "http://www.plexapp.com/"; } - } + public override string Link => "http://www.plexapp.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -35,21 +32,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Plex Media Center"; - } - } + public override string Name => "Plex Media Center"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexClientSettings.cs b/src/NzbDrone.Core/Notifications/Plex/PlexClientSettings.cs index e1b1e0499..e972993e9 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexClientSettings.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexClientSettings.cs @@ -36,13 +36,7 @@ public PlexClientSettings() [FieldDefinition(3, Label = "Password")] public string Password { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(Host); - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(Host); public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs b/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs index 42b5098d8..12aed9928 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs @@ -20,10 +20,7 @@ public PlexHomeTheater(IXbmcService xbmcService, Logger logger) _logger = logger; } - public override string Link - { - get { return "https://plex.tv/"; } - } + public override string Link => "https://plex.tv/"; public override void OnGrab(GrabMessage grabMessage) { @@ -44,21 +41,9 @@ public override void OnRename(Series series) } - public override string Name - { - get - { - return "Plex Home Theater"; - } - } + public override string Name => "Plex Home Theater"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs b/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs index cf7f7acd8..2f3da8822 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs @@ -14,10 +14,7 @@ public PlexServer(IPlexServerService plexServerService) _plexServerService = plexServerService; } - public override string Link - { - get { return "http://www.plexapp.com/"; } - } + public override string Link => "http://www.plexapp.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -41,21 +38,9 @@ private void UpdateIfEnabled(Series series) } } - public override string Name - { - get - { - return "Plex Media Server"; - } - } + public override string Name => "Plex Media Server"; - public override bool SupportsOnGrab - { - get - { - return false; - } - } + public override bool SupportsOnGrab => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexServerSettings.cs b/src/NzbDrone.Core/Notifications/Plex/PlexServerSettings.cs index 983a6d16b..8c5fe6087 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexServerSettings.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexServerSettings.cs @@ -44,13 +44,7 @@ public PlexServerSettings() [FieldDefinition(5, Label = "Use SSL", Type = FieldType.Checkbox, HelpText = "Connect to Plex over HTTPS instead of HTTP")] public bool UseSsl { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(Host); - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(Host); public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs b/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs index fe31abace..59bba6f43 100644 --- a/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs +++ b/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs @@ -15,10 +15,7 @@ public Prowl(IProwlService prowlService) _prowlService = prowlService; } - public override string Link - { - get { return "http://www.prowlapp.com/"; } - } + public override string Link => "http://www.prowlapp.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -38,21 +35,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Prowl"; - } - } + public override string Name => "Prowl"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs b/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs index b6cd2ae2e..f705dcf1b 100644 --- a/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs +++ b/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs @@ -24,13 +24,7 @@ public class ProwlSettings : IProviderConfig [FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions= typeof(ProwlPriority) )] public int Priority { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(ApiKey) && Priority >= -2 && Priority <= 2; - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(ApiKey) && Priority >= -2 && Priority <= 2; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs b/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs index ec2c997ac..684ff702b 100644 --- a/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs +++ b/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs @@ -14,10 +14,7 @@ public PushBullet(IPushBulletProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "https://www.pushbullet.com/"; } - } + public override string Link => "https://www.pushbullet.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -37,21 +34,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Pushbullet"; - } - } + public override string Name => "Pushbullet"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs b/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs index 67484a92d..a57eb0eb2 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs @@ -15,10 +15,7 @@ public Pushalot(IPushalotProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "https://www.Pushalot.com/"; } - } + public override string Link => "https://www.Pushalot.com/"; public override void OnGrab(GrabMessage grabMessage) { @@ -38,21 +35,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Pushalot"; - } - } + public override string Name => "Pushalot"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs b/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs index 8112a224f..29f067e75 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs @@ -32,13 +32,7 @@ public PushalotSettings() [FieldDefinition(2, Label = "Image", Type = FieldType.Checkbox, HelpText = "Include Sonarr logo with notifications")] public bool Image { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(AuthToken); - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(AuthToken); public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs b/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs index c61320d46..ee8f61053 100644 --- a/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs +++ b/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs @@ -14,10 +14,7 @@ public Pushover(IPushoverProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "https://pushover.net/"; } - } + public override string Link => "https://pushover.net/"; public override void OnGrab(GrabMessage grabMessage) { @@ -37,21 +34,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Pushover"; - } - } + public override string Name => "Pushover"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs b/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs index d985baeed..c03ea7cc6 100644 --- a/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs +++ b/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs @@ -43,13 +43,7 @@ public PushoverSettings() [FieldDefinition(5, Label = "Sound", Type = FieldType.Textbox, HelpText = "Notification sound, leave blank to use the default", HelpLink = "https://pushover.net/api#sounds")] public string Sound { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(UserKey) && Priority >= -1 && Priority <= 2; - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(UserKey) && Priority >= -1 && Priority <= 2; public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Slack/Slack.cs b/src/NzbDrone.Core/Notifications/Slack/Slack.cs index 203d0d7ec..498d17349 100644 --- a/src/NzbDrone.Core/Notifications/Slack/Slack.cs +++ b/src/NzbDrone.Core/Notifications/Slack/Slack.cs @@ -21,18 +21,9 @@ public Slack(Logger logger) _logger = logger; } - public override string Name - { - get - { - return "Slack"; - } - } + public override string Name => "Slack"; - public override string Link - { - get { return "https://my.slack.com/services/new/incoming-webhook/"; } - } + public override string Link => "https://my.slack.com/services/new/incoming-webhook/"; public override void OnGrab(GrabMessage message) { diff --git a/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs b/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs index ed9bd2a08..4994ce00a 100644 --- a/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs +++ b/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs @@ -16,10 +16,7 @@ public SynologyIndexer(ISynologyIndexerProxy indexerProxy) _indexerProxy = indexerProxy; } - public override string Link - { - get { return "http://www.synology.com"; } - } + public override string Link => "http://www.synology.com"; public override void OnGrab(GrabMessage grabMessage) { @@ -53,13 +50,7 @@ public override void OnRename(Series series) } } - public override string Name - { - get - { - return "Synology Indexer"; - } - } + public override string Name => "Synology Indexer"; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs b/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs index 837599d76..240008c5e 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs @@ -14,10 +14,7 @@ public Telegram(ITelegramProxy proxy) _proxy = proxy; } - public override string Link - { - get { return "https://telegram.org/"; } - } + public override string Link => "https://telegram.org/"; public override void OnGrab(GrabMessage grabMessage) { @@ -37,21 +34,9 @@ public override void OnRename(Series series) { } - public override string Name - { - get - { - return "Telegram"; - } - } + public override string Name => "Telegram"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs b/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs index dcd1559ee..58f04709e 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs @@ -24,13 +24,7 @@ public class TelegramSettings : IProviderConfig [FieldDefinition(1, Label = "Chat ID", HelpLink = "http://stackoverflow.com/a/37396871/882971", HelpText = "You must start a conversation with the bot or add it to your group to receive messages")] public string ChatId { get; set; } - public bool IsValid - { - get - { - return !string.IsNullOrWhiteSpace(ChatId) && !string.IsNullOrWhiteSpace(BotToken); - } - } + public bool IsValid => !string.IsNullOrWhiteSpace(ChatId) && !string.IsNullOrWhiteSpace(BotToken); public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs b/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs index 40a0c74c0..b19c7725f 100644 --- a/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs +++ b/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs @@ -17,10 +17,7 @@ public Twitter(ITwitterService twitterService) _twitterService = twitterService; } - public override string Link - { - get { return "https://twitter.com/"; } - } + public override string Link => "https://twitter.com/"; public override void OnGrab(GrabMessage message) { @@ -77,21 +74,9 @@ public override object RequestAction(string action, IDictionary return new { }; } - public override string Name - { - get - { - return "Twitter"; - } - } + public override string Name => "Twitter"; - public override bool SupportsOnRename - { - get - { - return false; - } - } + public override bool SupportsOnRename => false; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs index 12f72dd91..4bfcb867c 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs @@ -15,10 +15,7 @@ public Webhook(IWebhookService service) _service = service; } - public override string Link - { - get { return "https://github.com/Sonarr/Sonarr/wiki/Webhook"; } - } + public override string Link => "https://github.com/Sonarr/Sonarr/wiki/Webhook"; public override void OnGrab(GrabMessage message) { @@ -35,13 +32,7 @@ public override void OnRename(Series series) _service.OnRename(series, Settings); } - public override string Name - { - get - { - return "Webhook"; - } - } + public override string Name => "Webhook"; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs b/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs index 2712f2faa..93b58e355 100644 --- a/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs +++ b/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs @@ -20,10 +20,7 @@ public Xbmc(IXbmcService xbmcService, Logger logger) _logger = logger; } - public override string Link - { - get { return "http://xbmc.org/"; } - } + public override string Link => "http://xbmc.org/"; public override void OnGrab(GrabMessage grabMessage) { @@ -45,13 +42,7 @@ public override void OnRename(Series series) UpdateAndClean(series); } - public override string Name - { - get - { - return "Kodi (XBMC)"; - } - } + public override string Name => "Kodi (XBMC)"; public override ValidationResult Test() { diff --git a/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs b/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs index 79d7a7749..a078e18ae 100644 --- a/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs +++ b/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs @@ -56,7 +56,7 @@ public XbmcSettings() public bool AlwaysUpdate { get; set; } [JsonIgnore] - public string Address { get { return string.Format("{0}:{1}", Host, Port); } } + public string Address => string.Format("{0}:{1}", Host, Port); public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Organizer/NamingConfig.cs b/src/NzbDrone.Core/Organizer/NamingConfig.cs index 63a8e2ec8..5de62a090 100644 --- a/src/NzbDrone.Core/Organizer/NamingConfig.cs +++ b/src/NzbDrone.Core/Organizer/NamingConfig.cs @@ -4,23 +4,17 @@ namespace NzbDrone.Core.Organizer { public class NamingConfig : ModelBase { - public static NamingConfig Default + public static NamingConfig Default => new NamingConfig { - get - { - return new NamingConfig - { - RenameEpisodes = false, - ReplaceIllegalCharacters = true, - MultiEpisodeStyle = 0, - StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}", - DailyEpisodeFormat = "{Series Title} - {Air-Date} - {Episode Title} {Quality Full}", - AnimeEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}", - SeriesFolderFormat = "{Series Title}", - SeasonFolderFormat = "Season {season}" - }; - } - } + RenameEpisodes = false, + ReplaceIllegalCharacters = true, + MultiEpisodeStyle = 0, + StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}", + DailyEpisodeFormat = "{Series Title} - {Air-Date} - {Episode Title} {Quality Full}", + AnimeEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}", + SeriesFolderFormat = "{Series Title}", + SeasonFolderFormat = "Season {season}" + }; public bool RenameEpisodes { get; set; } public bool ReplaceIllegalCharacters { get; set; } diff --git a/src/NzbDrone.Core/Parser/Model/LocalEpisode.cs b/src/NzbDrone.Core/Parser/Model/LocalEpisode.cs index f099c036e..62e3a75c2 100644 --- a/src/NzbDrone.Core/Parser/Model/LocalEpisode.cs +++ b/src/NzbDrone.Core/Parser/Model/LocalEpisode.cs @@ -31,13 +31,7 @@ public int SeasonNumber } } - public bool IsSpecial - { - get - { - return SeasonNumber == 0; - } - } + public bool IsSpecial => SeasonNumber == 0; public override string ToString() { diff --git a/src/NzbDrone.Core/Qualities/Quality.cs b/src/NzbDrone.Core/Qualities/Quality.cs index 64ea2cd56..102b87bc5 100644 --- a/src/NzbDrone.Core/Qualities/Quality.cs +++ b/src/NzbDrone.Core/Qualities/Quality.cs @@ -56,27 +56,27 @@ public override bool Equals(object obj) return !Equals(left, right); } - public static Quality Unknown { get { return new Quality(0, "Unknown"); } } - public static Quality SDTV { get { return new Quality(1, "SDTV"); } } - public static Quality DVD { get { return new Quality(2, "DVD"); } } - public static Quality WEBDL1080p { get { return new Quality(3, "WEBDL-1080p"); } } - public static Quality HDTV720p { get { return new Quality(4, "HDTV-720p"); } } - public static Quality WEBDL720p { get { return new Quality(5, "WEBDL-720p"); } } - public static Quality Bluray720p { get { return new Quality(6, "Bluray-720p"); } } - public static Quality Bluray1080p { get { return new Quality(7, "Bluray-1080p"); } } - public static Quality WEBDL480p { get { return new Quality(8, "WEBDL-480p"); } } - public static Quality HDTV1080p { get { return new Quality(9, "HDTV-1080p"); } } - public static Quality RAWHD { get { return new Quality(10, "Raw-HD"); } } + public static Quality Unknown => new Quality(0, "Unknown"); + public static Quality SDTV => new Quality(1, "SDTV"); + public static Quality DVD => new Quality(2, "DVD"); + public static Quality WEBDL1080p => new Quality(3, "WEBDL-1080p"); + public static Quality HDTV720p => new Quality(4, "HDTV-720p"); + public static Quality WEBDL720p => new Quality(5, "WEBDL-720p"); + public static Quality Bluray720p => new Quality(6, "Bluray-720p"); + public static Quality Bluray1080p => new Quality(7, "Bluray-1080p"); + public static Quality WEBDL480p => new Quality(8, "WEBDL-480p"); + public static Quality HDTV1080p => new Quality(9, "HDTV-1080p"); + public static Quality RAWHD => new Quality(10, "Raw-HD"); //public static Quality HDTV480p { get { return new Quality(11, "HDTV-480p"); } } //public static Quality WEBRip480p { get { return new Quality(12, "WEBRip-480p"); } } //public static Quality Bluray480p { get { return new Quality(13, "Bluray-480p"); } } //public static Quality WEBRip720p { get { return new Quality(14, "WEBRip-720p"); } } //public static Quality WEBRip1080p { get { return new Quality(15, "WEBRip-1080p"); } } - public static Quality HDTV2160p { get { return new Quality(16, "HDTV-2160p"); } } + public static Quality HDTV2160p => new Quality(16, "HDTV-2160p"); //public static Quality WEBRip2160p { get { return new Quality(17, "WEBRip-2160p"); } } - public static Quality WEBDL2160p { get { return new Quality(18, "WEBDL-2160p"); } } - public static Quality Bluray2160p { get { return new Quality(19, "Bluray-2160p"); } } - + public static Quality WEBDL2160p => new Quality(18, "WEBDL-2160p"); + public static Quality Bluray2160p => new Quality(19, "Bluray-2160p"); + static Quality() { All = new List diff --git a/src/NzbDrone.Core/RemotePathMappings/RemotePathMappingRepository.cs b/src/NzbDrone.Core/RemotePathMappings/RemotePathMappingRepository.cs index 880b030c5..a7df3c35a 100644 --- a/src/NzbDrone.Core/RemotePathMappings/RemotePathMappingRepository.cs +++ b/src/NzbDrone.Core/RemotePathMappings/RemotePathMappingRepository.cs @@ -16,12 +16,6 @@ public RemotePathMappingRepository(IMainDatabase database, IEventAggregator even { } - protected override bool PublishModelEvents - { - get - { - return true; - } - } + protected override bool PublishModelEvents => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/RootFolders/RootFolderRepository.cs b/src/NzbDrone.Core/RootFolders/RootFolderRepository.cs index cca568596..6983b67fc 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderRepository.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderRepository.cs @@ -16,12 +16,6 @@ public RootFolderRepository(IMainDatabase database, IEventAggregator eventAggreg { } - protected override bool PublishModelEvents - { - get - { - return true; - } - } + protected override bool PublishModelEvents => true; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Tv/Commands/RefreshSeriesCommand.cs b/src/NzbDrone.Core/Tv/Commands/RefreshSeriesCommand.cs index fbe346a26..4cae630cd 100644 --- a/src/NzbDrone.Core/Tv/Commands/RefreshSeriesCommand.cs +++ b/src/NzbDrone.Core/Tv/Commands/RefreshSeriesCommand.cs @@ -15,20 +15,8 @@ public RefreshSeriesCommand(int? seriesId) SeriesId = seriesId; } - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; - public override bool UpdateScheduledTask - { - get - { - return !SeriesId.HasValue; - } - } + public override bool UpdateScheduledTask => !SeriesId.HasValue; } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Tv/Episode.cs b/src/NzbDrone.Core/Tv/Episode.cs index fdbd22704..dcb95069e 100644 --- a/src/NzbDrone.Core/Tv/Episode.cs +++ b/src/NzbDrone.Core/Tv/Episode.cs @@ -39,10 +39,7 @@ public Episode() public Series Series { get; set; } - public bool HasFile - { - get { return EpisodeFileId > 0; } - } + public bool HasFile => EpisodeFileId > 0; public override string ToString() { diff --git a/src/NzbDrone.Core/Update/Commands/ApplicationUpdateCommand.cs b/src/NzbDrone.Core/Update/Commands/ApplicationUpdateCommand.cs index aef7533c8..5911a9a13 100644 --- a/src/NzbDrone.Core/Update/Commands/ApplicationUpdateCommand.cs +++ b/src/NzbDrone.Core/Update/Commands/ApplicationUpdateCommand.cs @@ -4,20 +4,8 @@ namespace NzbDrone.Core.Update.Commands { public class ApplicationUpdateCommand : Command { - public override bool SendUpdatesToClient - { - get - { - return true; - } - } + public override bool SendUpdatesToClient => true; - public override string CompletionMessage - { - get - { - return "Restarting Sonarr to apply updates"; - } - } + public override string CompletionMessage => "Restarting Sonarr to apply updates"; } } diff --git a/src/NzbDrone.Core/Validation/NzbDroneValidationResult.cs b/src/NzbDrone.Core/Validation/NzbDroneValidationResult.cs index a0b16e860..d675fbb7a 100644 --- a/src/NzbDrone.Core/Validation/NzbDroneValidationResult.cs +++ b/src/NzbDrone.Core/Validation/NzbDroneValidationResult.cs @@ -51,17 +51,8 @@ public NzbDroneValidationResult(IEnumerable failures) public new IList Errors { get; private set; } public IList Warnings { get; private set; } - public virtual bool HasWarnings - { - get { return Warnings.Any(); } - } + public virtual bool HasWarnings => Warnings.Any(); - public override bool IsValid - { - get - { - return Errors.Empty(); - } - } + public override bool IsValid => Errors.Empty(); } } \ No newline at end of file diff --git a/src/NzbDrone.Host/AccessControl/UrlAcl.cs b/src/NzbDrone.Host/AccessControl/UrlAcl.cs index cfcbd855a..6ef028b91 100644 --- a/src/NzbDrone.Host/AccessControl/UrlAcl.cs +++ b/src/NzbDrone.Host/AccessControl/UrlAcl.cs @@ -9,12 +9,6 @@ public class UrlAcl public int Port { get; set; } public string UrlBase { get; set; } - public string Url - { - get - { - return string.Format("{0}://{1}:{2}/{3}", Scheme, Address, Port, UrlBase); - } - } + public string Url => string.Format("{0}://{1}:{2}/{3}", Scheme, Address, Port, UrlBase); } } diff --git a/src/NzbDrone.Host/Owin/MiddleWare/NancyMiddleWare.cs b/src/NzbDrone.Host/Owin/MiddleWare/NancyMiddleWare.cs index c6116a46a..89f664864 100644 --- a/src/NzbDrone.Host/Owin/MiddleWare/NancyMiddleWare.cs +++ b/src/NzbDrone.Host/Owin/MiddleWare/NancyMiddleWare.cs @@ -13,7 +13,7 @@ public NancyMiddleWare(INancyBootstrapper nancyBootstrapper) _nancyBootstrapper = nancyBootstrapper; } - public int Order { get { return 2; } } + public int Order => 2; public void Attach(IAppBuilder appBuilder) { diff --git a/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs b/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs index 83c8678ec..a74d9b1d3 100644 --- a/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs +++ b/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Host.Owin.MiddleWare { public class NzbDroneVersionMiddleWare : IOwinMiddleWare { - public int Order { get { return 0; } } + public int Order => 0; public void Attach(IAppBuilder appBuilder) { diff --git a/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs b/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs index 395ff6f2f..0df60a326 100644 --- a/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs +++ b/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Host.Owin.MiddleWare { public class SignalRMiddleWare : IOwinMiddleWare { - public int Order { get { return 1; } } + public int Order => 1; public SignalRMiddleWare(IContainer container) { diff --git a/src/NzbDrone.Host/Owin/NlogTextWriter.cs b/src/NzbDrone.Host/Owin/NlogTextWriter.cs index 17c0ce8e9..2d04acf1a 100644 --- a/src/NzbDrone.Host/Owin/NlogTextWriter.cs +++ b/src/NzbDrone.Host/Owin/NlogTextWriter.cs @@ -13,13 +13,7 @@ public NlogTextWriter(Logger logger) _logger = logger; } - public override Encoding Encoding - { - get - { - return Encoding.Default; - } - } + public override Encoding Encoding => Encoding.Default; public override void Write(char[] buffer, int index, int count) { diff --git a/src/NzbDrone.Integration.Test/IntegrationTest.cs b/src/NzbDrone.Integration.Test/IntegrationTest.cs index 64efaa527..7e0e96dcd 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTest.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTest.cs @@ -11,20 +11,11 @@ public abstract class IntegrationTest : IntegrationTestBase { protected NzbDroneRunner _runner; - public override string SeriesRootFolder - { - get { return GetTempDirectory("SeriesRootFolder") ; } - } + public override string SeriesRootFolder => GetTempDirectory("SeriesRootFolder"); - protected override string RootUrl - { - get { return "http://localhost:8989/"; } - } + protected override string RootUrl => "http://localhost:8989/"; - protected override string ApiKey - { - get { return _runner.ApiKey; } - } + protected override string ApiKey => _runner.ApiKey; protected override void StartTestTarget() { diff --git a/src/NzbDrone.Integration.Test/IntegrationTestBase.cs b/src/NzbDrone.Integration.Test/IntegrationTestBase.cs index e587a9aef..4f6a78a0b 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTestBase.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTestBase.cs @@ -59,13 +59,7 @@ public abstract class IntegrationTestBase private List _signalRReceived; private Connection _signalrConnection; - protected IEnumerable SignalRMessages - { - get - { - return _signalRReceived; - } - } + protected IEnumerable SignalRMessages => _signalRReceived; public IntegrationTestBase() { diff --git a/src/NzbDrone.Mono/Disk/ProcMount.cs b/src/NzbDrone.Mono/Disk/ProcMount.cs index 586cba170..87e428112 100644 --- a/src/NzbDrone.Mono/Disk/ProcMount.cs +++ b/src/NzbDrone.Mono/Disk/ProcMount.cs @@ -20,38 +20,23 @@ public ProcMount(DriveType driveType, string name, string mount, string type, Di _unixDriveInfo = new UnixDriveInfo(mount); } - public long AvailableFreeSpace - { - get { return _unixDriveInfo.AvailableFreeSpace; } - } + public long AvailableFreeSpace => _unixDriveInfo.AvailableFreeSpace; public string DriveFormat { get; private set; } public DriveType DriveType { get; private set; } - public bool IsReady - { - get { return _unixDriveInfo.IsReady; } - } + public bool IsReady => _unixDriveInfo.IsReady; public string Name { get; private set; } public string RootDirectory { get; private set; } - public long TotalFreeSpace - { - get { return _unixDriveInfo.TotalFreeSpace; } - } + public long TotalFreeSpace => _unixDriveInfo.TotalFreeSpace; - public long TotalSize - { - get { return _unixDriveInfo.TotalSize; } - } + public long TotalSize => _unixDriveInfo.TotalSize; - public string VolumeLabel - { - get { return _unixDriveInfo.VolumeLabel; } - } + public string VolumeLabel => _unixDriveInfo.VolumeLabel; public string VolumeName { diff --git a/src/NzbDrone.SignalR/NzbDronePersistentConnection.cs b/src/NzbDrone.SignalR/NzbDronePersistentConnection.cs index 914c66cee..dfa063a0e 100644 --- a/src/NzbDrone.SignalR/NzbDronePersistentConnection.cs +++ b/src/NzbDrone.SignalR/NzbDronePersistentConnection.cs @@ -10,13 +10,7 @@ public interface IBroadcastSignalRMessage public sealed class NzbDronePersistentConnection : PersistentConnection, IBroadcastSignalRMessage { - private IPersistentConnectionContext Context - { - get - { - return ((ConnectionManager)GlobalHost.ConnectionManager).GetConnection(GetType()); - } - } + private IPersistentConnectionContext Context => ((ConnectionManager)GlobalHost.ConnectionManager).GetConnection(GetType()); public void BroadcastMessage(SignalRMessage message) { diff --git a/src/NzbDrone.Test.Common/ConcurrencyCounter.cs b/src/NzbDrone.Test.Common/ConcurrencyCounter.cs index 2cc1f08ad..03586ad60 100644 --- a/src/NzbDrone.Test.Common/ConcurrencyCounter.cs +++ b/src/NzbDrone.Test.Common/ConcurrencyCounter.cs @@ -10,7 +10,7 @@ public class ConcurrencyCounter readonly object _mutex = new object(); readonly Dictionary _threads = new Dictionary(); - public int MaxThreads { get { return _threads.Count; } } + public int MaxThreads => _threads.Count; public ConcurrencyCounter(int items) { diff --git a/src/NzbDrone.Windows/EnvironmentInfo/DotNetRuntimeProvider.cs b/src/NzbDrone.Windows/EnvironmentInfo/DotNetRuntimeProvider.cs index a1d1f75ad..8e0330f1f 100644 --- a/src/NzbDrone.Windows/EnvironmentInfo/DotNetRuntimeProvider.cs +++ b/src/NzbDrone.Windows/EnvironmentInfo/DotNetRuntimeProvider.cs @@ -11,12 +11,6 @@ public DotNetRuntimeProvider(Common.IServiceProvider serviceProvider, Logger log { } - public override string RuntimeVersion - { - get - { - return Environment.Version.ToString(); - } - } + public override string RuntimeVersion => Environment.Version.ToString(); } } diff --git a/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs b/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs index e7715cbb8..78e881170 100644 --- a/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs +++ b/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs @@ -8,13 +8,7 @@ namespace ServiceInstall { public static class ServiceHelper { - private static string NzbDroneExe - { - get - { - return Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "NzbDrone.Console.exe"); - } - } + private static string NzbDroneExe => Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "NzbDrone.Console.exe"); private static bool IsAnAdministrator() { diff --git a/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs b/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs index fe2457794..e5fedb19e 100644 --- a/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs +++ b/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs @@ -8,13 +8,7 @@ namespace ServiceUninstall { public static class ServiceHelper { - private static string NzbDroneExe - { - get - { - return Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "NzbDrone.Console.exe"); - } - } + private static string NzbDroneExe => Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "NzbDrone.Console.exe"); private static bool IsAnAdministrator() {