public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { string typeName = value?.GetType().FullName; var country = value as Country; playerAttributes.RegistrationCountry = country; }
public void ApplyPositiveTestValues(IPlayerAttributesSimulatorViewModel playerAttributes) { foreach (var condition in Conditions) { var testValue = condition.GetPositiveTestValues()?.FirstOrDefault(); if (testValue != null) { testValue.ApplyValue(playerAttributes); } } }
public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { var isVip = (bool)value; if (isVip) { playerAttributes.VipLevel = VipLevel.VIP; } else { playerAttributes.VipLevel = VipLevel.Regular; } }
public void ApplyTestValues(IPlayerAttributesSimulatorViewModel playerAttributes) { var positiveValues = new List <TestValue>(); foreach (var t in _triggers) { positiveValues.AddRange(t.GetAllPositiveTestValues()); } foreach (var t in _triggers) { t.ApplyNegativeTestValues(playerAttributes, positiveValues); } }
public void ApplyNegativeTestValues(IPlayerAttributesSimulatorViewModel playerAttributes, IEnumerable <TestValue> positiveValues) { var positiveValuesPerField = positiveValues.GroupBy(v => v.Field).ToDictionary(f => f.Key, f => f.ToArray()); foreach (var condition in Conditions) { var testValue = condition.GetNegativeTestValue(positiveValuesPerField.ContainsKey(condition.Field) ? positiveValuesPerField[condition.Field] : new TestValue[0]); if (testValue != null) { testValue.ApplyValue(playerAttributes); } } }
public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { playerAttributes.RegistrationDate = (DateTime)value; }
public abstract void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value);
public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { #warning Not Implemented }
public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { playerAttributes.Gender = (Gender)value; }
public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { playerAttributes.Age = (int)value; }
public override void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes, object value) { playerAttributes.RegistrationCurrency = value as CurrencyInfo; }
public void ApplyTestValues(IPlayerAttributesSimulatorViewModel playerAttributes) { _trigger.ApplyPositiveTestValues(playerAttributes); }
public void ApplyValue(IPlayerAttributesSimulatorViewModel playerAttributes) { Field.ApplyValue(playerAttributes, Value); }