//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); ExprArray exprArray = asArray(paramIEvaluationContext, paramArrayOfExpr[0], true); return(new ExprInteger(exprArray.rows())); }
//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) { assertMinArgCount(paramArrayOfExpr, 2); assertMaxArgCount(paramArrayOfExpr, 2); if ((paramArrayOfExpr[0]).evaluatable) { paramArrayOfExpr[0] = evalArg(paramIEvaluationContext, paramArrayOfExpr[0]); } if ((paramArrayOfExpr[1]).evaluatable) { paramArrayOfExpr[1] = evalArg(paramIEvaluationContext, paramArrayOfExpr[1]); } string str1 = asString(paramIEvaluationContext, paramArrayOfExpr[0], false); string str2 = asString(paramIEvaluationContext, paramArrayOfExpr[1], false); string[] arrayOfString = str1.Split(str2, true); ExprArray exprArray = new ExprArray(arrayOfString.Length, 1); sbyte b = 0; foreach (string str in arrayOfString) { exprArray.set(b++, new ExprString(str)); } return(exprArray); }
//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, 3, 5); if (paramArrayOfExpr.Length == 4) { throw new ExprException("Invalid argument count. Minimum is 3 and Maximum is 5"); } Expr expr1 = paramArrayOfExpr[0]; Expr expr2 = paramArrayOfExpr[1]; Expr expr3 = paramArrayOfExpr[2]; Expr expr4 = paramArrayOfExpr[3]; Expr expr5 = paramArrayOfExpr[4]; assertArgType(expr1, ExprType.String); assertArgType(expr2, ExprType.String); assertArgType(expr3, ExprType.String); if (expr4 != null && expr5 != null) { assertArgType(expr4, ExprType.Integer); assertArgType(expr5, ExprType.Integer); } expr1 = evalArg(paramIEvaluationContext, expr1); expr2 = evalArg(paramIEvaluationContext, expr2); expr3 = evalArg(paramIEvaluationContext, expr3); if (expr4 != null && expr5 != null) { expr4 = evalArg(paramIEvaluationContext, expr4); expr5 = evalArg(paramIEvaluationContext, expr5); } return(null); }
//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); string str = null; if (paramArrayOfExpr[0] is org.boris.expr.ExprString) { str = paramArrayOfExpr[0].ToString(); } else if (paramArrayOfExpr[0] is ExprVariable) { ExprVariable exprVariable = (ExprVariable)paramArrayOfExpr[0]; Expr expr = paramIEvaluationContext.evaluateVariable(exprVariable); if (!(expr is org.boris.expr.ExprString)) { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a String"); } str = expr.ToString(); } else { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a String"); } decimal bigDecimal = Unit1ToUnit2Util.Instance.getUnitDiv(str); if (bigDecimal == null) { bigDecimal = BigDecimalMath.ZERO; } return(new ExprDouble(bigDecimal.doubleValue())); }
//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); string str1 = null; if (paramArrayOfExpr[0] is ExprString) { str1 = paramArrayOfExpr[0].ToString(); } else if (paramArrayOfExpr[0] is ExprVariable) { ExprVariable exprVariable = (ExprVariable)paramArrayOfExpr[0]; Expr expr = paramIEvaluationContext.evaluateVariable(exprVariable); if (!(expr is ExprString)) { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a String"); } str1 = expr.ToString(); } else { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a String"); } string str2 = Unit1ToUnit2Util.Instance.getUnit2(str1); return(new ExprString(str2)); }
//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, 0); string str = this.defValue; if (ProjectDBUtil.currentProjectDBUtil() != null) { str = ProjectDBUtil.currentProjectDBUtil().Properties.getProperty(this.key); } return(new ExprString(str)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.boris.expr.Expr evaluateFunction(org.boris.expr.IEvaluationContext paramIEvaluationContext, org.boris.expr.ExprFunction paramExprFunction) throws org.boris.expr.ExprException public virtual Expr evaluateFunction(IEvaluationContext paramIEvaluationContext, ExprFunction paramExprFunction) { if (this.exfp.hasFunction(paramExprFunction)) { return(this.exfp.evaluate(paramIEvaluationContext, paramExprFunction)); } if (this.dbfp.hasFunction(paramExprFunction)) { return(this.dbfp.evaluate(paramIEvaluationContext, paramExprFunction)); } throw new ExprException("Function " + paramExprFunction + " not supported"); }
//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, 0); if (paramIEvaluationContext is ExprAbstractEvaluationContext) { decimal bigDecimal = ((ExprAbstractEvaluationContext)paramIEvaluationContext).GlobalQuantity; if (bigDecimal != null) { return new ExprDouble(bigDecimal.doubleValue()); } } return new ExprDouble(1.0D); }
//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, 0); if (paramIEvaluationContext is ExprAbstractEvaluationContext) { int?integer = ((ExprAbstractEvaluationContext)paramIEvaluationContext).LoopIndex; if (integer != null) { return(new ExprInteger(integer.Value)); } } return(new ExprInteger(1)); }
//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 org.boris.expr.ExprString)) { throw new ExprException("Input " + paramArrayOfExpr[0].ToString() + " is not a String."); } if (paramIEvaluationContext is ExprAbstractEvaluationContext) { ExprAbstractEvaluationContext exprAbstractEvaluationContext = (ExprAbstractEvaluationContext)paramIEvaluationContext; return(new ExprBoolean(exprAbstractEvaluationContext.isVariableShowing(paramArrayOfExpr[0].ToString()))); } return(new ExprBoolean(true)); }
//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)); }
//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); ExprArray exprArray = asArray(paramIEvaluationContext, paramArrayOfExpr[0], true); if (exprArray.length() == 0) { return(new ExprDouble(0.0D)); } Expr expr = exprArray.get(0, 0); if (expr is org.boris.expr.ExprError) { throw new ExprException("Error:" + expr.ToString()); } return(!(expr is org.boris.expr.ExprNumber) ? new ExprDouble(0.0D) : expr); }
//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, 0); string str = null; if (paramIEvaluationContext is ExprAbstractEvaluationContext) { ProjectUrlTable projectUrlTable = ((ExprAbstractEvaluationContext)paramIEvaluationContext).ProjectUrlTable; if (projectUrlTable != null) { str = projectUrlTable.ProjectInfoTable.Country; } else if (string.ReferenceEquals(str, null) && ProjectDBUtil.currentProjectDBUtil() != null) { str = ProjectDBUtil.currentProjectDBUtil().Properties.getProperty("project.country"); } } return((string.ReferenceEquals(str, null)) ? new ExprString("US") : new ExprString(str)); }
//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) { assertMinArgCount(paramArrayOfExpr, 2); ExprArray exprArray = null; foreach (Expr expr in paramArrayOfExpr) { ExprArray exprArray1 = asArray(paramIEvaluationContext, expr, true); if (exprArray == null) { exprArray = exprArray1; } else { exprArray = calcArrays(exprArray, exprArray1); } } return(exprArray); }
//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); int i = asInteger(paramIEvaluationContext, paramArrayOfExpr[0], true); if (paramIEvaluationContext is ExprAbstractEvaluationContext) { ExprAbstractEvaluationContext exprAbstractEvaluationContext = (ExprAbstractEvaluationContext)paramIEvaluationContext; object[] arrayOfObject = exprAbstractEvaluationContext.CurrentRow; if (arrayOfObject != null) { if (arrayOfObject.Length < i || i <= 0) { throw new ExprException("The array has " + arrayOfObject.Length + " columns, invalid column index " + i + " for CellValue"); } object @object = arrayOfObject[i - 1]; return((@object is Number) ? new ExprDouble(((Number)@object).doubleValue()) : new ExprString(@object.ToString())); } } return(new ExprInteger(1)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.boris.expr.Expr evaluateVariable(org.boris.expr.IEvaluationContext paramIEvaluationContext, org.boris.expr.ExprVariable paramExprVariable) throws org.boris.expr.ExprException public virtual Expr evaluateVariable(IEvaluationContext paramIEvaluationContext, ExprVariable paramExprVariable) { return(paramExprVariable.evaluate(paramIEvaluationContext)); }