iTextSharp.tool.xml.css.CssFilesImpl.PopulateCss C# (CSharp) Method

PopulateCss() public method

public PopulateCss ( String>.IDictionary aggregatedProps, String selector ) : void
aggregatedProps String>.IDictionary
selector String
return void
        public void PopulateCss(IDictionary<String, String> aggregatedProps, String selector)
        {
            foreach (ICssFile cssFile in this.files) {
                IDictionary<String, String> t = cssFile.Get(selector);
                IDictionary<String, String> css = new Dictionary<String, String>();
                foreach (KeyValuePair<String, String> e in t) {
                    String key = utils.StripDoubleSpacesAndTrim(e.Key);
                    String value = utils.StripDoubleSpacesAndTrim(e.Value);
                    if (Util.EqualsIgnoreCase(CSS.Property.BORDER, key)) {
                        CssUtils.MapPutAll(css, utils.ParseBorder(value));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.MARGIN, key)) {
                        CssUtils.MapPutAll(css, utils.ParseBoxValues(value, "margin-", ""));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.BORDER_WIDTH, key)) {
                        CssUtils.MapPutAll(css, utils.ParseBoxValues(value, "border-", "-width"));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.BORDER_STYLE, key)) {
                        CssUtils.MapPutAll(css, utils.ParseBoxValues(value, "border-", "-style"));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.BORDER_COLOR, key)) {
                        CssUtils.MapPutAll(css, utils.ParseBoxValues(value, "border-", "-color"));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.PADDING, key)) {
                        CssUtils.MapPutAll(css, utils.ParseBoxValues(value, "padding-", ""));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.FONT, key)) {
                        CssUtils.MapPutAll(css, utils.ProcessFont(value));
                    } else if (Util.EqualsIgnoreCase(CSS.Property.LIST_STYLE, key)) {
                        CssUtils.MapPutAll(css, utils.ProcessListStyle(value));
                    } else {
                        css[key] = value;
                    }
                }
                CssUtils.MapPutAll(aggregatedProps, css);
            }
        }