本文整理汇总了C#中Draw.notNull方法的典型用法代码示例。如果您正苦于以下问题:C# Draw.notNull方法的具体用法?C# Draw.notNull怎么用?C# Draw.notNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Draw
的用法示例。
在下文中一共展示了Draw.notNull方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: eval
public static int eval(this Game o, Draw d, GameType gt, PrizeCategory pc)
{
if(gt == GameType.Undefined || pc == PrizeCategory.Undefined)
return 0;
o.notNull(); d.notNull();
return o.Playslips.Sum(playslip => eval((Playslip)playslip, d, gt, pc));
}
示例2: EvaluationDto
public EvaluationDto(Game game, Draw draw)
{
this.game = game.notNull();
this.draw = draw.notNull();
IsWin = game.win(draw);
IsWin_L649 = game.Playslips.Any(x => x.win(draw, GameType.Lotto649));
IsWin_S77 = game.Playslips.Any(x => x.win(draw, GameType.Spiel77));
IsWin_S6 = game.Playslips.Any(x => x.win(draw, GameType.Super6));
}
示例3: DrawDto
public DrawDto(Draw draw)
{
draw.notNull();
Super6 = draw.S6String;
Spiel77 = draw.S77String;
Lotto = draw.LString;
Superzahl = draw.Sz.ToString();
Zusatzzahl = draw.Zz.ToString();
}
示例4: win
public static bool win(this Playslip o, Draw d, GameType gt)
{
o.notNull(); d.notNull();
if(o.valid()) {
switch(gt) {
case (GameType.Lotto649):
return o.Boards.Any(tipp => tipp.win(d));
case (GameType.Spiel77):
return o.IsS77 && o.Nr.AsSpiel77.Last().Equals(d.Spiel77.Last());
case (GameType.Super6):
return o.IsS6 && o.Nr.AsSuper6.Last().Equals(d.Super6.Last());
}
}
return false;
}