コード例 #1
0
 /// <summary>
 /// Requires an int is lower or equals than
 /// </summary>
 /// <param name="val">val</param>
 /// <param name="comparer">comparer</param>
 /// <param name="key">Key or Property Message</param>
 /// <returns></returns>
 public Contract <T> IsLowerOrEqualsThan(int val, long comparer, string key) =>
 IsLowerOrEqualsThan(val, (int)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
コード例 #2
0
 /// <summary>
 /// Requires a decimal is lower or equals than
 /// </summary>
 /// <param name="val">val</param>
 /// <param name="comparer">comparer</param>
 /// <param name="key">Key or Property Message</param>
 /// <returns></returns>
 public Contract <T> IsLowerOrEqualsThan(decimal val, int comparer, string key) =>
 IsLowerOrEqualsThan(val, (decimal)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
コード例 #3
0
 /// <summary>
 /// Requires a double is lower or equals than
 /// </summary>
 /// <param name="val">val</param>
 /// <param name="comparer">comparer</param>
 /// <param name="key">Key or Property Message</param>
 /// <returns></returns>
 public Contract <T> IsLowerOrEqualsThan(double val, float comparer, string key) =>
 IsLowerOrEqualsThan(val, (double)comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
コード例 #4
0
 /// <summary>
 /// Requires a date is lower or equals than
 /// </summary>
 /// <param name="val">val</param>
 /// <param name="comparer">comparer</param>
 /// <param name="key">Key or Property Name</param>
 /// <returns></returns>
 public Contract <T> IsLowerOrEqualsThan(DateTime val, DateTime comparer, string key) =>
 IsLowerOrEqualsThan(val, comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString(FluntFormats.DateTimeFormat)));
コード例 #5
0
 /// <summary>
 /// Requires a list count is lower or equals than
 /// </summary>
 /// <typeparam name="TList"></typeparam>
 /// <param name="val"></param>
 /// <param name="comparer"></param>
 /// <param name="key"></param>
 /// <returns></returns>
 public Contract <T> IsLowerOrEqualsThan <TList>(IEnumerable <TList> val, int comparer, string key) =>
 IsLowerOrEqualsThan(val, comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));
コード例 #6
0
 /// <summary>
 /// Requires a date is lower or equals than
 /// </summary>
 /// <param name="val">val</param>
 /// <param name="comparer">comparer</param>
 /// <param name="key">Key or Property Name</param>
 /// <returns></returns>
 public Contract <T> IsLowerOrEqualsThan(TimeSpan val, TimeSpan comparer, string key) =>
 IsLowerOrEqualsThan(val, comparer, key, FluntErrorMessages.IsLowerOrEqualsThanErrorMessage(key, comparer.ToString()));