public static DropdownPropertyDataSourceSettings GetConfig() { DropdownPropertyDataSourceSettings settings = (DropdownPropertyDataSourceSettings)ConfigurationBroker.GetSection("dropdownPropertyDataSourceSettings"); if (settings == null) { settings = new DropdownPropertyDataSourceSettings(); } return(settings); }
public object GetDataSource(string dataSourceID) { List <InlineDataSourceItem> result = new List <InlineDataSourceItem>(); if (dataSourceID.IsNotEmpty()) { DropdownPropertyDataSourceConfigurationElement configElement = DropdownPropertyDataSourceSettings.GetConfig().PropertySources[dataSourceID]; if (configElement != null) { foreach (InlineDropdownPropertyDataSourceItemConfigurationElement inlineItem in configElement.InlineItems) { InlineDataSourceItem item = new InlineDataSourceItem() { Key = inlineItem.Name, Name = inlineItem.Description }; result.Add(item); } } } return(result); }
private static Dictionary <string, DropdownPropertyDataSourceConfigurationElement> GetAllDropdownPropertyDataSource() { Dictionary <string, DropdownPropertyDataSourceConfigurationElement> result = new Dictionary <string, DropdownPropertyDataSourceConfigurationElement>(); DropdownPropertyDataSourceConfigurationCollection propertiesSource = DropdownPropertyDataSourceSettings.GetConfig().PropertySources; foreach (DropdownPropertyDataSourceConfigurationElement item in propertiesSource) { result.Add(item.Name, item); } return(result); }