public Rank(RankNames Index, int RankUpScore, int RankDownScore, RankNames MinChallenge, RankNames MaxChallenge) { index = (int)Index; rankUpScore = RankUpScore; rankDownScore = RankDownScore; minChallenge = (int)MinChallenge; maxChallenge = (int)MaxChallenge; }
protected LayerEditColumnDefinitionVM(SerializationInfo info, StreamingContext context) : base(info, context) { NameSource = (ILayerRankNamesSource)info.GetValue("RankNameSource", typeof(ILayerRankNamesSource)); RankNames = NameSource.InstrumentalMultipleNames; string selected = info.GetString("Selected"); if (!string.IsNullOrEmpty(selected) && RankNames.Contains(selected)) { Selected = selected; } }
public CardRank(RankNames rank) { var hasKey = ranks.ContainsKey(rank); if (hasKey) { this.rank = rank; } else { throw new ArgumentOutOfRangeException("rank", rank, "The rank value is invalid."); } }