ChannelConfigurations.cs 858 B

1234567891011121314151617181920212223242526272829
  1. using MediaBrowser.Common.Configuration;
  2. using MediaBrowser.Model.Configuration;
  3. using System.Collections.Generic;
  4. namespace MediaBrowser.Server.Implementations.Channels
  5. {
  6. public static class ChannelConfigurationExtension
  7. {
  8. public static ChannelOptions GetChannelsConfiguration(this IConfigurationManager manager)
  9. {
  10. return manager.GetConfiguration<ChannelOptions>("channels");
  11. }
  12. }
  13. public class ChannelConfigurationFactory : IConfigurationFactory
  14. {
  15. public IEnumerable<ConfigurationStore> GetConfigurations()
  16. {
  17. return new List<ConfigurationStore>
  18. {
  19. new ConfigurationStore
  20. {
  21. Key = "channels",
  22. ConfigurationType = typeof (ChannelOptions)
  23. }
  24. };
  25. }
  26. }
  27. }