예제 #1
0
 /// <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]));
 }
예제 #2
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);
        }
예제 #3
0
        /// <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);
        }