Exemple #1
0
 public static void Buildrule(CollectionRule aRule, String genericType, IDataRule valueRule, IDataRule keyRule, String assembly, String assemblyPath)
 {
     aRule.Assembly  = assembly;
     aRule.Assembly  = assemblyPath;
     aRule.Generic   = EnumPlus.ConvertString(typeof(GenericCollections), genericType);
     aRule.ValueRule = valueRule;
     aRule.KeyRule   = keyRule;
 }
Exemple #2
0
        public static void Buildrule(DateRule aRule, DateTime start, DateTime end, String increment, String rateType)
        {
            try
            {
                aRule.Start = start;
                aRule.End   = end;
                double result = Double.NegativeInfinity;
                if (double.TryParse(increment, out result))
                {
                    aRule.Increment = result;
                }
                else
                {
                    throw new Exception();
                }

                aRule.RateType = EnumPlus.ConvertString(typeof(DateTimeRateTypes), rateType);
            }
            catch (Exception e)
            {
                throw new Exception("Build date rule failed");
            }
        }