ConfigurationExtension.cs 839 B

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