• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NumberCheck类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NumberCheck的典型用法代码示例。如果您正苦于以下问题:C# NumberCheck类的具体用法?C# NumberCheck怎么用?C# NumberCheck使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NumberCheck类属于命名空间,在下文中一共展示了NumberCheck类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetEvenNumbers

 /**
  * TODO 3:
  * Create a function called GetEvenNumbers which uses an instance of a NumberCheck delegate and an aray list of integers.
  * The function will return a list with the even numbers.
  */
 //IEnumerable merge cu yield; List nu merge
 public static IEnumerable<int> GetEvenNumbers(NumberCheck function, List<int> list)
 {
     //var newList = new List<int>();
     foreach (var number in list)
     {
         if (function(number))
         {
             //newList.Add(number);
             yield return number;
         }
     }
     //return newList;
 }
开发者ID:claudiu-orosanu,项目名称:CollectionsLambdaLinq,代码行数:19,代码来源:SpecialFunctions.cs


示例2: IsNegative

 public static ICheckLink<ICheck<float>> IsNegative(this ICheck<float> check)
 {
     var numberCheckStrategy = new NumberCheck<float>(check);
     return numberCheckStrategy.IsStrictlyNegative();
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:5,代码来源:FloatSignedCheckExtensions.cs


示例3: IsPositiveOrZero

 /// <summary>
 /// Checks that the actual value is positive or equal to zero.
 /// </summary>
 /// <param name="check">The fluent check to be extended.</param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">The value is not positive or equal to zero.</exception>
 public static ICheckLink<ICheck<float>> IsPositiveOrZero(this ICheck<float> check)
 {
     var numberCheckStrategy = new NumberCheck<float>(check);
     return numberCheckStrategy.IsPositiveOrZero();
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:13,代码来源:FloatSignedCheckExtensions.cs


示例4: IsZero

 /// <summary>
 /// Checks that the actual value is equal to zero.
 /// </summary>
 /// <param name="check">The fluent check to be extended.</param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">The value is not equal to zero.</exception>
 public static ICheckLink<ICheck<ushort>> IsZero(this ICheck<ushort> check)
 {
     var numberCheckStrategy = new NumberCheck<ushort>(check);
     return numberCheckStrategy.IsZero();
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:13,代码来源:UshortCheckExtensions.cs


示例5: IsStrictlyGreaterThan

 /// <summary>
 /// Checks that the checked value is strictly greater than the comparand.
 /// </summary>
 /// <param name="check">
 /// The fluent check to be extended.
 /// </param>
 /// <param name="comparand">
 /// Comparand to compare the value to.
 /// </param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">
 /// The checked value is not strictly greater than the comparand.
 /// </exception>
 public static ICheckLink<ICheck<ushort>> IsStrictlyGreaterThan(this ICheck<ushort> check, ushort comparand)
 {
     var numberCheckStrategy = new NumberCheck<ushort>(check);
     return numberCheckStrategy.IsStrictlyGreaterThan(comparand);
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:20,代码来源:UshortCheckExtensions.cs


示例6: IsGreaterThan

 public static ICheckLink<ICheck<float>> IsGreaterThan(this ICheck<float> check, float comparand)
 {
     var numberCheckStrategy = new NumberCheck<float>(check);
     return numberCheckStrategy.IsGreaterThan(comparand);
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:5,代码来源:FloatCheckExtensions.cs


示例7: IsStrictlyLessThan

 /// <summary>
 /// Checks that the checked value is strictly less than the comparand.
 /// </summary>
 /// <param name="check">
 /// The fluent check to be extended.
 /// </param>
 /// <param name="comparand">
 /// Comparand to compare the value to.
 /// </param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">
 /// The value is not strictly less than the comparand.
 /// </exception>
 public static ICheckLink<ICheck<long>> IsStrictlyLessThan(this ICheck<long> check, long comparand)
 {
     var numberCheckStrategy = new NumberCheck<long>(check);
     return numberCheckStrategy.IsStrictlyLessThan(comparand);
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:20,代码来源:LongCheckExtensions.cs


示例8: IsStrictlyPositive

 /// <summary>
 /// Checks that the actual value is strictly positive.
 /// </summary>
 /// <param name="check">The fluent check to be extended.</param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">The value is not strictly positive.</exception>
 public static ICheckLink<ICheck<decimal>> IsStrictlyPositive(this ICheck<decimal> check)
 {
     var numberCheckStrategy = new NumberCheck<decimal>(check);
     return numberCheckStrategy.IsStrictlyPositive();
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:13,代码来源:DecimalSignedCheckExtensions.cs


示例9: IsStrictlyGreaterThan

 /// <summary>
 /// Checks that the checked value is strictly greater than the comparand.
 /// </summary>
 /// <param name="check">
 /// The fluent check to be extended.
 /// </param>
 /// <param name="comparand">
 /// Comparand to compare the value to.
 /// </param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">
 /// The checked value is not strictly greater than the comparand.
 /// </exception>
 public static ICheckLink<ICheck<double>> IsStrictlyGreaterThan(this ICheck<double> check, double comparand)
 {
     var numberCheckStrategy = new NumberCheck<double>(check);
     return numberCheckStrategy.IsStrictlyGreaterThan(comparand);
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:20,代码来源:DoubleCheckExtensions.cs


示例10: IsGreaterThan

 /// <summary>
 /// Checks that the actual value is more than an operand.
 /// </summary>
 /// <param name="check">
 /// The fluent check to be extended.
 /// </param>
 /// <param name="comparand">
 /// Comparand to compare the value to.
 /// </param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">
 /// The value is not less than the comparand.
 /// </exception>
 public static ICheckLink<ICheck<decimal>> IsGreaterThan(this ICheck<decimal> check, decimal comparand)
 {
     var numberCheckStrategy = new NumberCheck<decimal>(check);
     return numberCheckStrategy.IsGreaterThan(comparand);
 }
开发者ID:rhwy,项目名称:NFluent,代码行数:20,代码来源:DecimalCheckExtensions.cs


示例11: IsLessThan

 public static ICheckLink<ICheck<byte>> IsLessThan(this ICheck<byte> check, byte comparand)
 {
     var numberCheckStrategy = new NumberCheck<byte>(check);
     return numberCheckStrategy.IsLessThan(comparand);
 }
开发者ID:tpierrain,项目名称:NFluent,代码行数:5,代码来源:ByteCheckExtensions.cs


示例12: IsLessThan

 public static ICheckLink<ICheck<short>> IsLessThan(this ICheck<short> check, short comparand)
 {
     var numberCheckStrategy = new NumberCheck<short>(check);
     return numberCheckStrategy.IsLessThan(comparand);
 }
开发者ID:tpierrain,项目名称:NFluent,代码行数:5,代码来源:ShortCheckExtensions.cs


示例13: IsGreaterThan

 public static ICheckLink<ICheck<ulong>> IsGreaterThan(this ICheck<ulong> check, ulong comparand)
 {
     var numberCheckStrategy = new NumberCheck<ulong>(check);
     return numberCheckStrategy.IsGreaterThan(comparand);
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:5,代码来源:UlongCheckExtensions.cs


示例14: IsPositive

        #pragma warning disable 169

        //// ---------------------- WARNING ----------------------
        //// AUTO-GENERATED FILE WHICH SHOULD NOT BE MODIFIED!
        //// To change this class, change the one that is used
        //// as the golden source/model for this autogeneration
        //// (i.e. the one dedicated to the integer values).
        //// -----------------------------------------------------

        // Since this class is the model/template for the generation of all the other signed numbers related CheckExtensions classes, don't forget to re-generate all the other classes every time you change this one. To do that, just save the ..\T4\NumberFluentAssertionGenerator.tt file within Visual Studio 2012. This will trigger the T4 code generation process.

        /// <summary>
        /// Checks that the actual value is strictly positive.
        /// </summary>
        /// <param name="check">The fluent check to be extended.</param>
        /// <returns>
        /// A check link.
        /// </returns>
        /// <exception cref="FluentCheckException">The value is not strictly positive.</exception>
        public static ICheckLink<ICheck<short>> IsPositive(this ICheck<short> check)
        {
            var numberCheckStrategy = new NumberCheck<short>(check);
            return numberCheckStrategy.IsPositive();
        }
开发者ID:rhwy,项目名称:NFluent,代码行数:24,代码来源:ShortSignedCheckExtensions.cs


示例15: IsNegative

 /// <summary>
 /// Checks that the actual value is strictly negative.
 /// </summary>
 /// <param name="check">The fluent check to be extended.</param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">The value is not strictly positive.</exception>
 public static ICheckLink<ICheck<sbyte>> IsNegative(this ICheck<sbyte> check)
 {
     var numberCheckStrategy = new NumberCheck<sbyte>(check);
     return numberCheckStrategy.IsNegative();
 }
开发者ID:rhwy,项目名称:NFluent,代码行数:13,代码来源:SbyteSignedCheckExtensions.cs


示例16: IsNotZero

 /// <summary>
 /// Checks that the actual value is NOT equal to zero.
 /// </summary>
 /// <param name="check">The fluent check to be extended.</param>
 /// <returns>
 ///   <returns>A check link.</returns>
 /// </returns>
 /// <exception cref="FluentCheckException">The value is equal to zero.</exception>
 public static ICheckLink<ICheck<long>> IsNotZero(this ICheck<long> check)
 {
     var numberCheckStrategy = new NumberCheck<long>(check);
     return numberCheckStrategy.IsNotZero();
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:13,代码来源:LongCheckExtensions.cs


示例17: IsNegativeOrZero

 /// <summary>
 /// Checks that the actual value is negative or equal to zero.
 /// </summary>
 /// <param name="check">The fluent check to be extended.</param>
 /// <returns>
 /// A check link.
 /// </returns>
 /// <exception cref="FluentCheckException">The value is not negative or equal to zero.</exception>
 public static ICheckLink<ICheck<decimal>> IsNegativeOrZero(this ICheck<decimal> check)
 {
     var numberCheckStrategy = new NumberCheck<decimal>(check);
     return numberCheckStrategy.IsNegativeOrZero();
 }
开发者ID:dirkrombauts,项目名称:NFluent,代码行数:13,代码来源:DecimalSignedCheckExtensions.cs



注:本文中的NumberCheck类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NumberFormatInfo类代码示例发布时间:2022-05-24
下一篇:
C# NumberBuffer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap