本文整理汇总了C#中NumberCheck.IsPositive方法的典型用法代码示例。如果您正苦于以下问题:C# NumberCheck.IsPositive方法的具体用法?C# NumberCheck.IsPositive怎么用?C# NumberCheck.IsPositive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NumberCheck
的用法示例。
在下文中一共展示了NumberCheck.IsPositive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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<sbyte>> IsPositive(this ICheck<sbyte> check)
{
var numberCheckStrategy = new NumberCheck<sbyte>(check);
return numberCheckStrategy.IsPositive();
}