forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerService.cs
More file actions
39 lines (34 loc) · 1.4 KB
/
Copy pathServerService.cs
File metadata and controls
39 lines (34 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Collections.Generic;
using System.Threading.Tasks;
using L2dotNET.DataContracts;
using L2dotNET.Repositories.Abstract;
using L2dotNET.Services.Contracts;
namespace L2dotNET.Services
{
public class ServerService : IServerService
{
private readonly ICrudRepository<AnnouncementContract> _announcementCrudRepository;
private readonly ICrudRepository<ServerContract> _serverCrudRepository;
private readonly ICrudRepository<SpawnlistContract> _spawnlistCrudRepository;
public ServerService(ICrudRepository<AnnouncementContract> announcementCrudRepository,
ICrudRepository<ServerContract> serverCrudRepository,
ICrudRepository<SpawnlistContract> spawnlistCrudRepository)
{
_announcementCrudRepository = announcementCrudRepository;
_serverCrudRepository = serverCrudRepository;
_spawnlistCrudRepository = spawnlistCrudRepository;
}
public async Task<IEnumerable<ServerContract>> GetServerList()
{
return await _serverCrudRepository.GetAll();
}
public async Task<IEnumerable<AnnouncementContract>> GetAnnouncementsList()
{
return await _announcementCrudRepository.GetAll();
}
public async Task<IEnumerable<SpawnlistContract>> GetAllSpawns()
{
return await _spawnlistCrudRepository.GetAll();
}
}
}