C# Class UI.Transformations.PlayerTransformations.PlayerDetailsViewModelBuilder

Inheritance: IPlayerDetailsViewModelBuilder
Mostra file Open project: NemeStats/NemeStats Class Usage Examples

Public Methods

Method Description
Build ( PlayerDetails playerDetails, string urlForMinionBragging, ApplicationUser currentUser = null ) : PlayerDetailsViewModel
PlayerDetailsViewModelBuilder ( IGameResultViewModelBuilder builder, IMinionViewModelBuilder minionViewModelBuilder, IMapperFactory mapperFactory ) : AutoMapper

Private Methods

Method Description
GetWinPercentage ( PlayerVersusPlayerStatistics playerVersusPlayerStatistics ) : decimal
PopulateNemesisData ( Nemesis nemesis, PlayerDetailsViewModel playerDetailsViewModel ) : void
PopulatePlayerGameResults ( PlayerDetails playerDetails, PlayerDetailsViewModel playerDetailsViewModel ) : void
PopulatePlayerVersusPlayersViewModel ( PlayerDetails playerDetails, PlayerDetailsViewModel playerDetailsViewModel ) : void
SetAveragePointsPerGame ( PlayerDetails playerDetails, PlayerDetailsViewModel playerDetailsViewModel ) : void
SetAveragePointsPerPlayer ( PlayerDetails playerDetails, PlayerDetailsViewModel playerDetailsViewModel ) : void
SetChampionedGames ( PlayerDetails playerDetails, PlayerDetailsViewModel playerDetailsViewModel ) : void
SetFormerChampionedGames ( PlayerDetails playerDetails, PlayerDetailsViewModel playerDetailsViewModel ) : void
SetTwitterBraggingUrlIfThePlayerIsTheCurrentlyLoggedInUser ( PlayerDetails playerDetails, string urlForMinionBragging, ApplicationUser currentUser, PlayerDetailsViewModel playerDetailsViewModel ) : void
SetUserCanEditFlag ( PlayerDetails playerDetails, ApplicationUser currentUser, PlayerDetailsViewModel playerDetailsViewModel ) : void
Validate ( PlayerDetails playerDetails ) : void
ValidateChampionedGames ( PlayerDetails playerDetails ) : void
ValidateFormerChampionedGames ( PlayerDetails playerDetails ) : void
ValidateMinions ( PlayerDetails playerDetails ) : void
ValidatePlayerDetailsIsNotNull ( PlayerDetails playerDetails ) : void
ValidatePlayerGameResultsIsNotNull ( PlayerDetails playerDetails ) : void
ValidatePlayerStatisticsIsNotNull ( PlayerDetails playerDetails ) : void

Method Details

Build() public method

public Build ( PlayerDetails playerDetails, string urlForMinionBragging, ApplicationUser currentUser = null ) : PlayerDetailsViewModel
playerDetails BusinessLogic.Models.Players.PlayerDetails
urlForMinionBragging string
currentUser ApplicationUser
return UI.Models.Players.PlayerDetailsViewModel

PlayerDetailsViewModelBuilder() public method

public PlayerDetailsViewModelBuilder ( IGameResultViewModelBuilder builder, IMinionViewModelBuilder minionViewModelBuilder, IMapperFactory mapperFactory ) : AutoMapper
builder IGameResultViewModelBuilder
minionViewModelBuilder IMinionViewModelBuilder
mapperFactory IMapperFactory
return AutoMapper