public static void AddGroupNameValuePair(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping grouping, Dictionary <string, object> nameValuePairs) { if (grouping != null) { Global.Tracer.Assert(grouping.GroupExpressions != null && 0 < grouping.GroupExpressions.Count); AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = grouping.GroupExpressions[0]; if (expressionInfo.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Field) { try { FieldImpl fieldImpl = odpContext.ReportObjectModel.FieldsImpl[expressionInfo.IntValue]; if (fieldImpl.FieldDef != null) { object value = fieldImpl.Value; if (!nameValuePairs.ContainsKey(fieldImpl.FieldDef.DataField)) { nameValuePairs.Add(fieldImpl.FieldDef.DataField, (value is DBNull) ? null : value); } } } catch (Exception e) { if (!AsynchronousExceptionDetection.IsStoppingException(e)) { goto end_IL_0097; } throw; end_IL_0097 :; } } } }
private void ProcessAggregateParam(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression, ExpressionParser.ExpressionContext context) { if (expression != null && expression.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Expression) { this.RegisterExpression(new ExprCompileTimeInfo(expression, context)); } }
private static void ValidateBackgroundImage(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo backgroundImageSource, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo backgroundImageValue, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo backgroundImageMIMEType, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo backgroundEmbeddingMode, AspNetCore.ReportingServices.ReportIntermediateFormat.Style style, ObjectType objectType, string objectName, ErrorContext errorContext) { if (backgroundImageSource != null) { bool flag = true; Global.Tracer.Assert(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == backgroundImageSource.Type); AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType intValue = (AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType)backgroundImageSource.IntValue; Global.Tracer.Assert(null != backgroundImageValue); if (AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType.Database == intValue && AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == backgroundImageValue.Type) { errorContext.Register(ProcessingErrorCode.rsBinaryConstant, Severity.Error, objectType, objectName, "BackgroundImageValue"); flag = false; } if (AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType.Database == intValue && !PublishingValidator.ValidateMimeType(backgroundImageMIMEType, objectType, objectName, "BackgroundImageMIMEType", errorContext)) { flag = false; } if (flag) { style.AddAttribute("BackgroundImageSource", backgroundImageSource); style.AddAttribute("BackgroundImageValue", backgroundImageValue); if (backgroundEmbeddingMode != null) { style.AddAttribute("EmbeddingMode", backgroundEmbeddingMode); } if (AspNetCore.ReportingServices.OnDemandReportRendering.Image.SourceType.Database == intValue) { style.AddAttribute("BackgroundImageMIMEType", backgroundImageMIMEType); } } } }
public bool ShouldSkipCurrentRow() { FieldsImpl fieldsImpl = this.m_odpContext.ReportObjectModel.FieldsImpl; bool flag = true; for (int i = 0; i < this.m_expressions.Count; i++) { if (!flag) { break; } AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.m_expressions[i]; if (expressionInfo.FieldIndex < 0) { flag = false; } else { FieldImpl fieldImpl = fieldsImpl[expressionInfo.FieldIndex]; if (fieldImpl.FieldStatus != 0) { return(false); } int num = this.m_odpContext.CompareAndStopOnError(this.m_values[i], fieldImpl.Value, this.m_scope.DataScopeObjectType, this.m_scope.Name, "GroupExpression", false); flag = (num == 0); } } return(flag); }
public bool IsRestrictedNaturalGroupSort(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo) { if (expressionInfo.Type != AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Field) { return(this.m_publishingVersioning.IsRdlFeatureRestricted(RdlFeatures.SortGroupExpression_OnlySimpleField)); } return(false); }
public ReportVariantProperty(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression) : base(expression != null && expression.IsExpression, (expression == null) ? null : expression.OriginalText) { if (expression != null && !expression.IsExpression) { this.m_value = expression.Value; } }
public CustomProperty Add(RenderingContext renderingContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo nameExpr, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo valueExpr) { CustomProperty customProperty = new CustomProperty(this.m_reportElementOwner, renderingContext, nameExpr, valueExpr, null, null, TypeCode.Empty); Global.Tracer.Assert(customProperty.Instance != null, "prop.Instance != null"); this.m_list.Add(customProperty); return(customProperty); }
public static bool ValidateEmbeddedImageName(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo embeddedImageName, Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo> embeddedImages, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != embeddedImageName); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == embeddedImageName.Type) { return(PublishingValidator.ValidateEmbeddedImageName(embeddedImageName.StringValue, embeddedImages, objectType, objectName, propertyName, errorContext)); } return(true); }
public ExprCompileTimeInfo(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression, ExpressionParser.ExpressionContext context) { this.ExpressionInfo = expression; this.OwnerObjectType = context.ObjectType; this.OwnerObjectName = context.ObjectName; this.OwnerPropertyName = context.PropertyName; this.NumErrors = 0; this.NumWarnings = 0; }
private static bool ValidateCalendar(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo calendar, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != calendar); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == calendar.Type && !Validator.ValidateCalendar(calendar.StringValue)) { errorContext.Register(ProcessingErrorCode.rsInvalidCalendar, Severity.Error, objectType, objectName, propertyName, calendar.StringValue); return(false); } return(true); }
private static bool ValidateBackgroundRepeat(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo repeat, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != repeat); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == repeat.Type && !Validator.ValidateBackgroundRepeat(repeat.StringValue, objectType)) { errorContext.Register(ProcessingErrorCode.rsInvalidBackgroundRepeat, Severity.Error, objectType, objectName, propertyName, repeat.StringValue); return(false); } return(true); }
private static bool ValidateNumeralVariant(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo numeralVariant, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != numeralVariant); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == numeralVariant.Type && !Validator.ValidateNumeralVariant(numeralVariant.IntValue)) { errorContext.Register(ProcessingErrorCode.rsInvalidNumeralVariant, Severity.Error, objectType, objectName, propertyName, numeralVariant.IntValue.ToString(CultureInfo.InvariantCulture)); return(false); } return(true); }
public void AddAttribute(string name, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression, ValueType valueType) { Global.Tracer.Assert(null != name); Global.Tracer.Assert(null != expression); this.m_attributes.Add(new StyleInformationAttribute { Name = name, Value = expression, ValueType = valueType }); }
public static bool ValidateSpecificLanguage(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo language, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext, out CultureInfo culture) { culture = null; Global.Tracer.Assert(null != language); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == language.Type && !Validator.ValidateSpecificLanguage(language.StringValue, out culture)) { errorContext.Register(ProcessingErrorCode.rsInvalidLanguage, Severity.Error, objectType, objectName, propertyName, language.StringValue); return(false); } return(true); }
public static bool ValidateSize(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo size, double minValue, double maxValue, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != size); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == size.Type) { bool allowNegative = false; double num = default(double); string text = default(string); return(PublishingValidator.ValidateSize(size.StringValue, allowNegative, minValue, maxValue, objectType, objectName, propertyName, errorContext, out num, out text)); } return(true); }
private void Init(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo nameExpr, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode) { this.m_name = new ReportStringProperty(nameExpr); this.m_value = new ReportVariantProperty(valueExpr); if (nameExpr.IsExpression || valueExpr.IsExpression) { this.m_instance = new CustomPropertyInstance(this, name, value, typeCode); } else { this.m_instance = null; } }
public static bool ValidateMimeType(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo mimeType, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { if (mimeType == null) { errorContext.Register(ProcessingErrorCode.rsMissingMIMEType, Severity.Error, objectType, objectName, propertyName); return(false); } if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == mimeType.Type) { return(PublishingValidator.ValidateMimeType(mimeType.StringValue, objectType, objectName, propertyName, errorContext)); } return(true); }
public override List <ScopeValueFieldName> GetScopeValueFieldNameCollection(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet) { List <ScopeValueFieldName> list = new List <ScopeValueFieldName>(); int num = 0; foreach (ScopeValue item in this.m_scopeID.QueryRestartPosition) { AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.Expressions[num]; AspNetCore.ReportingServices.ReportIntermediateFormat.Field field = dataSet.Fields[expressionInfo.FieldIndex]; string dataField = field.DataField; list.Add(new ScopeValueFieldName(dataField, item.Value)); num++; } return(list); }
private static bool ValidateBorderStyle(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo borderStyle, ObjectType objectType, string objectName, bool isDynamicElementSubElement, string propertyName, bool isDefaultBorder, ErrorContext errorContext) { Global.Tracer.Assert(null != borderStyle); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == borderStyle.Type) { string stringValue = default(string); if (!Validator.ValidateBorderStyle(borderStyle.StringValue, isDefaultBorder, objectType, isDynamicElementSubElement, out stringValue)) { errorContext.Register(ProcessingErrorCode.rsInvalidBorderStyle, Severity.Error, objectType, objectName, propertyName, borderStyle.StringValue); return(false); } borderStyle.StringValue = stringValue; } return(true); }
public ReportDoubleProperty(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo) : base(expressionInfo != null && expressionInfo.IsExpression, (expressionInfo == null) ? null : expressionInfo.OriginalText) { if (expressionInfo != null && !expressionInfo.IsExpression) { if (expressionInfo.ConstantType == DataType.Float) { this.m_value = expressionInfo.FloatValue; } else if (!double.TryParse(expressionInfo.StringValue, out this.m_value)) { this.m_value = 0.0; } } }
public static bool ValidateColor(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo color, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != color); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == color.Type) { string stringValue = default(string); if (!Validator.ValidateColor(color.StringValue, out stringValue, Validator.IsDynamicImageReportItem(objectType))) { errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Error, objectType, objectName, propertyName, color.StringValue); return(false); } color.StringValue = stringValue; } return(true); }
public ReportStringProperty(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression) : base(expression != null && expression.IsExpression, (expression == null) ? null : expression.OriginalText) { if (expression != null && !expression.IsExpression) { if (expression.ConstantType != DataType.String) { this.m_value = expression.OriginalText; } else { this.m_value = expression.StringValue; } } }
public override RowSkippingControlFlag DoesNotMatchRowRecordField(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField[] recordFields) { for (int i = 0; i < this.m_expressions.Length; i++) { AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.m_expressions[i]; object value = this.m_values[i].Value; AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField field = recordFields[expressionInfo.FieldIndex]; bool isSortedAscending = this.m_sortDirections[i] == SortDirection.Ascending; RowSkippingControlFlag rowSkippingControlFlag = base.CompareFieldWithScopeValueAndStopOnInequality(odpContext, field, value, isSortedAscending, ObjectType.DataSet, this.m_idcDataSet.Name, "Relationship.QueryRestart"); if (rowSkippingControlFlag != 0) { return(rowSkippingControlFlag); } } return(RowSkippingControlFlag.ExactMatch); }
public override RowSkippingControlFlag DoesNotMatchRowRecordField(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField[] recordFields) { int num = 0; foreach (ScopeValue item in this.m_scopeID.QueryRestartPosition) { AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.Expressions[num]; AspNetCore.ReportingServices.ReportIntermediateFormat.RecordField field = recordFields[expressionInfo.FieldIndex]; RowSkippingControlFlag rowSkippingControlFlag = base.CompareFieldWithScopeValueAndStopOnInequality(odpContext, field, item.Value, this.SortDirections[num], ObjectType.DataSet, this.m_memberDef.DataScopeInfo.DataSet.Name, "ScopeID.QueryRestart"); if (rowSkippingControlFlag != 0) { return(rowSkippingControlFlag); } num++; } return(RowSkippingControlFlag.ExactMatch); }
private static bool ValidateTransparency(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo transparency, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != transparency); if (AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == transparency.Type) { double floatValue = transparency.FloatValue; if (!(floatValue < 0.0) && !(floatValue > 100.0)) { goto IL_006d; } errorContext.Register(ProcessingErrorCode.rsOutOfRangeSize, Severity.Error, objectType, objectName, propertyName, transparency.OriginalText, "0", "100"); return(false); } goto IL_006d; IL_006d: return(true); }
private void ProcessAggregateParams(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression, ExpressionParser.ExpressionContext context) { if (expression.Aggregates != null) { for (int num = expression.Aggregates.Count - 1; num >= 0; num--) { this.ProcessAggregateParam(expression.Aggregates[num], context); } } if (expression.RunningValues != null) { for (int num2 = expression.RunningValues.Count - 1; num2 >= 0; num2--) { this.ProcessAggregateParam(expression.RunningValues[num2], context); } } }
private void ProcessExpression(AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression, ExpressionParser.ExpressionContext context) { if (expression.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Expression) { this.RegisterExpression(new ExprCompileTimeInfo(expression, context)); this.ProcessAggregateParams(expression, context); } else if (expression.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Aggregate) { this.ProcessAggregateParams(expression, context); } else if (expression.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Field && context.Location == AspNetCore.ReportingServices.ReportPublishing.LocationFlags.None) { if (this.m_reportLevelFieldReferences == null) { this.m_reportLevelFieldReferences = new ArrayList(); } this.m_reportLevelFieldReferences.Add(new ExprCompileTimeInfo(expression, context)); } }
public static void ParseRDLConstant(string expression, AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo, DataType constantType, ErrorContext errorContext, ObjectType objectType, string objectName, string propertyName) { expressionInfo.Type = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant; expressionInfo.ConstantType = constantType; switch (constantType) { case DataType.String: expressionInfo.StringValue = expression; break; case DataType.Boolean: { bool boolValue; try { if (string.Compare(expression, "0", StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(expression, "1", StringComparison.OrdinalIgnoreCase) == 0) { errorContext.Register(ProcessingErrorCode.rsInvalidBooleanConstant, Severity.Warning, objectType, objectName, propertyName, expression); } boolValue = XmlConvert.ToBoolean(expression); } catch (Exception e) { if (AsynchronousExceptionDetection.IsStoppingException(e)) { throw; } boolValue = false; errorContext.Register(ProcessingErrorCode.rsInvalidBooleanConstant, Severity.Error, objectType, objectName, propertyName, expression); } expressionInfo.BoolValue = boolValue; break; } case DataType.Integer: { int intValue; try { intValue = XmlConvert.ToInt32(expression); } catch (Exception e2) { if (AsynchronousExceptionDetection.IsStoppingException(e2)) { throw; } intValue = 0; errorContext.Register(ProcessingErrorCode.rsInvalidIntegerConstant, Severity.Error, objectType, objectName, propertyName, expression.MarkAsPrivate()); } expressionInfo.IntValue = intValue; break; } case DataType.Float: { double floatValue; try { floatValue = XmlConvert.ToDouble(expression); } catch (Exception e3) { if (AsynchronousExceptionDetection.IsStoppingException(e3)) { throw; } floatValue = 0.0; errorContext.Register(ProcessingErrorCode.rsInvalidFloatConstant, Severity.Error, objectType, objectName, propertyName, expression); } expressionInfo.FloatValue = floatValue; break; } case DataType.DateTime: { DateTimeOffset dateTimeValue = default(DateTimeOffset); bool flag = default(bool); if (DateTimeUtil.TryParseDateTime(expression, CultureInfo.InvariantCulture, out dateTimeValue, out flag)) { if (flag) { expressionInfo.SetDateTimeValue(dateTimeValue); } else { expressionInfo.SetDateTimeValue(dateTimeValue.DateTime); } } else { errorContext.Register(ProcessingErrorCode.rsInvalidDateTimeConstant, Severity.Error, objectType, objectName, propertyName, expression); } break; } default: Global.Tracer.Assert(false); throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation); } }
public abstract void ConvertField2ComplexExpr(ref AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expression);
public AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo ParseExpression(string expression, ExpressionParser.ExpressionContext context, ExpressionParser.EvaluationMode evaluationMode, out bool userCollectionReferenced) { AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo expressionInfo = this.m_langParser.ParseExpression(expression, context, evaluationMode, out userCollectionReferenced); this.ProcessExpression(expressionInfo, context); return(expressionInfo); }