This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
gameservicewarden/tests/GameServiceWarden.Core.Tests/Modules/Games/FakeServiceManagerMonitor.cs
Harrison Deng 35a2765559 Changed logging system to be event based.
Implemented LRUCache for instantiating services without starting.

Service state changed back to enumerator.

Namespace refactoring.
2021-04-19 01:34:45 -05:00

28 lines
707 B
C#

using System;
using System.Collections.Generic;
using GameServiceWarden.API.Games;
using GameServiceWarden.Core.Module;
namespace GameServiceWarden.Core.Tests.Modules.Games
{
public class FakeServiceManagerMonitor : IServiceManagerMonitor
{
public List<ServiceManagerState> states = new List<ServiceManagerState>();
public ServiceManagerState this[int i]
{
get
{
return states[i];
}
}
public void Present(ServiceManagerState state)
{
states.Add(state);
}
public ServiceManagerState GetLastState()
{
return states[states.Count - 1];
}
}
}