예제 #1
0
        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);
        }
예제 #2
0
        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);
        }