C# Class BusinessLogic.Logic.Players.PlayerSaver

Inheritance: IPlayerSaver
显示文件 Open project: NemeStats/NemeStats

Public Methods

Method Description
CreatePlayer ( CreatePlayerRequest createPlayerRequest, ApplicationUser applicationUser, bool linkCurrentUserToThisPlayer = false ) : Player
PlayerSaver ( IDataContext dataContext, INemeStatsEventTracker eventTracker, INemesisRecalculator nemesisRecalculator ) : BusinessLogic.DataAccess
UpdatePlayer ( UpdatePlayerRequest updatePlayerRequest, ApplicationUser applicationUser ) : void

Private Methods

Method Description
RecalculateNemeses ( Player player, ApplicationUser currentUser ) : void
Save ( Player player, ApplicationUser applicationUser ) : Player
ThrowPlayerAlreadyExistsExceptionIfPlayerExistsWithThisName ( string playerName, int gamingGroupId ) : void
ValidatePlayerIsNotNull ( Player player ) : void
ValidatePlayerNameIsNotNullOrWhiteSpace ( string playerName ) : void
ValidatePlayerWithThisNameDoesntAlreadyExist ( Player player, ApplicationUser currentUser ) : void

Method Details

CreatePlayer() public method

public CreatePlayer ( CreatePlayerRequest createPlayerRequest, ApplicationUser applicationUser, bool linkCurrentUserToThisPlayer = false ) : Player
createPlayerRequest BusinessLogic.Models.Players.CreatePlayerRequest
applicationUser ApplicationUser
linkCurrentUserToThisPlayer bool
return Player

PlayerSaver() public method

public PlayerSaver ( IDataContext dataContext, INemeStatsEventTracker eventTracker, INemesisRecalculator nemesisRecalculator ) : BusinessLogic.DataAccess
dataContext IDataContext
eventTracker INemeStatsEventTracker
nemesisRecalculator INemesisRecalculator
return BusinessLogic.DataAccess

UpdatePlayer() public method

public UpdatePlayer ( UpdatePlayerRequest updatePlayerRequest, ApplicationUser applicationUser ) : void
updatePlayerRequest BusinessLogic.Models.Players.UpdatePlayerRequest
applicationUser ApplicationUser
return void