internal bool Validate(ObjectType objectType, string name, ErrorContext errorContext)
        {
            bool result = true;

            if (string.IsNullOrEmpty(name) || name.Length > 256)
            {
                errorContext.Register(m_errorCodeNameLength, Severity.Error, objectType, name, "Name", "256");
                result = false;
            }
            if (!NameValidator.IsCLSCompliant(name))
            {
                errorContext.Register(m_errorCodeNotCLS, Severity.Error, objectType, name, "Name");
                result = false;
            }
            if (!IsUnique(name))
            {
                errorContext.Register(m_errorCodeNotUnique, Severity.Error, objectType, name, "Name");
                result = false;
            }
            if (IsCaseInsensitiveDuplicate(name))
            {
                errorContext.Register(m_errorCodeCaseInsensitiveDuplicate, Severity.Warning, objectType, name, "Name");
            }
            return(result);
        }
示例#2
0
        public static bool ValidateSize(string size, bool allowNegative, double minValue, double maxValue, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext, out double validSizeInMM, out string newSize)
        {
            validSizeInMM = minValue;
            newSize       = minValue + "mm";
            RVUnit rVUnit = default(RVUnit);

            if (!Validator.ValidateSizeString(size, out rVUnit))
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidSize, Severity.Error, objectType, objectName, propertyName, size);
                return(false);
            }
            if (!Validator.ValidateSizeUnitType(rVUnit))
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidMeasurementUnit, Severity.Error, objectType, objectName, propertyName, rVUnit.Type.ToString());
                return(false);
            }
            if (!allowNegative && !Validator.ValidateSizeIsPositive(rVUnit))
            {
                errorContext.Register(ProcessingErrorCode.rsNegativeSize, Severity.Error, objectType, objectName, propertyName);
                return(false);
            }
            double num = Converter.ConvertToMM(rVUnit);

            if (!Validator.ValidateSizeValue(num, minValue, maxValue))
            {
                errorContext.Register(ProcessingErrorCode.rsOutOfRangeSize, Severity.Error, objectType, objectName, propertyName, size, Converter.ConvertSizeFromMM(allowNegative ? minValue : Math.Max(0.0, minValue), rVUnit.Type), Converter.ConvertSizeFromMM(maxValue, rVUnit.Type));
                return(false);
            }
            validSizeInMM = num;
            newSize       = rVUnit.ToString(CultureInfo.InvariantCulture);
            return(true);
        }
示例#3
0
 private void BindToParentDataSet(ScopeTree scopeTree, IRIFReportDataScope scope, ErrorContext errorContext, ParentDataSetContainer parentDataSets)
 {
     if (parentDataSets == null)
     {
         if (scopeTree.GetParentDataRegion(scope) == null)
         {
             if (scopeTree.Report.MappingDataSetIndexToDataSet.Count == 0)
             {
                 errorContext.Register(ProcessingErrorCode.rsDataRegionWithoutDataSet, Severity.Error, scope.DataScopeObjectType, scope.Name, null);
             }
             else
             {
                 errorContext.Register(ProcessingErrorCode.rsMissingDataSetName, Severity.Error, scope.DataScopeObjectType, scope.Name, "DataSetName");
             }
         }
     }
     else if (parentDataSets.Count > 1 && !parentDataSets.AreAllSameDataSet())
     {
         DataRegion    parentDataRegion = scopeTree.GetParentDataRegion(scope);
         IRIFDataScope parentRowScopeForIntersection    = scopeTree.GetParentRowScopeForIntersection(scope);
         IRIFDataScope parentColumnScopeForIntersection = scopeTree.GetParentColumnScopeForIntersection(scope);
         errorContext.Register(ProcessingErrorCode.rsMissingIntersectionDataSetName, Severity.Error, scope.DataScopeObjectType, parentDataRegion.Name, "DataSetName", parentDataRegion.ObjectType.ToString(), parentRowScopeForIntersection.Name, parentColumnScopeForIntersection.Name);
     }
     else
     {
         UpdateDataSet(parentDataSets.ParentDataSet, scope);
     }
 }
示例#4
0
        internal override bool ValidateRelationships(ScopeTree scopeTree, ErrorContext errorContext, DataSet ourDataSet, ParentDataSetContainer parentDataSets, IRIFReportDataScope currentScope)
        {
            Global.Tracer.Assert(parentDataSets != null, "IntersectJoinInfo can only be used with one or two parent data sets");
            if (parentDataSets.Count == 1)
            {
                DataRegion parentDataRegion = scopeTree.GetParentDataRegion(currentScope);
                errorContext.Register(ProcessingErrorCode.rsUnexpectedCellDataSetName, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion.Name, "DataSetName", parentDataRegion.ObjectType.ToString());
                return(false);
            }
            if (parentDataSets.AreAllSameDataSet() && DataSet.AreEqualById(parentDataSets.RowParentDataSet, ourDataSet))
            {
                return(false);
            }
            m_rowParentDataSet    = parentDataSets.RowParentDataSet;
            m_columnParentDataSet = parentDataSets.ColumnParentDataSet;
            if (m_rowParentDataSet == null || m_columnParentDataSet == null)
            {
                return(false);
            }
            bool dataSetAlreadyHasRelationship  = false;
            bool dataSetAlreadyHasRelationship2 = false;

            if (m_relationships != null)
            {
                foreach (IdcRelationship relationship in m_relationships)
                {
                    if (relationship.ValidateIntersectRelationship(errorContext, currentScope, scopeTree))
                    {
                        CheckRelationshipDataSetBinding(scopeTree, errorContext, currentScope, relationship, m_rowParentDataSet, ref dataSetAlreadyHasRelationship);
                        CheckRelationshipDataSetBinding(scopeTree, errorContext, currentScope, relationship, m_columnParentDataSet, ref dataSetAlreadyHasRelationship2);
                        continue;
                    }
                    return(false);
                }
            }
            dataSetAlreadyHasRelationship  = HasRelationshipOrDefaultForDataSet(scopeTree, errorContext, currentScope, ourDataSet, m_rowParentDataSet, dataSetAlreadyHasRelationship);
            dataSetAlreadyHasRelationship2 = HasRelationshipOrDefaultForDataSet(scopeTree, errorContext, currentScope, ourDataSet, m_columnParentDataSet, dataSetAlreadyHasRelationship2);
            if (!dataSetAlreadyHasRelationship || !dataSetAlreadyHasRelationship2)
            {
                return(false);
            }
            DataRegion parentDataRegion2 = scopeTree.GetParentDataRegion(currentScope);

            if (ValidateCellBoundTotheSameDataSetAsParentScpoe(m_columnParentDataSet, m_rowParentDataSet, ourDataSet, parentDataRegion2.IsColumnGroupingSwitched))
            {
                IRIFDataScope parentDataRegion3                = scopeTree.GetParentDataRegion(currentScope);
                IRIFDataScope parentRowScopeForIntersection    = scopeTree.GetParentRowScopeForIntersection(currentScope);
                IRIFDataScope parentColumnScopeForIntersection = scopeTree.GetParentColumnScopeForIntersection(currentScope);
                if (parentDataRegion2.IsColumnGroupingSwitched)
                {
                    errorContext.Register(ProcessingErrorCode.rsInvalidIntersectionNaturalJoin, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion3.Name, "ParentScope", parentDataRegion3.DataScopeObjectType.ToString(), parentColumnScopeForIntersection.Name, parentRowScopeForIntersection.Name);
                    return(false);
                }
                errorContext.Register(ProcessingErrorCode.rsInvalidIntersectionNaturalJoin, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion3.Name, "ParentScope", parentDataRegion3.DataScopeObjectType.ToString(), parentRowScopeForIntersection.Name, parentColumnScopeForIntersection.Name);
                return(false);
            }
            return(true);
        }
示例#5
0
        public override bool Validate(Severity severity, string propertyName, ObjectType objectType, string objectName, string propertyNameValue, ErrorContext errorContext)
        {
            bool result = true;

            if (propertyNameValue == null || !base.IsUnique(propertyNameValue))
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidObjectNameNotUnique, severity, objectType, objectName, propertyName, propertyNameValue);
                result = false;
            }
            if (propertyNameValue != null && !NameValidator.IsCLSCompliant(propertyNameValue))
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidObjectNameNotCLSCompliant, severity, objectType, objectName, propertyName, propertyNameValue);
                result = false;
            }
            return(result);
        }
 internal static void ValidateTextRunMarkupType(string value, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     if (!Validator.ValidateTextRunMarkupType(value))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidMarkupType, Severity.Error, objectType, objectName, propertyName, value);
     }
 }
 internal static void ValidateBorderColorNotTransparent(ObjectType objectType, string objectName, Microsoft.ReportingServices.ReportIntermediateFormat.Style styleClass, string styleName, ErrorContext errorContext)
 {
     if (styleClass.GetAttributeInfo(styleName, out Microsoft.ReportingServices.ReportIntermediateFormat.AttributeInfo styleAttribute) && !styleAttribute.IsExpression && ReportColor.TryParse(styleAttribute.Value, allowTransparency: true, out ReportColor reportColor) && reportColor.ToColor().A != byte.MaxValue)
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Error, objectType, objectName, styleName, styleAttribute.Value);
     }
 }
        internal bool Validate(string parameterName, ObjectType objectType, string objectName, ErrorContext errorContext)
        {
            bool result = true;

            if (string.IsNullOrEmpty(parameterName) || parameterName.Length > 256)
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidParameterNameLength, Severity.Error, objectType, objectName, "Name", parameterName, "256");
                result = false;
            }
            if (!NameValidator.IsCLSCompliant(parameterName))
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidParameterNameNotCLSCompliant, Severity.Error, objectType, objectName, "Name", parameterName);
                result = false;
            }
            return(result);
        }
        private void BindToNamedDataSet(ScopeTree scopeTree, IRIFReportDataScope scope, ErrorContext errorContext, ParentDataSetContainer parentDataSets)
        {
            DataSet dataSet = scopeTree.GetDataSet(this.m_dataSetName);

            if (dataSet == null)
            {
                DataRegion parentDataRegion = scopeTree.GetParentDataRegion(scope);
                if (parentDataSets != null && parentDataSets.Count == 1 && scope is DataRegion && parentDataRegion != null)
                {
                    this.UpdateDataSet(parentDataSets.ParentDataSet, scope);
                    this.m_dataSetName = parentDataSets.ParentDataSet.Name;
                }
                else
                {
                    errorContext.Register(ProcessingErrorCode.rsInvalidDataSetName, Severity.Error, scope.DataScopeObjectType, scope.Name, "DataSetName", this.m_dataSetName.MarkAsPrivate());
                    if (parentDataSets != null)
                    {
                        this.UpdateDataSet(parentDataSets.ParentDataSet, scope);
                    }
                }
            }
            else
            {
                this.UpdateDataSet(dataSet, scope);
            }
        }
示例#10
0
        internal override bool ValidateRelationships(ScopeTree scopeTree, ErrorContext errorContext, DataSet ourDataSet, ParentDataSetContainer parentDataSets, IRIFReportDataScope currentScope)
        {
            Global.Tracer.Assert(parentDataSets != null && parentDataSets.Count == 1, "LinearJoinInfo can only be used with exactly one parent data set");
            m_parentDataSet = parentDataSets.ParentDataSet;
            if (DataSet.AreEqualById(ourDataSet, m_parentDataSet))
            {
                return(false);
            }
            bool flag = false;

            if (m_relationships != null)
            {
                foreach (IdcRelationship relationship in m_relationships)
                {
                    flag |= relationship.ValidateLinearRelationship(errorContext, m_parentDataSet);
                }
            }
            if (flag || ourDataSet.HasDefaultRelationship(m_parentDataSet))
            {
                Relationship activeRelationship = GetActiveRelationship(ourDataSet);
                if (activeRelationship == null)
                {
                    RegisterInvalidInnerDataSetNameError(errorContext, ourDataSet, currentScope);
                    return(false);
                }
                if (activeRelationship.IsCrossJoin && (!activeRelationship.NaturalJoin || ScopeHasParentGroups(currentScope, scopeTree)))
                {
                    errorContext.Register(ProcessingErrorCode.rsInvalidNaturalCrossJoin, Severity.Error, currentScope.DataScopeObjectType, currentScope.Name, "JoinConditions");
                    return(false);
                }
                return(true);
            }
            RegisterInvalidInnerDataSetNameError(errorContext, ourDataSet, currentScope);
            return(false);
        }
示例#11
0
 protected void CheckContainerRelationshipForNaturalJoin(IRIFDataScope startScope, ErrorContext errorContext, IRIFDataScope scope, Relationship outerRelationship)
 {
     if (outerRelationship != null && !outerRelationship.NaturalJoin)
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidRelationshipContainerNotNaturalJoin, Severity.Error, startScope.DataScopeObjectType, startScope.Name, "Relationship", scope.DataScopeObjectType.ToString(), scope.Name);
     }
 }
        public bool Validate(string name, string dataField, string dataSetName, ErrorContext errorContext)
        {
            bool result = true;

            if (!NameValidator.IsCLSCompliant(name))
            {
                errorContext.Register(this.m_errorCodeNotCLS, Severity.Error, ObjectType.Field, dataField, "Name", name, dataSetName);
                result = false;
            }
            if (!base.IsUnique(name))
            {
                errorContext.Register(this.m_errorCodeNotUnique, Severity.Error, ObjectType.Field, dataField, "Name", name, dataSetName);
                result = false;
            }
            return(result);
        }
示例#13
0
        internal void MergeCollationSettings(ErrorContext errorContext, string dataSourceType, string cultureName, bool caseSensitive, bool accentSensitive, bool kanatypeSensitive, bool widthSensitive)
        {
            if (!NeedAutoDetectCollation())
            {
                return;
            }
            uint lcid = DataSetValidator.LOCALE_SYSTEM_DEFAULT;

            if (cultureName != null)
            {
                try
                {
                    lcid = (uint)CultureInfo.GetCultureInfo(cultureName).LCID;
                }
                catch (Exception)
                {
                    errorContext?.Register(ProcessingErrorCode.rsInvalidCollationCultureName, Severity.Warning, Microsoft.ReportingServices.ReportProcessing.ObjectType.DataSet, m_name, dataSourceType, cultureName);
                }
            }
            if (DataSetValidator.LOCALE_SYSTEM_DEFAULT == m_lcid)
            {
                m_lcid = lcid;
            }
            m_accentSensitivity   = MergeSensitivity(m_accentSensitivity, accentSensitive);
            m_caseSensitivity     = MergeSensitivity(m_caseSensitivity, caseSensitive);
            m_kanatypeSensitivity = MergeSensitivity(m_kanatypeSensitivity, kanatypeSensitive);
            m_widthSensitivity    = MergeSensitivity(m_widthSensitivity, widthSensitive);
        }
示例#14
0
 public void MergeCollationSettings(ErrorContext errorContext, string dataSourceType, string cultureName, bool caseSensitive, bool accentSensitive, bool kanatypeSensitive, bool widthSensitive)
 {
     if (this.NeedAutoDetectCollation())
     {
         uint lcid = DataSetValidator.LOCALE_SYSTEM_DEFAULT;
         if (cultureName != null)
         {
             try
             {
                 CultureInfo cultureInfo = CultureInfo.GetCultureInfo(cultureName);
                 lcid = (uint)cultureInfo.LCID;
             }
             catch (Exception)
             {
                 if (errorContext != null)
                 {
                     errorContext.Register(ProcessingErrorCode.rsInvalidCollationCultureName, Severity.Warning, AspNetCore.ReportingServices.ReportProcessing.ObjectType.DataSet, this.m_name, dataSourceType, cultureName);
                 }
             }
         }
         if (DataSetValidator.LOCALE_SYSTEM_DEFAULT == this.m_lcid)
         {
             this.m_lcid = lcid;
         }
         this.m_accentSensitivity   = this.MergeSensitivity(this.m_accentSensitivity, accentSensitive);
         this.m_caseSensitivity     = this.MergeSensitivity(this.m_caseSensitivity, caseSensitive);
         this.m_kanatypeSensitivity = this.MergeSensitivity(this.m_kanatypeSensitivity, kanatypeSensitive);
         this.m_widthSensitivity    = this.MergeSensitivity(this.m_widthSensitivity, widthSensitive);
     }
 }
示例#15
0
 public static void ValidateParagraphListStyle(string value, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     if (!Validator.ValidateParagraphListStyle(value))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidListStyle, Severity.Error, objectType, objectName, propertyName, value);
     }
 }
示例#16
0
 private bool HasRelationshipOrDefaultForDataSet(ScopeTree scopeTree, ErrorContext errorContext, IRIFReportDataScope currentScope, DataSet ourDataSet, DataSet parentDataSet, bool hasValidRelationship)
 {
     if (DataSet.AreEqualById(parentDataSet, ourDataSet))
     {
         return(true);
     }
     if (hasValidRelationship || ourDataSet.HasDefaultRelationship(parentDataSet))
     {
         Relationship activeRelationship = GetActiveRelationship(ourDataSet, parentDataSet);
         if (activeRelationship == null)
         {
             RegisterInvalidCellDataSetNameError(scopeTree, errorContext, currentScope, ourDataSet, parentDataSet);
             return(false);
         }
         if (activeRelationship.IsCrossJoin)
         {
             DataRegion parentDataRegion = scopeTree.GetParentDataRegion(currentScope);
             errorContext.Register(ProcessingErrorCode.rsInvalidIntersectionNaturalCrossJoin, Severity.Error, currentScope.DataScopeObjectType, parentDataRegion.Name, "JoinConditions", parentDataRegion.ObjectType.ToString());
             return(false);
         }
         return(true);
     }
     RegisterInvalidCellDataSetNameError(scopeTree, errorContext, currentScope, ourDataSet, parentDataSet);
     return(false);
 }
示例#17
0
 public static void ValidateCalendar(CultureInfo language, string calendar, ObjectType objectType, string ObjectName, string propertyName, ErrorContext errorContext)
 {
     if (!Validator.ValidateCalendar(language, calendar))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidCalendarForLanguage, Severity.Error, objectType, ObjectName, propertyName, calendar, language.Name);
     }
 }
示例#18
0
 public static void ValidateNumeralVariant(CultureInfo language, int numVariant, ObjectType objectType, string ObjectName, string propertyName, ErrorContext errorContext)
 {
     if (!Validator.ValidateNumeralVariant(language, numVariant))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidNumeralVariantForLanguage, Severity.Error, objectType, ObjectName, propertyName, numVariant.ToString(CultureInfo.InvariantCulture), language.Name);
     }
 }
示例#19
0
 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);
             }
         }
     }
 }
示例#20
0
        internal bool Validate(string name, ObjectType objectType, string objectName, ErrorContext errorContext)
        {
            bool result = true;

            if (!NameValidator.IsCLSCompliant(name))
            {
                errorContext.Register(m_errorCodeNotCLS, Severity.Error, objectType, objectName, "Name", name);
                result = false;
            }
            if (!IsUnique(name))
            {
                errorContext.Register(m_errorCodeNotUnique, Severity.Error, objectType, objectName, "Name", name);
                result = false;
            }
            return(result);
        }
示例#21
0
 internal byte[] Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, bool refusePermissions, PublishingVersioning versioning)
 {
     byte[] result = null;
     if (m_builder.HasExpressions && versioning.IsRdlFeatureRestricted(RdlFeatures.ComplexExpression))
     {
         m_errorContext.Register(ProcessingErrorCode.rsInvalidComplexExpressionInReport, Severity.Error, Microsoft.ReportingServices.ReportProcessing.ObjectType.Report, "Report", "Body");
     }
     else
     {
         m_expressionHostAssemblyHolder = expressionHostAssemblyHolder;
         RevertImpersonationContext.Run(delegate
         {
             result = InternalCompile(compilationTempAppDomain, refusePermissions);
         });
     }
     return(result);
 }
 internal static string ValidateMimeType(string mimeType, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     if (Validator.ValidateMimeType(mimeType))
     {
         return(mimeType);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidMIMEType, Severity.Warning, objectType, objectName, propertyName, mimeType);
     return(null);
 }
示例#23
0
 private static bool ValidateEmbeddedImageName(string embeddedImageName, Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo> embeddedImages, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     if (!Validator.ValidateEmbeddedImageName(embeddedImageName, embeddedImages))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidEmbeddedImageProperty, Severity.Error, objectType, objectName, propertyName, embeddedImageName);
         return(false);
     }
     return(true);
 }
示例#24
0
 public static bool ValidateMimeType(string mimeType, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     if (!Validator.ValidateMimeType(mimeType))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidMIMEType, Severity.Error, objectType, objectName, propertyName, mimeType);
         return(false);
     }
     return(true);
 }
示例#25
0
 public static bool ValidateColumns(int columns, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext, int sectionNumber)
 {
     if (!Validator.ValidateColumns(columns))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidColumnsInReportSection, Severity.Error, objectType, objectName, propertyName, sectionNumber.ToString(CultureInfo.InvariantCulture));
         return(false);
     }
     return(true);
 }
示例#26
0
 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);
 }
 private static bool ValidateUnicodeBiDi(Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo unicodeBiDi, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     Global.Tracer.Assert(unicodeBiDi != null);
     if (Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant == unicodeBiDi.Type && !Validator.ValidateUnicodeBiDi(unicodeBiDi.StringValue))
     {
         errorContext.Register(ProcessingErrorCode.rsInvalidUnicodeBiDi, Severity.Error, objectType, objectName, propertyName, unicodeBiDi.StringValue);
         return(false);
     }
     return(true);
 }
示例#28
0
        public static void ValidateBorderColorNotTransparent(ObjectType objectType, string objectName, AspNetCore.ReportingServices.ReportIntermediateFormat.Style styleClass, string styleName, ErrorContext errorContext)
        {
            ReportColor reportColor = default(ReportColor);

            AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo attributeInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo);
            if (styleClass.GetAttributeInfo(styleName, out attributeInfo) && !attributeInfo.IsExpression && ReportColor.TryParse(attributeInfo.Value, true, out reportColor) && reportColor.ToColor().A != 255)
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Error, objectType, objectName, styleName, attributeInfo.Value);
            }
        }
示例#29
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);
 }
示例#30
0
 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);
 }