/// <summary> /// Mapping first element to the StorageProvider /// </summary> /// <param name="elements"></param> /// <returns></returns> private StorageProvider MappingFirstElementToStorageProvider(SettingElementCollection <ProviderSettingElement> elements) { if (elements.Count == 0) { return(null); } return(MappingElementToStorageProvider(elements[0])); }
/// <summary> /// Mapping all elements to the list of StorageProvider /// </summary> /// <returns></returns> private List <StorageProvider> MappingElementsToStorageProviders(SettingElementCollection <ProviderSettingElement> elements) { var result = new List <StorageProvider>(); foreach (ProviderSettingElement element in elements) { result.Add(MappingElementToStorageProvider(element)); } return(result); }
/// <summary> /// Mapping all elements to the list of Wiki /// </summary> /// <returns></returns> private List <Wiki> MappingElementsToWikis(SettingElementCollection <WikiElement> elements) { var result = new List <Wiki>(); foreach (WikiElement element in elements) { result.Add(new Wiki(element.Name, element.Host.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList <string>())); } return(result); }