private void CreateAndValidateCalendar(int languageState, CultureInfo formattingCulture) { AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo attributeInfo = null; Calendars calendars = Calendars.Default; bool flag = false; if (this.m_styleClass.GetAttributeInfo("Calendar", out attributeInfo)) { if (attributeInfo.IsExpression) { flag = true; calendars = (Calendars)this.m_styleClass.EvaluateStyle(this.m_objectType, this.m_objectName, attributeInfo, AspNetCore.ReportingServices.ReportIntermediateFormat.Style.StyleId.Calendar, this.m_context); this.m_sharedFormatSettings = false; } else { calendars = StyleTranslator.TranslateCalendar(attributeInfo.Value, this.m_context.ReportRuntime); switch (languageState) { case 1: flag = true; break; default: if (this.m_calendarValidated) { break; } this.m_calendarValidated = true; this.m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars); return; case 0: break; } } } if (!flag && this.m_calendarValidated) { return; } if (calendars != 0 && ProcessingValidator.ValidateCalendar(formattingCulture, calendars, this.m_objectType, this.m_objectName, "Calendar", this.m_context.ErrorContext)) { this.m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars); } if (!flag) { this.m_calendarValidated = true; } }
public static string ValidateLineHeight(string size, IErrorContext errorContext) { return(ProcessingValidator.ValidateSize(size, Validator.LineHeightMin, Validator.LineHeightMax, errorContext)); }
public static string ValidatePadding(string size, IErrorContext errorContext) { return(ProcessingValidator.ValidateSize(size, Validator.PaddingMin, Validator.PaddingMax, errorContext)); }
public static string ValidateFontSize(string size, IErrorContext errorContext) { return(ProcessingValidator.ValidateSize(size, Validator.FontSizeMin, Validator.FontSizeMax, errorContext)); }
public static object ValidateCustomStyle(string styleName, object styleValue, ObjectType objectType, IErrorContext errorContext) { CultureInfo cultureInfo = default(CultureInfo); switch (styleName) { case "BorderColor": case "BorderColorLeft": case "BorderColorRight": case "BorderColorTop": case "BorderColorBottom": return(ProcessingValidator.ValidateColor(styleValue as string, errorContext, objectType == ObjectType.Chart)); case "BorderStyle": case "BorderStyleLeft": case "BorderStyleRight": case "BorderStyleTop": case "BorderStyleBottom": return(ProcessingValidator.ValidateBorderStyle(styleValue as string, objectType, errorContext)); case "BorderWidth": case "BorderWidthLeft": case "BorderWidthRight": case "BorderWidthTop": case "BorderWidthBottom": return(ProcessingValidator.ValidateSize((styleValue as AspNetCore.ReportingServices.ReportRendering.ReportSize).ToString(), Validator.BorderWidthMin, Validator.BorderWidthMax, errorContext)); case "Color": case "BackgroundColor": case "BackgroundGradientEndColor": return(ProcessingValidator.ValidateColor(styleValue as string, errorContext, objectType == ObjectType.Chart)); case "BackgroundGradientType": return(ProcessingValidator.ValidateBackgroundGradientType(styleValue as string, errorContext)); case "FontStyle": return(ProcessingValidator.ValidateFontStyle(styleValue as string, errorContext)); case "FontFamily": return(styleValue as string); case "FontSize": return(ProcessingValidator.ValidateSize((styleValue as AspNetCore.ReportingServices.ReportRendering.ReportSize).ToString(), Validator.FontSizeMin, Validator.FontSizeMax, errorContext)); case "FontWeight": return(ProcessingValidator.ValidateFontWeight(styleValue as string, errorContext)); case "Format": return(styleValue as string); case "TextDecoration": return(ProcessingValidator.ValidateTextDecoration(styleValue as string, errorContext)); case "TextAlign": return(ProcessingValidator.ValidateTextAlign(styleValue as string, errorContext)); case "VerticalAlign": return(ProcessingValidator.ValidateVerticalAlign(styleValue as string, errorContext)); case "PaddingLeft": case "PaddingRight": case "PaddingTop": case "PaddingBottom": return(ProcessingValidator.ValidateSize((styleValue as AspNetCore.ReportingServices.ReportRendering.ReportSize).ToString(), Validator.PaddingMin, Validator.PaddingMax, errorContext)); case "LineHeight": return(ProcessingValidator.ValidateSize((styleValue as AspNetCore.ReportingServices.ReportRendering.ReportSize).ToString(), Validator.LineHeightMin, Validator.LineHeightMax, errorContext)); case "Direction": return(ProcessingValidator.ValidateDirection(styleValue as string, errorContext)); case "WritingMode": return(ProcessingValidator.ValidateWritingMode(styleValue as string, errorContext)); case "Language": return(ProcessingValidator.ValidateSpecificLanguage(styleValue as string, errorContext, out cultureInfo)); case "UnicodeBiDi": return(ProcessingValidator.ValidateUnicodeBiDi(styleValue as string, errorContext)); case "Calendar": return(ProcessingValidator.ValidateCalendar(styleValue as string, errorContext)); case "NumeralLanguage": return(ProcessingValidator.ValidateLanguage(styleValue as string, errorContext, out cultureInfo)); case "NumeralVariant": { int numeralVariant = default(int); if (int.TryParse(styleValue as string, out numeralVariant)) { return(ProcessingValidator.ValidateNumeralVariant(numeralVariant, errorContext)); } errorContext.Register(ProcessingErrorCode.rsInvalidNumeralVariant, Severity.Warning, styleValue as string); return(null); } default: Global.Tracer.Assert(false); break; case "BackgroundImageSource": case "BackgroundImageValue": case "BackgroundImageMIMEType": case "BackgroundRepeat": break; } return(null); }
public static object ValidateCustomStyle(string styleName, object styleValue, IErrorContext errorContext) { return(ProcessingValidator.ValidateCustomStyle(styleName, styleValue, ObjectType.Image, errorContext)); }
public static string ValidateBorderWidth(string size, IErrorContext errorContext) { return(ProcessingValidator.ValidateSize(size, Validator.BorderWidthMin, Validator.BorderWidthMax, errorContext)); }
public static string ValidateColor(string color, IErrorContext errorContext) { return(ProcessingValidator.ValidateColor(color, errorContext, false)); }