ConfigurationExtension.cs 808 B

12345678910111213141516171819202122232425262728293031
  1. #pragma warning disable CS1591
  2. using System.Collections.Generic;
  3. using Emby.Dlna.Configuration;
  4. using MediaBrowser.Common.Configuration;
  5. namespace Emby.Dlna
  6. {
  7. public static class ConfigurationExtension
  8. {
  9. public static DlnaOptions GetDlnaConfiguration(this IConfigurationManager manager)
  10. {
  11. return manager.GetConfiguration<DlnaOptions>("dlna");
  12. }
  13. }
  14. public class DlnaConfigurationFactory : IConfigurationFactory
  15. {
  16. public IEnumerable<ConfigurationStore> GetConfigurations()
  17. {
  18. return new ConfigurationStore[]
  19. {
  20. new ConfigurationStore
  21. {
  22. Key = "dlna",
  23. ConfigurationType = typeof (DlnaOptions)
  24. }
  25. };
  26. }
  27. }
  28. }