public static string ValidateFontWeight(string fontWeight, IErrorContext errorContext)
 {
     if (Validator.ValidateFontWeight(fontWeight))
     {
         return(fontWeight);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidFontWeight, Severity.Warning, fontWeight);
     return(null);
 }
 internal static string ValidateCalendar(string calendar, IErrorContext errorContext)
 {
     if (Validator.ValidateCalendar(calendar))
     {
         return(calendar);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidCalendar, Severity.Warning, calendar);
     return(null);
 }
 public ReportItemImpl(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem itemDef, AspNetCore.ReportingServices.RdlExpressions.ReportRuntime reportRT, IErrorContext iErrorContext)
 {
     Global.Tracer.Assert(null != itemDef, "(null != itemDef)");
     Global.Tracer.Assert(null != reportRT, "(null != reportRT)");
     Global.Tracer.Assert(null != iErrorContext, "(null != iErrorContext)");
     this.m_item          = itemDef;
     this.m_reportRT      = reportRT;
     this.m_iErrorContext = iErrorContext;
 }
 internal static string ValidateFontStyle(string fontStyle, IErrorContext errorContext)
 {
     if (Validator.ValidateFontStyle(fontStyle))
     {
         return(fontStyle);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidFontStyle, Severity.Warning, fontStyle);
     return(null);
 }
 internal static string ValidateUnicodeBiDi(string unicodeBiDi, IErrorContext errorContext)
 {
     if (Validator.ValidateUnicodeBiDi(unicodeBiDi))
     {
         return(unicodeBiDi);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidUnicodeBiDi, Severity.Warning, unicodeBiDi);
     return(null);
 }
 internal static string ValidateColor(string color, IErrorContext errorContext, bool allowTransparency)
 {
     if (Validator.ValidateColor(color, out string newColor, allowTransparency))
     {
         return(newColor);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Warning, color);
     return(null);
 }
 public static string ValidateBackgroundHatchType(string backgroundHatchType, IErrorContext errorContext)
 {
     if (Validator.ValidateBackgroundHatchType(backgroundHatchType))
     {
         return(backgroundHatchType);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidBackgroundHatchType, Severity.Warning, backgroundHatchType);
     return(null);
 }
 internal static string ValidateWritingMode(string writingMode, IErrorContext errorContext)
 {
     if (Validator.ValidateWritingMode(writingMode))
     {
         return(writingMode);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidWritingMode, Severity.Warning, writingMode);
     return(null);
 }
 internal static string ValidateBackgroundGradientType(string gradientType, IErrorContext errorContext)
 {
     if (Validator.ValidateBackgroundGradientType(gradientType))
     {
         return(gradientType);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidBackgroundGradientType, Severity.Warning, gradientType);
     return(null);
 }
 internal static string ValidateVerticalAlign(string verticalAlign, IErrorContext errorContext)
 {
     if (Validator.ValidateVerticalAlign(verticalAlign))
     {
         return(verticalAlign);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidVerticalAlign, Severity.Warning, verticalAlign);
     return(null);
 }
 internal static string ValidateDirection(string direction, IErrorContext errorContext)
 {
     if (Validator.ValidateDirection(direction))
     {
         return(direction);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidDirection, Severity.Warning, direction);
     return(null);
 }
 internal static string ValidateTextDecoration(string textDecoration, IErrorContext errorContext)
 {
     if (Validator.ValidateTextDecoration(textDecoration))
     {
         return(textDecoration);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidTextDecoration, Severity.Warning, textDecoration);
     return(null);
 }
 internal static string ValidateTextEffect(string textEffect, IErrorContext errorContext)
 {
     if (Validator.ValidateTextEffect(textEffect))
     {
         return(textEffect);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidTextEffect, Severity.Warning, textEffect);
     return(null);
 }
 public ReportItemImpl(AspNetCore.ReportingServices.ReportProcessing.ReportItem itemDef, ReportRuntime reportRT, IErrorContext iErrorContext)
 {
     Global.Tracer.Assert(null != itemDef, "(null != itemDef)");
     Global.Tracer.Assert(null != reportRT, "(null != reportRT)");
     Global.Tracer.Assert(null != iErrorContext, "(null != iErrorContext)");
     this.m_item          = itemDef;
     this.m_reportRT      = reportRT;
     this.m_iErrorContext = iErrorContext;
 }
 internal static string ValidateBackgroundRepeat(string repeat, IErrorContext errorContext)
 {
     if (Validator.ValidateBackgroundRepeat(repeat))
     {
         return(repeat);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidBackgroundRepeat, Severity.Warning, repeat);
     return(null);
 }
 internal static string ValidateTextRunMarkupType(string value, IErrorContext errorContext)
 {
     if (Validator.ValidateTextRunMarkupType(value))
     {
         return(value);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidMarkupType, Severity.Warning, value);
     return("None");
 }
 internal static string ValidateParagraphListStyle(string value, IErrorContext errorContext)
 {
     if (Validator.ValidateParagraphListStyle(value))
     {
         return(value);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidListStyle, Severity.Warning, value);
     return("None");
 }
 internal static string ValidateMimeType(string mimeType, IErrorContext errorContext)
 {
     if (Validator.ValidateMimeType(mimeType))
     {
         return(mimeType);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidMIMEType, Severity.Warning, mimeType);
     return(null);
 }
 internal static string ValidateSpecificLanguage(string language, IErrorContext errorContext, out CultureInfo culture)
 {
     if (Validator.ValidateSpecificLanguage(language, out culture))
     {
         return(language);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidLanguage, Severity.Warning, language);
     return(null);
 }
 internal static object ValidateNumeralVariant(int numeralVariant, IErrorContext errorContext)
 {
     if (Validator.ValidateNumeralVariant(numeralVariant))
     {
         return(numeralVariant);
     }
     errorContext.Register(ProcessingErrorCode.rsInvalidNumeralVariant, Severity.Warning, numeralVariant.ToString(CultureInfo.InvariantCulture));
     return(null);
 }
 internal ReportItemImpl(Microsoft.ReportingServices.ReportProcessing.ReportItem itemDef, ReportRuntime reportRT, IErrorContext iErrorContext)
 {
     Global.Tracer.Assert(itemDef != null, "(null != itemDef)");
     Global.Tracer.Assert(reportRT != null, "(null != reportRT)");
     Global.Tracer.Assert(iErrorContext != null, "(null != iErrorContext)");
     m_item          = itemDef;
     m_reportRT      = reportRT;
     m_iErrorContext = iErrorContext;
 }
Example #22
0
 internal override void Update(object[] expressions, IErrorContext iErrorContext)
 {
     Global.Tracer.Assert(expressions != null);
     Global.Tracer.Assert(1 == expressions.Length);
     if (!DataAggregate.IsNull(DataAggregate.GetTypeCode(expressions[0])))
     {
         m_currentTotal++;
     }
 }
 internal static int?ValidateParagraphListLevel(int value, IErrorContext errorContext)
 {
     if (!Validator.ValidateParagraphListLevel(value, out int?adjustedValue))
     {
         errorContext.Register(ProcessingErrorCode.rsOutOfRangeSize, Severity.Warning, Convert.ToString(value, CultureInfo.InvariantCulture), Convert.ToString(0, CultureInfo.InvariantCulture), Convert.ToString(9, CultureInfo.InvariantCulture));
         return(adjustedValue);
     }
     return(value);
 }
Example #24
0
        public override void Update(object[] expressions, IErrorContext iErrorContext)
        {
            object o = expressions[0];

            AspNetCore.ReportingServices.ReportProcessing.DataAggregate.DataTypeCode typeCode = DataAggregate.GetTypeCode(o);
            if (!DataAggregate.IsNull(typeCode))
            {
                this.m_currentTotal++;
            }
        }
Example #25
0
 internal override void Update(object[] expressions, IErrorContext iErrorContext)
 {
     Global.Tracer.Assert(expressions != null);
     Global.Tracer.Assert(1 == expressions.Length);
     if (!m_updated)
     {
         m_value   = expressions[0];
         m_updated = true;
     }
 }
Example #26
0
 public override void Update(object[] expressions, IErrorContext iErrorContext)
 {
     Global.Tracer.Assert(null != expressions);
     Global.Tracer.Assert(1 == expressions.Length);
     if (!this.m_updated)
     {
         this.m_value   = expressions[0];
         this.m_updated = true;
     }
 }
        public static int?ValidateParagraphListLevel(int value, IErrorContext errorContext)
        {
            int?result = default(int?);

            if (!Validator.ValidateParagraphListLevel(value, out result))
            {
                errorContext.Register(ProcessingErrorCode.rsOutOfRangeSize, Severity.Warning, Convert.ToString(value, CultureInfo.InvariantCulture), Convert.ToString(0, CultureInfo.InvariantCulture), Convert.ToString(9, CultureInfo.InvariantCulture));
                return(result);
            }
            return(value);
        }
        public static string ValidateColor(string color, IErrorContext errorContext, bool allowTransparency)
        {
            string result = default(string);

            if (Validator.ValidateColor(color, out result, allowTransparency))
            {
                return(result);
            }
            errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Warning, color);
            return(null);
        }
Example #29
0
        public override void Update(object[] expressions, IErrorContext iErrorContext)
        {
            Global.Tracer.Assert(null != expressions);
            Global.Tracer.Assert(1 == expressions.Length);
            object       o        = expressions[0];
            DataTypeCode typeCode = DataAggregate.GetTypeCode(o);

            if (!DataAggregate.IsNull(typeCode))
            {
                this.m_currentTotal++;
            }
        }
 public static Positions TranslatePosition(string styleString, IErrorContext errorContext, bool isChartStyle)
 {
     if (styleString != null && !StyleTranslator.CompareWithInvariantCulture("Default", styleString))
     {
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "Top"))
         {
             return(Positions.Top);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "TopLeft"))
         {
             return(Positions.TopLeft);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "TopRight"))
         {
             return(Positions.TopRight);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "Left"))
         {
             return(Positions.Left);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "Center"))
         {
             return(Positions.Center);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "Right"))
         {
             return(Positions.Right);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "BottomRight"))
         {
             return(Positions.BottomRight);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "Bottom"))
         {
             return(Positions.Bottom);
         }
         if (StyleTranslator.CompareWithInvariantCulture(styleString, "BottomLeft"))
         {
             return(Positions.BottomLeft);
         }
         if (errorContext != null)
         {
             errorContext.Register(ProcessingErrorCode.rsInvalidBackgroundImagePosition, Severity.Warning, styleString);
         }
     }
     if (isChartStyle)
     {
         return(Positions.TopLeft);
     }
     return(Positions.Center);
 }
        public PerformanceTelemetryPayload(
            IErrorContext errorContext,
            ITelemetryLogger logger,
            IThreadIdProvider threadIdProvider,
            IPerformanceContainer container,
            string className,
            string methodName)
        {
            if (errorContext == null)
            {
                throw new ArgumentNullException("errorContext");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (threadIdProvider == null)
            {
                throw new ArgumentNullException("threadIdProvider");
            }
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            if (className == null)
            {
                throw new ArgumentNullException("className");
            }
            if (methodName == null)
            {
                throw new ArgumentNullException("methodName");
            }

            this._errorContext = errorContext;
            this._logger = logger;
            this._container = container;

            this._manageThreadId = threadIdProvider.GetCurrentThreadId();

            this._record = _container.OpenPerformanceSession(
                this._manageThreadId,
                className,
                methodName);
        }