CssStyleSheet Parse(CssParser parser, CssStyleSheet sheet, TextSource source) { var evt = new CssParseStartEvent(sheet); var events = parser.Config.Events; if (events != null) { events.Publish(evt); } parser.ParseStylesheet(sheet, source); evt.FireEnd(); return(sheet); }
async Task <CssStyleSheet> Parse(CssParser parser, CssStyleSheet sheet, TextSource source) { var evt = new CssParseStartEvent(sheet); var events = parser.Config.Events; if (events != null) { events.Publish(evt); } await parser.ParseStylesheetAsync(sheet, source).ConfigureAwait(false); evt.FireEnd(); return(sheet); }