public StyleSelector(string selector) { _hash = selector.GetHashCode(); string[] split = selector.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var parts = new uint[split.Length]; for (int i = 0; i < split.Length; i++) { string part = split[i].Trim(); if (!string.IsNullOrEmpty(part)) { if (part[0] == '.') { part = part.Substring(1); } else if (StyleSheetCache.TagNames.ContainsKey(part)) { part = StyleSheetCache.TagNames[part].Name.ToLower(); } } parts[i] = StyleSheetCache.GetStringKey(part); } _parts = parts; }
public Part(string type, string cssClass) : this() { #if DEBUG _type = type; _cssClass = cssClass; #endif Type = StyleSheetCache.GetStringKey(type); CssClass = StyleSheetCache.GetStringKey(cssClass); }
public Part(string type) : this() { Type = StyleSheetCache.GetStringKey(type); CssClass = 0; }