Harrison Deng
35a2765559
Implemented LRUCache for instantiating services without starting. Service state changed back to enumerator. Namespace refactoring.
28 lines
707 B
C#
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];
|
|
}
|
|
}
|
|
} |