Ejemplo n.º 1
0
        public static ThemeStyle[] Parse(Stream stream)
        {
            ThemeList         styles  = new ThemeList();
            ContextDictionary context = new ContextDictionary();

            context.Add("Default", ThemeParserContext.Default);

            string content = null;

            using (StreamReader reader = new StreamReader(stream))
            {
                content = Sanitize(reader.ReadToEnd());
            }

            if (!string.IsNullOrEmpty(content))
            {
                ProcessRuleset(content, context, styles, null);
            }

            return(styles.ToArray());
        }