public void Dispose() { _View.GetPlayersByPosition -= GetPlayersByPosition; _View.GetPlayersToWatch -= GetPlayersToWatch; _View.UpdatePlayer -= UpdatePlayer; _View.Search -= Search; _View.PlayerPicked -= Notify; _View.AddPerson -= AddPerson; _View = null; }
/// <summary> /// Initializes a new instance of the <see cref="DraftBuddyPresenter"/> class. /// </summary> /// <param name="view">The view.</param> public DraftBuddyPresenter(IDraftBuddyView view) { _View = view; _View.GetPlayersByPosition += GetPlayersByPosition; _View.GetPlayersToWatch += GetPlayersToWatch; _View.UpdatePlayer += UpdatePlayer; _View.Search += Search; _View.PlayerPicked += Notify; _View.AddPerson += AddPerson; }
/// <summary> /// Initializes a new instance of the <see cref="DraftBuddyPresenter"/> class. /// </summary> /// <param name="view">The view.</param> public DraftBuddyPresenter(IDraftBuddyView view) { _view = view; _view.GetPlayersByPosition += GetPlayersByPosition; _view.GetPlayersToWatch += GetPlayersToWatch; _view.DraftPlayer += OnPlayerDrafted; _view.AddPerson += AddFantasyTeam; _view.UpdatePlayer += UpdatePlayer; _view.Search += OnSearchPlayers; _view.FantasyTeamDisplay += OnFantasyTeamDisplay; InitializeData(); }
public void Dispose() { _view = null; }