🚑 Fix IManager (genericity)
continuous-integration/drone/push Build is passing Details

this makes it possible to manipulate the arguments
pull/42/head
Alexis Drai 3 years ago
parent f30fbbbca6
commit e243144fe5

@ -1,12 +1,12 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Model namespace Model
{ {
internal interface IManager public interface IManager<T>
{ {
public T Add<T>(ref T toAdd); public T Add(ref T toAdd);
public void Remove<T>(ref T toRemove); public T GetOneById(int id);
public T Update<T>(ref T before, ref T after); public IEnumerable<T> GetAll();
public T GetOneById<T>(int id); public T Update(ref T before, ref T after);
public IEnumerable<T> GetAll<T>(); public void Remove(ref T toRemove);
} }
} }

@ -6,29 +6,25 @@ using System.Threading.Tasks;
namespace Model namespace Model
{ {
internal class PlayerManager : IManager public class PlayerManager : IManager<Player>
{ {
public T Add<T>(ref T toAdd) public Player Add(ref Player toAdd)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public IEnumerable<Player> GetAll()
public IEnumerable<T> GetAll<T>()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public Player GetOneById(int id)
public T GetOneById<T>(int id)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public void Remove(ref Player toRemove)
public void Remove<T>(ref T toRemove)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public Player Update(ref Player before, ref Player after)
public T Update<T>(ref T before, ref T after)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

Loading…
Cancel
Save