aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-13 12:14:53 -0500
committerGitHub <noreply@github.com>2019-01-13 12:14:53 -0500
commit9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch)
tree6ca1b2b3decac1a86b886dafd2645954a13601fd /Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
parent17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff)
parentb936c439321b55bf89c99dac96fc78cefe752e84 (diff)
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs')
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs23
1 files changed, 6 insertions, 17 deletions
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
index ef2010ba6..78514c1d9 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs
@@ -40,13 +40,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
FileSystem = fileSystem;
}
- public virtual bool IsSupported
- {
- get
- {
- return true;
- }
- }
+ public virtual bool IsSupported => true;
protected abstract Task<List<ChannelInfo>> GetChannelsInternal(TunerHostInfo tuner, CancellationToken cancellationToken);
public abstract string Type { get; }
@@ -140,7 +134,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
{
if (string.IsNullOrEmpty(channelId))
{
- throw new ArgumentNullException("channelId");
+ throw new ArgumentNullException(nameof(channelId));
}
if (IsValidChannelId(channelId))
@@ -175,7 +169,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
{
if (string.IsNullOrEmpty(channelId))
{
- throw new ArgumentNullException("channelId");
+ throw new ArgumentNullException(nameof(channelId));
}
if (!IsValidChannelId(channelId))
@@ -228,18 +222,13 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
throw new LiveTvConflictException();
}
- protected virtual string ChannelIdPrefix
- {
- get
- {
- return Type + "_";
- }
- }
+ protected virtual string ChannelIdPrefix => Type + "_";
+
protected virtual bool IsValidChannelId(string channelId)
{
if (string.IsNullOrEmpty(channelId))
{
- throw new ArgumentNullException("channelId");
+ throw new ArgumentNullException(nameof(channelId));
}
return channelId.StartsWith(ChannelIdPrefix, StringComparison.OrdinalIgnoreCase);