mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-26 22:46:53 -04:00
Changed: Align GetValueOrDefault extension with netcore3.0 version
- netcore3.0 implements the extenion on IReadOnlyDictionary. - Dictionary implements both IReadonlyDictionary and IDictionary and so defining the extenion on both interfaces creates an ambiguous reference - IDictionary doesn't inherit from IReadOnlyDictionary Either we have to add 'using NzbDrone.Common.Extenions;' separately to resolve the ambiguity or we have to standardaize on only having the extension on IReadOnlyDictionary.
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Validation;
|
||||
using NLog;
|
||||
using FluentValidation.Results;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using NzbDrone.Core.RemotePathMappings;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.RemotePathMappings;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
{
|
||||
// this is here to resolve ambiguity in GetValueOrDefault extension method in net core 3
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
public class Deluge : TorrentClientBase<DelugeSettings>
|
||||
{
|
||||
private readonly IDelugeProxy _proxy;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||
{
|
||||
HadoukenSystemInfo GetSystemInfo(HadoukenSettings settings);
|
||||
HadoukenTorrent[] GetTorrents(HadoukenSettings settings);
|
||||
IDictionary<string, object> GetConfig(HadoukenSettings settings);
|
||||
IReadOnlyDictionary<string, object> GetConfig(HadoukenSettings settings);
|
||||
string AddTorrentFile(HadoukenSettings settings, byte[] fileContent);
|
||||
void AddTorrentUri(HadoukenSettings settings, string torrentUrl);
|
||||
void RemoveTorrent(HadoukenSettings settings, string downloadId);
|
||||
@@ -42,9 +42,9 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||
return GetTorrents(result.Torrents);
|
||||
}
|
||||
|
||||
public IDictionary<string, object> GetConfig(HadoukenSettings settings)
|
||||
public IReadOnlyDictionary<string, object> GetConfig(HadoukenSettings settings)
|
||||
{
|
||||
return ProcessRequest<IDictionary<string, object>>(settings, "webui.getSettings");
|
||||
return ProcessRequest<IReadOnlyDictionary<string, object>>(settings, "webui.getSettings");
|
||||
}
|
||||
|
||||
public string AddTorrentFile(HadoukenSettings settings, byte[] fileContent)
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Linq;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Exceptions;
|
||||
@@ -16,9 +17,6 @@ using NzbDrone.Core.Organizer;
|
||||
|
||||
namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||
{
|
||||
// this is here to resolve ambiguity in GetValueOrDefault extension method in net core 3
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
public class Nzbget : UsenetClientBase<NzbgetSettings>
|
||||
{
|
||||
private readonly INzbgetProxy _proxy;
|
||||
|
||||
Reference in New Issue
Block a user