2018-04-08 17:50:58 -04:00
|
|
|
|
using SharedLibraryCore.Services;
|
|
|
|
|
using IW4MAdmin.Plugins.Stats.Models;
|
2018-02-10 01:26:38 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2018-04-08 17:50:58 -04:00
|
|
|
|
namespace IW4MAdmin.Plugins.Stats.Helpers
|
2018-02-10 01:26:38 -05:00
|
|
|
|
{
|
|
|
|
|
public class ThreadSafeStatsService
|
|
|
|
|
{
|
2018-05-11 00:52:20 -04:00
|
|
|
|
public GenericRepository<EFClientStatistics> ClientStatSvc
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2018-10-03 22:20:49 -04:00
|
|
|
|
return new GenericRepository<EFClientStatistics>(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public GenericRepository<EFServer> ServerSvc
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new GenericRepository<EFServer>(false);
|
2018-05-11 00:52:20 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
2018-02-10 01:26:38 -05:00
|
|
|
|
public GenericRepository<EFClientKill> KillStatsSvc { get; private set; }
|
|
|
|
|
public GenericRepository<EFServerStatistics> ServerStatsSvc { get; private set; }
|
2018-05-14 13:55:10 -04:00
|
|
|
|
public GenericRepository<EFClientMessage> MessageSvc
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new GenericRepository<EFClientMessage>();
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-02-10 01:26:38 -05:00
|
|
|
|
|
|
|
|
|
public ThreadSafeStatsService()
|
|
|
|
|
{
|
|
|
|
|
KillStatsSvc = new GenericRepository<EFClientKill>();
|
|
|
|
|
ServerStatsSvc = new GenericRepository<EFServerStatistics>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|