//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.boris.expr.Expr evaluate(org.boris.expr.IEvaluationContext paramIEvaluationContext, org.boris.expr.Expr[] paramArrayOfExpr) throws org.boris.expr.ExprException public virtual Expr evaluate(IEvaluationContext paramIEvaluationContext, Expr[] paramArrayOfExpr) { assertArgCount(paramArrayOfExpr, 2); if (paramArrayOfExpr[0] is ExprVariable) { paramArrayOfExpr[0] = paramIEvaluationContext.evaluateVariable((ExprVariable)paramArrayOfExpr[0]); } if (!(paramArrayOfExpr[0] is ExprLocation)) { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a Location."); } if (!(paramArrayOfExpr[1] is ExprNumber)) { throw new ExprException("Input " + paramArrayOfExpr[1].ToString() + " is not a Number."); } ExprLocation exprLocation = (ExprLocation)paramArrayOfExpr[0]; ExprNumber exprNumber = (ExprNumber)paramArrayOfExpr[1]; if (exprLocation.Factors.Count == 0) { return(new ExprDouble(1.0D)); } LocalizationFactorTable localizationFactorTable = exprLocation.FirstFactor; if (exprNumber.intValue() == 0) { return(new ExprDouble(localizationFactorTable.AssemblyFactor.doubleValue())); } if (exprNumber.intValue() == 1) { return(new ExprDouble(localizationFactorTable.EquipmentFactor.doubleValue())); } if (exprNumber.intValue() == 2) { return(new ExprDouble(localizationFactorTable.SubcontractorFactor.doubleValue())); } if (exprNumber.intValue() == 3) { return(new ExprDouble(localizationFactorTable.LaborFactor.doubleValue())); } if (exprNumber.intValue() == 4) { return(new ExprDouble(localizationFactorTable.MaterialFactor.doubleValue())); } if (exprNumber.intValue() == 5) { return(new ExprDouble(localizationFactorTable.ConsumableFactor.doubleValue())); } throw new ExprException("Invalid factorType value " + exprNumber.intValue() + " valid values are: 0,1,2,3,4,5"); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.boris.expr.Expr evaluate(org.boris.expr.IEvaluationContext paramIEvaluationContext, org.boris.expr.Expr[] paramArrayOfExpr) throws org.boris.expr.ExprException public virtual Expr evaluate(IEvaluationContext paramIEvaluationContext, Expr[] paramArrayOfExpr) { assertArgCount(paramArrayOfExpr, 1); if (paramArrayOfExpr[0] is ExprVariable) { paramArrayOfExpr[0] = paramIEvaluationContext.evaluateVariable((ExprVariable)paramArrayOfExpr[0]); } if (!(paramArrayOfExpr[0] is ExprLocation)) { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a Location."); } ExprLocation exprLocation = (ExprLocation)paramArrayOfExpr[0]; return(new ExprString(exprLocation.State)); }