public static StyleSheet Load(StyleSheetReader reader) { StyleSheet result = new StyleSheet(); while (!reader.EndOfStream) { switch (reader.Status) { case StyleSheetReader.ReadStatus.AtRule: result.Nodes.Add(AtRule.Parse(reader.ReadAtRule())); break; case StyleSheetReader.ReadStatus.RuleSet: result.Nodes.Add(RuleSet.Parse(reader.ReadRuleSet())); break; case StyleSheetReader.ReadStatus.Comment: result.Nodes.Add(Comment.Parse(reader.ReadComment())); break; default: break; } } return(result); }
public static StyleSheet Load(StyleSheetReader reader) { StyleSheet result = new StyleSheet(); while (!reader.EndOfStream) { switch (reader.Status) { case StyleSheetReader.ReadStatus.AtRule: result.Nodes.Add(AtRule.Parse(reader.ReadAtRule())); break; case StyleSheetReader.ReadStatus.RuleSet: result.Nodes.Add(RuleSet.Parse(reader.ReadRuleSet())); break; case StyleSheetReader.ReadStatus.Comment: result.Nodes.Add(Comment.Parse(reader.ReadComment())); break; default: break; } } return result; }