本文整理汇总了C#中Calendar.First方法的典型用法代码示例。如果您正苦于以下问题:C# Calendar.First方法的具体用法?C# Calendar.First怎么用?C# Calendar.First使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calendar
的用法示例。
在下文中一共展示了Calendar.First方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalendarFirstMethod_test_5
public void CalendarFirstMethod_test_5()
{
Calendar cal = new Calendar();
GameObject gameObject = new GameObject();
cal.AddEvent(2, gameObject, EventType.goDown);
cal.AddEvent(2, gameObject, EventType.goDown);
Event ev = cal.First(2);
Assert.That(cal.CountOfEvents == 1);
ev = cal.First(2);
Assert.That(cal.CountOfEvents == 0);
}
示例2: CalendarFirstMethod_test_3
public void CalendarFirstMethod_test_3()
{
Calendar cal = new Calendar();
GameObject gameObject = new GameObject();
cal.AddEvent(2, gameObject, EventType.goDown);
Event ev = cal.First(1);
Assert.That(ev == null); // no event is supposed to be returned
}
示例3: CalendarFirstMethod_test_1
public void CalendarFirstMethod_test_1()
{
Calendar cal = new Calendar();
GameObject gameObject = new GameObject();
cal.AddEvent(1, gameObject, EventType.goDown);
Event ev = cal.First(2);
Assert.That(ev != null && ev.who == gameObject && ev.when == 1);
}
示例4: CalendarFirstMethod_test_2
public void CalendarFirstMethod_test_2()
{
// test of: "first" method in combination with time parameter of first method
Calendar cal = new Calendar();
GameObject gameObject = new GameObject();
cal.AddEvent(2, gameObject, EventType.goDown);
cal.AddEvent(3, gameObject, EventType.goDown);
Event ev = cal.First(2);
Assert.That(ev != null && ev.who == gameObject && ev.when == 2);
}