Show
Ignore:
Timestamp:
03/08/12 23:19:12 (16 months ago)
Author:
bayral
Message:

new project for windows live publish plugin
Well advance single uploader

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/PiwigoLib/DTO/Helper/PwgEnumHelper.cs

    r11850 r13520  
    22using System.Reflection; 
    33using System.Xml.Serialization; 
     4using System.Collections.Generic; 
    45 
    56namespace Com.Piwigo.Lib.DTO.Helper 
    67{ 
    7     internal static class PwgEnumHelper<T> 
     8    public static class PwgEnumHelper<T> 
    89    { 
    910        static PwgEnumHelper() 
     
    4243            throw new ArgumentException(String.Format("PwgEnumHelper<{0}>.enumValueOf({1}): The String is not a description or value of the specified enum.", typeof(T).Name, value)); 
    4344        } 
     45 
     46        public static List<KeyValuePair<T, String>> buildChoiceList() 
     47        { 
     48            List<KeyValuePair<T, String>> lst = new List<KeyValuePair<T, String>>(); 
     49 
     50            foreach (T item in Enum.GetValues(typeof(T))) 
     51                { 
     52                lst.Add(new KeyValuePair<T, String>(item, StringValueOf(item))); 
     53                } 
     54   
     55            return lst; 
     56        } 
    4457    } 
    4558}