コード例 #1
0
 public static List <KeyValuePair <object, string> > GetAllConditions()
 {
     return(Enum.GetValues(typeof(ConditionType))
            .Cast <ConditionType> ()
            .Select(c => new KeyValuePair <object, string> (c, PriceRuleCondition.TypeToString(c)))
            .ToList());
 }
コード例 #2
0
 public static List <KeyValuePair <object, string> > GetAllExceptions()
 {
     return(new []
     {
         ConditionType.Partner,
         ConditionType.PartnerGroup,
         ConditionType.Object,
         ConditionType.ObjectGroup,
         ConditionType.User,
         ConditionType.UserGroup,
         ConditionType.Good,
         ConditionType.GoodGroup,
         ConditionType.PaymentTypeUsed,
         ConditionType.DatabaseUpdated
     }
            .Select(c => new KeyValuePair <object, string> (c, PriceRuleCondition.TypeToString(c)))
            .ToList());
 }