/// <summary> /// Requires two decimals are equals /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <returns></returns> public Contract <T> AreEquals(decimal val, double comparer, string key) => AreEquals(val, (decimal)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
/// <summary> /// Requires two decimals are equals /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <returns></returns> public Contract <T> AreEquals(int val, long comparer, string key) => AreEquals(val, (int)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
/// <summary> /// Requires two decimals are equals /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <returns></returns> public Contract <T> AreEquals(float val, decimal comparer, string key) => AreEquals(val, (float)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
/// <summary> /// Requires two decimals are equals /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <returns></returns> public Contract <T> AreEquals(double val, float comparer, string key) => AreEquals(val, (double)comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
/// <summary> /// Requires a string have a len /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <param name="message"></param> /// <returns></returns> public Contract <T> AreEquals(string val, int comparer, string key) => AreEquals(val, comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val, comparer.ToString()));
/// <summary> /// Require dates are equals /// </summary> /// <param name="val">date</param> /// <param name="comparer">date</param> /// <param name="key">Key or Property Name</param> /// <returns></returns> public Contract <T> AreEquals(DateTime val, DateTime comparer, string key) => AreEquals(val, comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(FluntFormats.DateTimeFormat), comparer.ToString(FluntFormats.DateTimeFormat)));
/// <summary> /// Requires two Guids are equals /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <returns></returns> public Contract <T> AreEquals(Guid val, Guid comparer, string key) => AreEquals(val, comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
/// <summary> /// Require dates are equals /// </summary> /// <param name="val">date</param> /// <param name="comparer">date</param> /// <param name="key">Key or Property Name</param> /// <returns></returns> public Contract <T> AreEquals(TimeSpan val, TimeSpan comparer, string key) => AreEquals(val, comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val.ToString(), comparer.ToString()));
/// <summary> /// Requires two objects are equals /// </summary> /// <param name="val"></param> /// <param name="comparer"></param> /// <param name="key"></param> /// <returns></returns> public Contract <T> AreEquals(object val, object comparer, string key) => AreEquals(val, comparer, key, FluntErrorMessages.AreEqualsErrorMessage(val?.ToString(), comparer?.ToString()));