public Sorting(ConstructionPhase phase) { if (phase == ConstructionPhase.Publishing) { this.m_sortExpressions = new ExpressionInfoList(); this.m_sortDirections = new BoolList(); } }
public Grouping(ConstructionPhase phase) { if (phase == ConstructionPhase.Publishing) { this.m_groupExpressions = new ExpressionInfoList(); this.m_aggregates = new DataAggregateInfoList(); this.m_postSortAggregates = new DataAggregateInfoList(); this.m_recursiveAggregates = new DataAggregateInfoList(); } }
public void AddAttribute(string name, ExpressionInfo expressionInfo) { AttributeInfo attributeInfo = new AttributeInfo(); attributeInfo.IsExpression = (ExpressionInfo.Types.Constant != expressionInfo.Type); if (attributeInfo.IsExpression) { if (this.m_expressionList == null) { this.m_expressionList = new ExpressionInfoList(); } attributeInfo.IntValue = this.m_expressionList.Add(expressionInfo); } else { attributeInfo.Value = expressionInfo.Value; attributeInfo.BoolValue = expressionInfo.BoolValue; attributeInfo.IntValue = expressionInfo.IntValue; } Global.Tracer.Assert(null != this.m_styleAttributes); this.m_styleAttributes.Add(name, attributeInfo); }
public static Style ValidateAndCreateStyle(StringList names, ExpressionInfoList values, ObjectType objectType, string objectName, ErrorContext errorContext) { Style style = new Style(ConstructionPhase.Publishing); Global.Tracer.Assert(null != names); Global.Tracer.Assert(null != values); Global.Tracer.Assert(names.Count == values.Count); ExpressionInfo backgroundImageSource = null; ExpressionInfo backgroundImageValue = null; ExpressionInfo backgroundImageMIMEType = null; for (int i = 0; i < names.Count; i++) { switch (names[i]) { case "BackgroundImageSource": backgroundImageSource = values[i]; break; case "BackgroundImageValue": backgroundImageValue = values[i]; break; case "BackgroundImageMIMEType": backgroundImageMIMEType = values[i]; break; case "BackgroundRepeat": if (PublishingValidator.ValidateBackgroundRepeat(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "BorderColor": case "BorderColorLeft": case "BorderColorRight": case "BorderColorTop": case "BorderColorBottom": if (PublishingValidator.ValidateColor(values[i], objectType, objectName, "BorderColor", errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "BorderStyle": case "BorderStyleLeft": case "BorderStyleRight": case "BorderStyleTop": case "BorderStyleBottom": if (PublishingValidator.ValidateBorderStyle(values[i], objectType, objectName, "BorderStyle", errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "BorderWidth": case "BorderWidthLeft": case "BorderWidthRight": case "BorderWidthTop": case "BorderWidthBottom": if (PublishingValidator.ValidateSize(values[i], Validator.BorderWidthMin, Validator.BorderWidthMax, objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "BackgroundColor": case "BackgroundGradientEndColor": if (PublishingValidator.ValidateColor(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "BackgroundGradientType": if (PublishingValidator.ValidateBackgroundGradientType(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "FontStyle": if (PublishingValidator.ValidateFontStyle(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "FontFamily": style.AddAttribute(names[i], values[i]); break; case "FontSize": if (PublishingValidator.ValidateSize(values[i], Validator.FontSizeMin, Validator.FontSizeMax, objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "FontWeight": if (PublishingValidator.ValidateFontWeight(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "Format": style.AddAttribute(names[i], values[i]); break; case "TextDecoration": if (PublishingValidator.ValidateTextDecoration(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "TextAlign": if (PublishingValidator.ValidateTextAlign(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "VerticalAlign": if (PublishingValidator.ValidateVerticalAlign(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "Color": if (PublishingValidator.ValidateColor(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "PaddingLeft": case "PaddingRight": case "PaddingTop": case "PaddingBottom": if (PublishingValidator.ValidateSize(values[i], Validator.PaddingMin, Validator.PaddingMax, objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "LineHeight": if (PublishingValidator.ValidateSize(values[i], Validator.LineHeightMin, Validator.LineHeightMax, objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "Direction": if (PublishingValidator.ValidateDirection(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "WritingMode": if (PublishingValidator.ValidateWritingMode(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "Language": { CultureInfo cultureInfo = default(CultureInfo); if (PublishingValidator.ValidateSpecificLanguage(values[i], objectType, objectName, names[i], errorContext, out cultureInfo)) { style.AddAttribute(names[i], values[i]); } break; } case "UnicodeBiDi": if (PublishingValidator.ValidateUnicodeBiDi(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "Calendar": if (PublishingValidator.ValidateCalendar(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "NumeralLanguage": if (PublishingValidator.ValidateLanguage(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; case "NumeralVariant": if (PublishingValidator.ValidateNumeralVariant(values[i], objectType, objectName, names[i], errorContext)) { style.AddAttribute(names[i], values[i]); } break; default: Global.Tracer.Assert(false); break; } } PublishingValidator.ValidateBackgroundImage(backgroundImageSource, backgroundImageValue, backgroundImageMIMEType, style, objectType, objectName, errorContext); if (0 < style.StyleAttributes.Count) { return(style); } return(null); }
public ChartDataPoint() { this.m_dataValues = new ExpressionInfoList(); }