public SchedulePaymentParameter(ScheduleParameter.ParameterType type, string value)
     : base(type, value)
 {
     if (!type.ToString().StartsWith("PAYMENT_"))
     {
         throw new InvalidOperationException($"Invalid payment paramenter type {type.ToString()}");
     }
 }
Пример #2
0
 /// <summary>
 /// parse parameters from single string values
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="prms"></param>
 /// <param name="type"></param>
 /// <returns>parsed value or default(T) if not found</returns>
 private static T ParseParameter <T>(IEnumerable <ScheduleParameter> prms, ScheduleParameter.ParameterType type)
 {
     return(ParseParameter <T>(prms.SingleOrDefault(n => n.Type == type)));
 }