mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Because it's 2016!
This commit is contained in:
parent
2e36538dcd
commit
aba613acd1
@ -27,7 +27,7 @@ namespace NzbDrone.Api.Authentication
|
||||
_configFileProvider = configFileProvider;
|
||||
}
|
||||
|
||||
public int Order { get { return 10; } }
|
||||
public int Order => 10;
|
||||
|
||||
public void Register(IPipelines pipelines)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||
_cacheableSpecification = cacheableSpecification;
|
||||
}
|
||||
|
||||
public int Order { get { return 0; } }
|
||||
public int Order => 0;
|
||||
|
||||
public void Register(IPipelines pipelines)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||
{
|
||||
private readonly Logger _logger;
|
||||
|
||||
public int Order { get { return 0; } }
|
||||
public int Order => 0;
|
||||
|
||||
public GzipCompressionPipeline(Logger logger)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||
_cacheableSpecification = cacheableSpecification;
|
||||
}
|
||||
|
||||
public int Order { get { return 0; } }
|
||||
public int Order => 0;
|
||||
|
||||
public void Register(IPipelines pipelines)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
||||
_errorPipeline = errorPipeline;
|
||||
}
|
||||
|
||||
public int Order { get { return 100; } }
|
||||
public int Order => 100;
|
||||
|
||||
public void Register(IPipelines pipelines)
|
||||
{
|
||||
|
@ -31,13 +31,6 @@ namespace NzbDrone.Api.Logs
|
||||
return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
|
||||
}
|
||||
|
||||
protected override string DownloadUrlRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return "logfile";
|
||||
}
|
||||
}
|
||||
|
||||
protected override string DownloadUrlRoot => "logfile";
|
||||
}
|
||||
}
|
@ -38,12 +38,6 @@ namespace NzbDrone.Api.Logs
|
||||
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
|
||||
}
|
||||
|
||||
protected override string DownloadUrlRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return "updatelogfile";
|
||||
}
|
||||
}
|
||||
protected override string DownloadUrlRoot => "updatelogfile";
|
||||
}
|
||||
}
|
@ -55,17 +55,8 @@ namespace NzbDrone.Api
|
||||
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;
|
||||
}
|
||||
}
|
@ -9,6 +9,6 @@ namespace NzbDrone.Api.Profiles.Languages
|
||||
[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();
|
||||
}
|
||||
}
|
@ -8,12 +8,6 @@ namespace NzbDrone.Api.REST
|
||||
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", "");
|
||||
}
|
||||
}
|
@ -31,10 +31,7 @@ namespace NzbDrone.Api
|
||||
/// does not mean the assembly *will* be included, a true from another delegate will
|
||||
/// take precedence.
|
||||
/// </summary>
|
||||
protected virtual IEnumerable<Func<Assembly, bool>> AutoRegisterIgnoredAssemblies
|
||||
{
|
||||
get { return DefaultAutoRegisterIgnoredAssemblies; }
|
||||
}
|
||||
protected virtual IEnumerable<Func<Assembly, bool>> AutoRegisterIgnoredAssemblies => DefaultAutoRegisterIgnoredAssemblies;
|
||||
|
||||
/// <summary>
|
||||
/// Configures the container using AutoRegister followed by registration
|
||||
|
@ -47,52 +47,16 @@ namespace NzbDrone.Automation.Test.PageModel
|
||||
});
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
@ -28,7 +28,7 @@ namespace NzbDrone.Common.Cache
|
||||
_cache.Clear();
|
||||
}
|
||||
|
||||
public ICollection<ICached> Caches { get { return _cache.Values; } }
|
||||
public ICollection<ICached> Caches => _cache.Values;
|
||||
|
||||
public ICached<T> GetCache<T>(Type host)
|
||||
{
|
||||
|
@ -67,13 +67,7 @@ namespace NzbDrone.Common.Cache
|
||||
_store.TryRemove(key, out value);
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return _store.Count;
|
||||
}
|
||||
}
|
||||
public int Count => _store.Count;
|
||||
|
||||
public T Get(string key, Func<T> function, TimeSpan? lifeTime = null)
|
||||
{
|
||||
|
@ -14,10 +14,7 @@ namespace NzbDrone.Common
|
||||
|
||||
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()
|
||||
{
|
||||
|
@ -14,15 +14,9 @@ namespace NzbDrone.Common.Disk
|
||||
_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 @@ namespace NzbDrone.Common.Disk
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
@ -77,28 +77,13 @@ namespace NzbDrone.Common.Disk
|
||||
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 @@ namespace NzbDrone.Common.Disk
|
||||
}
|
||||
}
|
||||
|
||||
public string FullPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
}
|
||||
public string FullPath => _path;
|
||||
|
||||
public string FileName
|
||||
{
|
||||
@ -162,13 +141,7 @@ namespace NzbDrone.Common.Disk
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsValid
|
||||
{
|
||||
get
|
||||
{
|
||||
return _path.IsPathValid();
|
||||
}
|
||||
}
|
||||
public bool IsValid => _path.IsPathValid();
|
||||
|
||||
private int GetFileNameIndex()
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -36,18 +36,9 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
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
|
||||
{
|
||||
|
@ -47,21 +47,9 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
public HashSet<string> Flags { get; private set; }
|
||||
public Dictionary<string, string> 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
|
||||
{
|
||||
|
@ -15,19 +15,13 @@ namespace NzbDrone.Common.Exceptron
|
||||
/// <summary>
|
||||
/// Version of Client
|
||||
/// </summary>
|
||||
public string ClientVersion
|
||||
{
|
||||
get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
|
||||
}
|
||||
public string ClientVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Name of Client
|
||||
/// </summary>
|
||||
public string ClientName
|
||||
{
|
||||
get { return "Official .NET"; }
|
||||
}
|
||||
public string ClientName => "Official .NET";
|
||||
|
||||
/// <summary>
|
||||
/// Client Configuration
|
||||
|
@ -14,13 +14,7 @@ namespace NzbDrone.Common.Exceptron.Message
|
||||
/// <summary>
|
||||
/// Was the report successfully processed on the server
|
||||
/// </summary>
|
||||
public bool Successful
|
||||
{
|
||||
get
|
||||
{
|
||||
return !string.IsNullOrEmpty(RefId);
|
||||
}
|
||||
}
|
||||
public bool Successful => !string.IsNullOrEmpty(RefId);
|
||||
|
||||
/// <summary>
|
||||
/// Exception that caused the message to fail.
|
||||
|
@ -16,13 +16,7 @@ namespace NzbDrone.Common.Exceptron.fastJSON
|
||||
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)
|
||||
{
|
||||
|
@ -328,9 +328,6 @@ namespace NzbDrone.Common.Http.Dispatchers
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool IsInvalid
|
||||
{
|
||||
get { return !_initialized || !_available; }
|
||||
}
|
||||
public override bool IsInvalid => !_initialized || !_available;
|
||||
}
|
||||
}
|
||||
|
@ -49,13 +49,7 @@ namespace NzbDrone.Common.Http
|
||||
}
|
||||
|
||||
|
||||
public bool HasHttpError
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)StatusCode >= 400;
|
||||
}
|
||||
}
|
||||
public bool HasHttpError => (int)StatusCode >= 400;
|
||||
|
||||
public Dictionary<string, string> GetCookies()
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace NzbDrone.Common.Http
|
||||
private static readonly Regex RegexUri = new Regex(@"^(?:(?<scheme>[a-z]+):)?(?://(?<host>[-A-Z0-9.]+)(?::(?<port>[0-9]{1,5}))?)?(?<path>(?:(?:(?<=^)|/)[^/?#\r\n]+)+/?|/)?(?:\?(?<query>[^#\r\n]*))?(?:\#(?<fragment>.*))?$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private readonly string _uri;
|
||||
public string FullUri { get { return _uri; } }
|
||||
public string FullUri => _uri;
|
||||
|
||||
public HttpUri(string uri)
|
||||
{
|
||||
|
@ -45,19 +45,13 @@ namespace NzbDrone.Common.Http.Proxy
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace NzbDrone.Common.TPL
|
||||
}
|
||||
|
||||
/// <summary>Gets the maximum concurrency level supported by this scheduler.</summary>
|
||||
public sealed override int MaximumConcurrencyLevel { get { return _maxDegreeOfParallelism; } }
|
||||
public sealed override int MaximumConcurrencyLevel => _maxDegreeOfParallelism;
|
||||
|
||||
/// <summary>Gets an enumerable of the tasks currently scheduled on this scheduler.</summary>
|
||||
/// <returns>An enumerable of the tasks currently scheduled.</returns>
|
||||
|
@ -669,13 +669,7 @@ namespace TinyIoC
|
||||
|
||||
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 @@ namespace TinyIoC
|
||||
/// <summary>
|
||||
/// Gets the default options (attempt resolution of unregistered types, fail on named resolution if name not found)
|
||||
/// </summary>
|
||||
public static ResolveOptions Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Default;
|
||||
}
|
||||
}
|
||||
public static ResolveOptions Default => _Default;
|
||||
|
||||
/// <summary>
|
||||
/// Preconfigured option for attempting resolution of unregistered types and failing on named resolution if name not found
|
||||
/// </summary>
|
||||
public static ResolveOptions FailNameNotFoundOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return _FailNameNotFoundOnly;
|
||||
}
|
||||
}
|
||||
public static ResolveOptions FailNameNotFoundOnly => _FailNameNotFoundOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Preconfigured option for failing on resolving unregistered types and on named resolution if name not found
|
||||
/// </summary>
|
||||
public static ResolveOptions FailUnregisteredAndNameNotFound
|
||||
{
|
||||
get
|
||||
{
|
||||
return _FailUnregisteredAndNameNotFound;
|
||||
}
|
||||
}
|
||||
public static ResolveOptions FailUnregisteredAndNameNotFound => _FailUnregisteredAndNameNotFound;
|
||||
|
||||
/// <summary>
|
||||
/// Preconfigured option for failing on resolving unregistered types, but attempting unnamed resolution if name not found
|
||||
/// </summary>
|
||||
public static ResolveOptions FailUnregisteredOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return _FailUnregisteredOnly;
|
||||
}
|
||||
}
|
||||
public static ResolveOptions FailUnregisteredOnly => _FailUnregisteredOnly;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -2394,7 +2364,7 @@ namespace TinyIoC
|
||||
/// Generally set to true for delegate style factories as CanResolve cannot delve
|
||||
/// into the delegates they contain.
|
||||
/// </summary>
|
||||
public virtual bool AssumeConstruction { get { return false; } }
|
||||
public virtual bool AssumeConstruction => false;
|
||||
|
||||
/// <summary>
|
||||
/// The type the factory instantiates
|
||||
@ -2471,7 +2441,7 @@ namespace TinyIoC
|
||||
{
|
||||
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 @@ namespace TinyIoC
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2532,9 +2490,9 @@ namespace TinyIoC
|
||||
|
||||
private Func<TinyIoCContainer, NamedParameterOverloads, object> _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 @@ namespace TinyIoC
|
||||
this.registerType = registerType;
|
||||
}
|
||||
|
||||
public override ObjectFactoryBase WeakReferenceVariant
|
||||
{
|
||||
get
|
||||
{
|
||||
return new WeakDelegateFactory(this.registerType, _factory);
|
||||
}
|
||||
}
|
||||
public override ObjectFactoryBase WeakReferenceVariant => 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 @@ namespace TinyIoC
|
||||
|
||||
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 @@ namespace TinyIoC
|
||||
}
|
||||
}
|
||||
|
||||
public override ObjectFactoryBase WeakReferenceVariant
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
public override ObjectFactoryBase WeakReferenceVariant => this;
|
||||
|
||||
public override void SetConstructor(ConstructorInfo constructor)
|
||||
{
|
||||
@ -2657,7 +2597,7 @@ namespace TinyIoC
|
||||
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 @@ namespace TinyIoC
|
||||
_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 @@ namespace TinyIoC
|
||||
_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 @@ namespace TinyIoC
|
||||
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 @@ namespace TinyIoC
|
||||
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 @@ namespace TinyIoC
|
||||
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 @@ namespace TinyIoC
|
||||
_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 @@ namespace TinyIoC
|
||||
/// <summary>
|
||||
/// Lazy created Singleton instance of the container for simple scenarios
|
||||
/// </summary>
|
||||
public static TinyIoCContainer Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Current;
|
||||
}
|
||||
}
|
||||
public static TinyIoCContainer Current => _Current;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Type Registrations
|
||||
|
@ -23,21 +23,9 @@ namespace NzbDrone.Core.Test.Framework
|
||||
|
||||
protected BasicRepository<TModel> Storage { get; private set; }
|
||||
|
||||
protected IList<TModel> AllStoredModels
|
||||
{
|
||||
get
|
||||
{
|
||||
return Storage.All().ToList();
|
||||
}
|
||||
}
|
||||
protected IList<TModel> 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 @@ namespace NzbDrone.Core.Test.Framework
|
||||
{
|
||||
private ITestDatabase _db;
|
||||
|
||||
protected virtual MigrationType MigrationType
|
||||
{
|
||||
get
|
||||
{
|
||||
return MigrationType.Main;
|
||||
}
|
||||
}
|
||||
protected virtual MigrationType MigrationType => MigrationType.Main;
|
||||
|
||||
protected ITestDatabase Db
|
||||
{
|
||||
|
@ -45,9 +45,6 @@ namespace NzbDrone.Core.Test.Framework
|
||||
}
|
||||
|
||||
[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;
|
||||
}
|
||||
}
|
@ -9,18 +9,12 @@ namespace NzbDrone.Core.Test.IndexerTests
|
||||
{
|
||||
public class TestIndexer : HttpIndexerBase<TestIndexerSettings>
|
||||
{
|
||||
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)
|
||||
|
@ -20,14 +20,8 @@ namespace NzbDrone.Core.Test.InstrumentationTests
|
||||
private static string _uniqueMessage;
|
||||
Logger _logger;
|
||||
|
||||
protected override MigrationType MigrationType
|
||||
{
|
||||
get
|
||||
{
|
||||
return MigrationType.Log;
|
||||
protected override MigrationType MigrationType => MigrationType.Log;
|
||||
|
||||
}
|
||||
}
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
|
@ -17,12 +17,6 @@ namespace NzbDrone.Core.Analytics
|
||||
_configFileProvider = configFileProvider;
|
||||
}
|
||||
|
||||
public bool IsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction;
|
||||
}
|
||||
}
|
||||
public bool IsEnabled => _configFileProvider.AnalyticsEnabled && RuntimeInfoBase.IsProduction;
|
||||
}
|
||||
}
|
@ -6,21 +6,9 @@ namespace NzbDrone.Core.Backup
|
||||
{
|
||||
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
|
||||
|
@ -4,12 +4,6 @@ namespace NzbDrone.Core.Blacklisting
|
||||
{
|
||||
public class ClearBlacklistCommand : Command
|
||||
{
|
||||
public override bool SendUpdatesToClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override bool SendUpdatesToClient => true;
|
||||
}
|
||||
}
|
@ -133,33 +133,15 @@ namespace NzbDrone.Core.Configuration
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ namespace NzbDrone.Core.Configuration
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ namespace NzbDrone.Core.Configuration
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -300,65 +300,29 @@ namespace NzbDrone.Core.Configuration
|
||||
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", ProxyType.Http); }
|
||||
}
|
||||
public ProxyType ProxyType => GetValueEnum<ProxyType>("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)
|
||||
{
|
||||
|
@ -4,12 +4,6 @@ namespace NzbDrone.Core.Configuration
|
||||
{
|
||||
public class ResetApiKeyCommand : Command
|
||||
{
|
||||
public override bool SendUpdatesToClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override bool SendUpdatesToClient => true;
|
||||
}
|
||||
}
|
||||
|
@ -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 @@ namespace NzbDrone.Core.Datastore
|
||||
_eventAggregator = eventAggregator;
|
||||
}
|
||||
|
||||
protected QueryBuilder<TModel> Query
|
||||
{
|
||||
get { return DataMapper.Query<TModel>(); }
|
||||
}
|
||||
protected QueryBuilder<TModel> Query => DataMapper.Query<TModel>();
|
||||
|
||||
protected void Delete(Expression<Func<TModel, bool>> filter)
|
||||
{
|
||||
@ -289,9 +283,6 @@ namespace NzbDrone.Core.Datastore
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool PublishModelEvents
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
protected virtual bool PublishModelEvents => false;
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +46,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||
}
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
{
|
||||
get
|
||||
{
|
||||
return typeof(int);
|
||||
}
|
||||
}
|
||||
public Type DbType => typeof(int);
|
||||
}
|
||||
}
|
@ -60,12 +60,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||
return JsonConvert.SerializeObject(clrValue, SerializerSetting);
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
{
|
||||
get
|
||||
{
|
||||
return typeof(string);
|
||||
}
|
||||
}
|
||||
public Type DbType => typeof(string);
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
||||
|
@ -30,9 +30,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||
return value.ToString();
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
{
|
||||
get { return typeof(string); }
|
||||
}
|
||||
public Type DbType => typeof(string);
|
||||
}
|
||||
}
|
||||
|
@ -31,9 +31,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||
return value.FullPath;
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
{
|
||||
get { return typeof(string); }
|
||||
}
|
||||
public Type DbType => typeof(string);
|
||||
}
|
||||
}
|
||||
|
@ -38,13 +38,7 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||
return (int)quality;
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
{
|
||||
get
|
||||
{
|
||||
return typeof(int);
|
||||
}
|
||||
}
|
||||
public Type DbType => typeof(int);
|
||||
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
|
@ -27,12 +27,6 @@ namespace NzbDrone.Core.Datastore.Converters
|
||||
return dateTime.ToUniversalTime();
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
{
|
||||
get
|
||||
{
|
||||
return typeof(DateTime);
|
||||
}
|
||||
}
|
||||
public Type DbType => typeof(DateTime);
|
||||
}
|
||||
}
|
@ -25,10 +25,7 @@ namespace NzbDrone.Core.Datastore
|
||||
return _database.GetDataMapper();
|
||||
}
|
||||
|
||||
public Version Version
|
||||
{
|
||||
get { return _database.Version; }
|
||||
}
|
||||
public Version Version => _database.Version;
|
||||
|
||||
public void Vacuum()
|
||||
{
|
||||
|
@ -25,10 +25,7 @@ namespace NzbDrone.Core.Datastore
|
||||
return _database.GetDataMapper();
|
||||
}
|
||||
|
||||
public Version Version
|
||||
{
|
||||
get { return _database.Version; }
|
||||
}
|
||||
public Version Version => _database.Version;
|
||||
|
||||
public void Vacuum()
|
||||
{
|
||||
|
@ -18,13 +18,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
|
||||
|
||||
}
|
||||
|
||||
public override bool SupportsTransactions
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override bool SupportsTransactions => true;
|
||||
|
||||
public override void Process(AlterColumnExpression expression)
|
||||
{
|
||||
|
@ -16,15 +16,9 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
|
||||
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
|
||||
{
|
||||
|
@ -9,13 +9,7 @@ namespace NzbDrone.Core.DecisionEngine
|
||||
public RemoteEpisode RemoteEpisode { get; private set; }
|
||||
public IEnumerable<Rejection> Rejections { get; private set; }
|
||||
|
||||
public bool Approved
|
||||
{
|
||||
get
|
||||
{
|
||||
return !Rejections.Any();
|
||||
}
|
||||
}
|
||||
public bool Approved => !Rejections.Any();
|
||||
|
||||
public bool TemporarilyRejected
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_episodeService = episodeService;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Temporary; } }
|
||||
public RejectionType Type => RejectionType.Temporary;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
{
|
||||
private readonly Logger _logger;
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public NotSampleSpecification(Logger logger)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Temporary; } }
|
||||
public RejectionType Type => RejectionType.Temporary;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
_episodeService = episodeService;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -13,13 +13,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return RejectionType.Permanent;
|
||||
}
|
||||
}
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
|
||||
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
|
||||
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
public RejectionType Type => RejectionType.Permanent;
|
||||
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
|
@ -24,13 +24,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||
|
||||
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 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||
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<DownloadClientItem> GetItems()
|
||||
|
@ -52,13 +52,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Usenet Blackhole";
|
||||
}
|
||||
}
|
||||
public override string Name => "Usenet Blackhole";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -75,13 +75,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
return actualHash.ToUpper();
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Deluge";
|
||||
}
|
||||
}
|
||||
public override string Name => "Deluge";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -31,10 +31,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||
_proxy = proxy;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Hadouken"; }
|
||||
}
|
||||
public override string Name => "Hadouken";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -43,13 +43,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
||||
return response;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "NZBVortex";
|
||||
}
|
||||
}
|
||||
public override string Name => "NZBVortex";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -7,13 +7,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -194,13 +194,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||
return historyItems;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "NZBGet";
|
||||
}
|
||||
}
|
||||
public override string Name => "NZBGet";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -28,21 +28,9 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
||||
_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 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
||||
return GetDownloadClientId(strmFile);
|
||||
}
|
||||
|
||||
public bool IsConfigured
|
||||
{
|
||||
get
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(Settings.NzbFolder);
|
||||
}
|
||||
}
|
||||
public bool IsConfigured => !string.IsNullOrWhiteSpace(Settings.NzbFolder);
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -189,13 +189,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||
return historyItems;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "SABnzbd";
|
||||
}
|
||||
}
|
||||
public override string Name => "SABnzbd";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -7,13 +7,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -40,12 +40,6 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Transmission";
|
||||
}
|
||||
}
|
||||
public override string Name => "Transmission";
|
||||
}
|
||||
}
|
||||
|
@ -49,12 +49,6 @@ namespace NzbDrone.Core.Download.Clients.Vuze
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Vuze";
|
||||
}
|
||||
}
|
||||
public override string Name => "Vuze";
|
||||
}
|
||||
}
|
@ -71,13 +71,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||
return hash;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "qBittorrent";
|
||||
}
|
||||
}
|
||||
public override string Name => "qBittorrent";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -94,21 +94,9 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
||||
}
|
||||
}
|
||||
|
||||
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<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -68,13 +68,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
||||
return hash;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "uTorrent";
|
||||
}
|
||||
}
|
||||
public override string Name => "uTorrent";
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
@ -24,41 +24,17 @@ namespace NzbDrone.Core.Download
|
||||
|
||||
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<ProviderDefinition> DefaultDefinitions
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<ProviderDefinition>();
|
||||
}
|
||||
}
|
||||
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
|
||||
|
||||
public ProviderDefinition Definition { get; set; }
|
||||
|
||||
public virtual object RequestAction(string action, IDictionary<string, string> query) { return null; }
|
||||
|
||||
protected TSettings Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
return (TSettings)Definition.Settings;
|
||||
}
|
||||
}
|
||||
protected TSettings Settings => (TSettings)Definition.Settings;
|
||||
|
||||
protected DownloadClientBase(IConfigService configService,
|
||||
IDiskProvider diskProvider,
|
||||
|
@ -34,21 +34,9 @@ namespace NzbDrone.Core.Download
|
||||
_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);
|
||||
|
@ -28,13 +28,7 @@ namespace NzbDrone.Core.Download
|
||||
_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);
|
||||
|
||||
|
@ -48,13 +48,7 @@ namespace NzbDrone.Core.Extras.Files
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public virtual bool PermanentlyDelete
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public virtual bool PermanentlyDelete => false;
|
||||
|
||||
public List<TExtraFile> GetFilesBySeries(int seriesId)
|
||||
{
|
||||
|
@ -23,13 +23,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.MediaBrowser
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Emby (Legacy)";
|
||||
}
|
||||
}
|
||||
public override string Name => "Emby (Legacy)";
|
||||
|
||||
public override MetadataFile FindMetadataFile(Series series, string path)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user