private void ValidateExpressionDataTypes(List <ExpressionInfo> expressions, ErrorContext errorContext, string paramName, string memberName, bool fromValidValues, CultureInfo language)
        {
            if (expressions != null)
            {
                int num = expressions.Count - 1;
                while (true)
                {
                    if (num >= 0)
                    {
                        ExpressionInfo expressionInfo = expressions[num];
                        if (fromValidValues && expressionInfo == null && base.MultiValue)
                        {
                            this.m_validValuesValueExpressions.RemoveAt(num);
                        }
                        else if (expressionInfo != null && ExpressionInfo.Types.Constant == expressionInfo.Type)
                        {
                            object obj = default(object);
                            if (!ParameterBase.CastFromString(expressionInfo.StringValue, out obj, base.DataType, language))
                            {
                                if (errorContext == null)
                                {
                                    break;
                                }
                                errorContext.Register(ProcessingErrorCode.rsParameterPropertyTypeMismatch, Severity.Error, AspNetCore.ReportingServices.ReportProcessing.ObjectType.ReportParameter, paramName, memberName);
                            }
                            else
                            {
                                base.ValidateValue(obj, errorContext, AspNetCore.ReportingServices.ReportProcessing.ObjectType.ReportParameter, memberName);
                                if (obj != null && base.DataType != DataType.String)
                                {
                                    ExpressionInfo expressionInfo2 = new ExpressionInfo();
                                    expressionInfo2.Type         = ExpressionInfo.Types.Constant;
                                    expressionInfo2.OriginalText = expressionInfo.OriginalText;
                                    expressionInfo2.ConstantType = base.DataType;
                                    expressions[num]             = expressionInfo2;
                                    switch (base.DataType)
                                    {
                                    case DataType.Boolean:
                                        expressionInfo2.BoolValue = (bool)obj;
                                        break;

                                    case DataType.DateTime:
                                        if (obj is DateTimeOffset)
                                        {
                                            expressionInfo2.SetDateTimeValue((DateTimeOffset)obj);
                                        }
                                        else
                                        {
                                            expressionInfo2.SetDateTimeValue((DateTime)obj);
                                        }
                                        break;

                                    case DataType.Float:
                                        expressionInfo2.FloatValue = (double)obj;
                                        break;

                                    case DataType.Integer:
                                        expressionInfo2.IntValue = (int)obj;
                                        break;
                                    }
                                }
                            }
                        }
                        num--;
                        continue;
                    }
                    return;
                }
                throw new ReportParameterTypeMismatchException(paramName);
            }
        }