aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common/Plugins')
-rw-r--r--MediaBrowser.Common/Plugins/BasePlugin.cs47
-rw-r--r--MediaBrowser.Common/Plugins/IPlugin.cs6
2 files changed, 13 insertions, 40 deletions
diff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.cs
index 2fdee381d..1ff2e98ef 100644
--- a/MediaBrowser.Common/Plugins/BasePlugin.cs
+++ b/MediaBrowser.Common/Plugins/BasePlugin.cs
@@ -1,8 +1,8 @@
+using System;
+using System.IO;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
-using System;
-using System.IO;
namespace MediaBrowser.Common.Plugins
{
@@ -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.
@@ -236,7 +212,7 @@ namespace MediaBrowser.Common.Plugins
/// Returns true or false indicating success or failure
/// </summary>
/// <param name="configuration">The configuration.</param>
- /// <exception cref="System.ArgumentNullException">configuration</exception>
+ /// <exception cref="ArgumentNullException">configuration</exception>
public virtual void UpdateConfiguration(BasePluginConfiguration configuration)
{
if (configuration == null)
@@ -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()
{
diff --git a/MediaBrowser.Common/Plugins/IPlugin.cs b/MediaBrowser.Common/Plugins/IPlugin.cs
index bffd21143..32527c299 100644
--- a/MediaBrowser.Common/Plugins/IPlugin.cs
+++ b/MediaBrowser.Common/Plugins/IPlugin.cs
@@ -1,5 +1,5 @@
-using MediaBrowser.Model.Plugins;
using System;
+using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Common.Plugins
{
@@ -69,7 +69,7 @@ namespace MediaBrowser.Common.Plugins
/// Returns true or false indicating success or failure
/// </summary>
/// <param name="configuration">The configuration.</param>
- /// <exception cref="System.ArgumentNullException">configuration</exception>
+ /// <exception cref="ArgumentNullException">configuration</exception>
void UpdateConfiguration(BasePluginConfiguration configuration);
/// <summary>
@@ -80,4 +80,4 @@ namespace MediaBrowser.Common.Plugins
void SetStartupInfo(Action<string> directoryCreateFn);
}
-} \ No newline at end of file
+}