Facebook
Twitter
Pinterest
Tumblr
GitHub
RSS
  • DEV Home
  • Documentation
  • Reference
  • Download
Search Results for

    Show / Hide Table of Contents

    Class BasePlugin<TConfigurationType>

    Provides a common base class for all plugins

    Inheritance
    System.Object
    BasePlugin
    BasePlugin<TConfigurationType>
    Implements
    IPlugin
    IPluginAssembly
    IHasPluginConfiguration
    Inherited Members
    BasePlugin.Name
    BasePlugin.Description
    BasePlugin.Id
    BasePlugin.Version
    BasePlugin.AssemblyFilePath
    BasePlugin.OnUninstalling()
    BasePlugin.SetAttributes(String, String, Version)
    BasePlugin.SetId(Guid)
    BasePlugin.DataFolderPath
    BasePlugin.GetPluginPageUrl(String)
    Namespace: MediaBrowser.Common.Plugins
    Assembly: MediaBrowser.Common.dll
    Syntax
    public abstract class BasePlugin<TConfigurationType> : BasePlugin, IPlugin, IPluginAssembly, IHasPluginConfiguration where TConfigurationType : BasePluginConfiguration
    Type Parameters
    Name Description
    TConfigurationType

    The type of the T configuration type.

    Constructors

    BasePlugin(IApplicationPaths, IXmlSerializer)

    Initializes a new instance of the BasePlugin<TConfigurationType> class.

    Declaration
    protected BasePlugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
    Parameters
    Type Name Description
    IApplicationPaths applicationPaths

    The application paths.

    IXmlSerializer xmlSerializer

    The XML serializer.

    Properties

    ApplicationPaths

    Gets the application paths.

    Declaration
    protected IApplicationPaths ApplicationPaths { get; }
    Property Value
    Type Description
    IApplicationPaths

    The application paths.

    AssemblyFileName

    Gets the name the assembly file

    Declaration
    protected string AssemblyFileName { get; }
    Property Value
    Type Description
    System.String

    The name of the assembly file.

    Configuration

    Gets the plugin's configuration

    Declaration
    public TConfigurationType Configuration { get; protected set; }
    Property Value
    Type Description
    TConfigurationType

    The configuration.

    ConfigurationFileName

    Gets the name of the configuration file. Subclasses should override

    Declaration
    public virtual string ConfigurationFileName { get; }
    Property Value
    Type Description
    System.String

    The name of the configuration file.

    ConfigurationFilePath

    Gets the full path to the configuration file

    Declaration
    public string ConfigurationFilePath { get; }
    Property Value
    Type Description
    System.String

    The configuration file path.

    ConfigurationType

    Gets the type of configuration this plugin uses

    Declaration
    public Type ConfigurationType { get; }
    Property Value
    Type Description
    System.Type

    The type of the configuration.

    IsFirstRun

    Gets a value indicating whether this instance is first run.

    Declaration
    public bool IsFirstRun { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is first run; otherwise, false.

    XmlSerializer

    Gets the XML serializer.

    Declaration
    protected IXmlSerializer XmlSerializer { get; }
    Property Value
    Type Description
    IXmlSerializer

    The XML serializer.

    Methods

    GetPluginInfo()

    Declaration
    public override PluginInfo GetPluginInfo()
    Returns
    Type Description
    PluginInfo
    Overrides
    BasePlugin.GetPluginInfo()

    SaveConfiguration()

    Saves the current configuration to the file system

    Declaration
    public virtual void SaveConfiguration()

    SetStartupInfo(Action<String>)

    Declaration
    public void SetStartupInfo(Action<string> directoryCreateFn)
    Parameters
    Type Name Description
    System.Action<System.String> directoryCreateFn

    UpdateConfiguration(BasePluginConfiguration)

    Completely overwrites the current configuration with a new copy Returns true or false indicating success or failure

    Declaration
    public virtual void UpdateConfiguration(BasePluginConfiguration configuration)
    Parameters
    Type Name Description
    BasePluginConfiguration configuration

    The configuration.

    Exceptions
    Type Condition
    System.ArgumentNullException

    configuration

    Explicit Interface Implementations

    IHasPluginConfiguration.Configuration

    Gets the plugin's configuration

    Declaration
    BasePluginConfiguration IHasPluginConfiguration.Configuration { get; }
    Returns
    Type Description
    BasePluginConfiguration

    The configuration.

    Implements

    IPlugin
    IPluginAssembly
    IHasPluginConfiguration

    Extension Methods

    Extensions.JsonClone<T>(T, IJsonSerializer)
    SDK
    On this Page
    Back to Top Copyright 2022 © EMBY LLC. Please see our terms of use and privacy policy.