-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBassCdStreamProviderBehaviourConfiguration.cs
38 lines (32 loc) · 1.76 KB
/
BassCdStreamProviderBehaviourConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
namespace FoxTunes
{
public static class BassCdStreamProviderBehaviourConfiguration
{
public const string SECTION = "220BF762-28B1-436C-951D-5B0359473A40";
public const string ENABLED_ELEMENT = "AAAA1DA2-B933-42AC-8FE7-64BA7D7EA2B8";
public const string LOOKUP_ELEMENT = "BBBB29AB-ED22-4AB2-AD79-0EFE4EAB39B7";
public const string LOOKUP_HOST_ELEMENT = "CCCC87EE-07E2-4B95-8F9D-039738956A30";
public static IEnumerable<ConfigurationSection> GetConfigurationSections()
{
yield return new ConfigurationSection(SECTION, Strings.BassCdStreamProviderBehaviourConfiguration_Section)
.WithElement(new BooleanConfigurationElement(ENABLED_ELEMENT, Strings.BassCdStreamProviderBehaviourConfiguration_Enabled).WithValue(false))
.WithElement(new BooleanConfigurationElement(LOOKUP_ELEMENT, Strings.BassCdStreamProviderBehaviourConfiguration_Lookup)
.WithValue(true)
.DependsOn(SECTION, ENABLED_ELEMENT))
.WithElement(new TextConfigurationElement(LOOKUP_HOST_ELEMENT, Strings.BassCdStreamProviderBehaviourConfiguration_Host)
.WithValue(string.Join(Environment.NewLine, GetLookupHosts()))
.WithFlags(ConfigurationElementFlags.MultiLine)
.DependsOn(SECTION, ENABLED_ELEMENT).DependsOn(SECTION, LOOKUP_ELEMENT));
}
public static IEnumerable<string> GetLookupHosts()
{
return new[]
{
Strings.BassCdStreamProviderBehaviourConfiguration_Host1,
Strings.BassCdStreamProviderBehaviourConfiguration_Host2
};
}
}
}