ConfigurationPageInfo.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using MediaBrowser.Common.Plugins;
  2. using MediaBrowser.Controller.Plugins;
  3. using MediaBrowser.Model.Plugins;
  4. namespace MediaBrowser.WebDashboard.Api
  5. {
  6. public class ConfigurationPageInfo
  7. {
  8. /// <summary>
  9. /// Gets the name.
  10. /// </summary>
  11. /// <value>The name.</value>
  12. public string Name { get; set; }
  13. /// <summary>
  14. /// Gets the type of the configuration page.
  15. /// </summary>
  16. /// <value>The type of the configuration page.</value>
  17. public ConfigurationPageType ConfigurationPageType { get; set; }
  18. /// <summary>
  19. /// Gets or sets the plugin id.
  20. /// </summary>
  21. /// <value>The plugin id.</value>
  22. public string PluginId { get; set; }
  23. public ConfigurationPageInfo(IPluginConfigurationPage page)
  24. {
  25. Name = page.Name;
  26. ConfigurationPageType = page.ConfigurationPageType;
  27. // Don't use "N" because it needs to match Plugin.Id
  28. PluginId = page.Plugin.Id.ToString();
  29. }
  30. public ConfigurationPageInfo(IPlugin plugin, PluginPageInfo page)
  31. {
  32. Name = page.Name;
  33. // Don't use "N" because it needs to match Plugin.Id
  34. PluginId = plugin.Id.ToString();
  35. }
  36. }
  37. }