public GetState ( System.Guid id ) : Data.Enums.EventState | ||
id | System.Guid | The ID of the event to retrieve the state of |
return | Data.Enums.EventState |
public Data.Enums.EventState GetState(Guid id)
{
if (this.WorldBossEventTimeTable.WorldEvents.Any(evt => evt.ID == id))
{
WorldBossEvent worldEvent = this.WorldBossEventTimeTable.WorldEvents.First(evt => evt.ID == id);
return this.GetState(worldEvent);
}
else
{
return Data.Enums.EventState.Unknown;
}
}
EventsService::GetState ( |
public void EventsService_GetState_WorldEvent_Blank_Inactive() { EventsService es = new EventsService(); es.LoadTables(false); var sw = new Stopwatch(); sw.Start(); var state = es.GetState(new WorldBossEvent()); sw.Stop(); Console.WriteLine("{0}ms", sw.ElapsedMilliseconds); Assert.AreEqual(EventState.Inactive, state); }