diff options
Diffstat (limited to 'MediaBrowser.Common/Plugins/BasePlugin.cs')
| -rw-r--r-- | MediaBrowser.Common/Plugins/BasePlugin.cs | 41 |
1 files changed, 7 insertions, 34 deletions
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() { |
