aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:31:14 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:31:14 +0100
commita36658f6f0ed342d8b55dbf7c9ff95fe3abfa818 (patch)
treeb1484407efd83b243d0ea792b18c598e9ff53053 /MediaBrowser.Common
parent9fa60ec9340cbc8b4ed3e866fcf61852077902a1 (diff)
ReSharper Reformat: Properties to expression bodied form.
Diffstat (limited to 'MediaBrowser.Common')
-rw-r--r--MediaBrowser.Common/Net/HttpRequestOptions.cs14
-rw-r--r--MediaBrowser.Common/Plugins/BasePlugin.cs41
2 files changed, 11 insertions, 44 deletions
diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs
index 938b56285..0b21472f0 100644
--- a/MediaBrowser.Common/Net/HttpRequestOptions.cs
+++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs
@@ -24,11 +24,8 @@ namespace MediaBrowser.Common.Net
/// <value>The accept header.</value>
public string AcceptHeader
{
- get { return GetHeaderValue("Accept"); }
- set
- {
- RequestHeaders["Accept"] = value;
- }
+ get => GetHeaderValue("Accept");
+ set => RequestHeaders["Accept"] = value;
}
/// <summary>
/// Gets or sets the cancellation token.
@@ -48,11 +45,8 @@ namespace MediaBrowser.Common.Net
/// <value>The user agent.</value>
public string UserAgent
{
- get { return GetHeaderValue("User-Agent"); }
- set
- {
- RequestHeaders["User-Agent"] = value;
- }
+ get => GetHeaderValue("User-Agent");
+ set => RequestHeaders["User-Agent"] = value;
}
/// <summary>
diff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.cs
index cd52803c6..a14c9fb34 100644
--- a/MediaBrowser.Common/Plugins/BasePlugin.cs
+++ b/MediaBrowser.Common/Plugins/BasePlugin.cs
@@ -18,10 +18,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the description.
/// </summary>
/// <value>The description.</value>
- public virtual string Description
- {
- get { return string.Empty; }
- }
+ public virtual string Description => string.Empty;
/// <summary>
/// Gets the unique id.
@@ -108,10 +105,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the type of configuration this plugin uses
/// </summary>
/// <value>The type of the configuration.</value>
- public Type ConfigurationType
- {
- get { return typeof(TConfigurationType); }
- }
+ public Type ConfigurationType => typeof(TConfigurationType);
private Action<string> _directoryCreateFn;
public void SetStartupInfo(Action<string> directoryCreateFn)
@@ -124,13 +118,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the name the assembly file
/// </summary>
/// <value>The name of the assembly file.</value>
- protected string AssemblyFileName
- {
- get
- {
- return Path.GetFileName(AssemblyFilePath);
- }
- }
+ protected string AssemblyFileName => Path.GetFileName(AssemblyFilePath);
/// <summary>
/// The _configuration sync lock
@@ -161,10 +149,7 @@ namespace MediaBrowser.Common.Plugins
}
return _configuration;
}
- protected set
- {
- _configuration = value;
- }
+ protected set => _configuration = value;
}
private TConfigurationType LoadConfiguration()
@@ -185,22 +170,13 @@ namespace MediaBrowser.Common.Plugins
/// Gets the name of the configuration file. Subclasses should override
/// </summary>
/// <value>The name of the configuration file.</value>
- public virtual string ConfigurationFileName
- {
- get { return Path.ChangeExtension(AssemblyFileName, ".xml"); }
- }
+ public virtual string ConfigurationFileName => Path.ChangeExtension(AssemblyFileName, ".xml");
/// <summary>
/// Gets the full path to the configuration file
/// </summary>
/// <value>The configuration file path.</value>
- public string ConfigurationFilePath
- {
- get
- {
- return Path.Combine(ApplicationPaths.PluginConfigurationsPath, ConfigurationFileName);
- }
- }
+ public string ConfigurationFilePath => Path.Combine(ApplicationPaths.PluginConfigurationsPath, ConfigurationFileName);
/// <summary>
/// Initializes a new instance of the <see cref="BasePlugin{TConfigurationType}" /> class.
@@ -253,10 +229,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the plugin's configuration
/// </summary>
/// <value>The configuration.</value>
- BasePluginConfiguration IHasPluginConfiguration.Configuration
- {
- get { return Configuration; }
- }
+ BasePluginConfiguration IHasPluginConfiguration.Configuration => Configuration;
public override PluginInfo GetPluginInfo()
{