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

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

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

@ -6,29 +6,25 @@ using System.Threading.Tasks;
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();
}
public IEnumerable<T> GetAll<T>()
public IEnumerable<Player> GetAll()
{
throw new NotImplementedException();
}
public T GetOneById<T>(int id)
public Player GetOneById(int id)
{
throw new NotImplementedException();
}
public void Remove<T>(ref T toRemove)
public void Remove(ref Player toRemove)
{
throw new NotImplementedException();
}
public T Update<T>(ref T before, ref T after)
public Player Update(ref Player before, ref Player after)
{
throw new NotImplementedException();
}

Loading…
Cancel
Save