//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: @Override public float calculate(final Amend amend, com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject, float amendValue) public override float calculate(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject, float amendValue) { if (!this.isAccept(amend, floatNumberPropertyObject)) { throw new System.ArgumentException("property type is diffrent"); } return amendValue; }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: @Override public float calculate(final Amend amend, com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject, float amendValue) public override float calculate(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject, float amendValue) { if (!this.isAccept(amend, floatNumberPropertyObject)) { throw new System.ArgumentException("property type is diffrent"); } float _percent = amendValue / 100.0f; return floatNumberPropertyObject.get(amend.propertyIndex) * _percent; }
/// <summary> /// 检查该规则是否可以接受 /// </summary> /// <param name="amend"> </param> /// <param name="floatNumberPropertyObject"> /// @return </param> //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: protected boolean isAccept(final Amend amend, final com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject) protected internal virtual bool isAccept(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject) { if (amend.propertyType != floatNumberPropertyObject.PropertyType) { return false; } return true; }
/// <summary> /// 计算对基准属性baseProperty的属性修正规�?并将计算结果累加到interimProperty�? /// </summary> /// <param name="baseProperty"> </param> /// <param name="interimProperty"> </param> public virtual void amend(FloatNumberPropertyObject baseProperty, FloatNumberPropertyObject interimProperty) { float _amendValue = this.rule.calculate(this.amend_Renamed, baseProperty, this.value); interimProperty.add(this.amend_Renamed.propertyIndex, _amendValue); }
/// /// <param name="floatNumberPropertyObject"> </param> /// <param name="amendValue"> /// @return </param> //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: public abstract float calculate(final Amend amend, final com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject, final float amendValue); public abstract float calculate(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject, float amendValue);