Exemplo n.º 1
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;
        }
Exemplo n.º 2
0
        CssStyleSheet Parse(CssParser parser, CssStyleSheet sheet, TextSource source)
        {
            using (var evt = new CssParseStartEvent(sheet))
            {
                var events = parser.Config.Events;

                if (events != null)
                    events.Publish(evt);

                parser.ParseStylesheet(sheet, source);
            }

            return sheet;
        }