Пример #1
0
        private void WriteStyle(RSSStyle Style)
        {
            WriteBetween('{', '}', () =>
            {
                Stream.Write($"\"Name\":{Quotify(Style.styleName)}");

                WriteStyleIdList(Style.styleIds);
            });
        }
Пример #2
0
    public string[] GetDetails(string Line)
    {
        Match m = DetailsRegex.Match(Line);

        string styleName = m.Groups["style_name"].Value;

        if (string.IsNullOrWhiteSpace(styleName))
        {
            throw new ParserException("The style name cannot be blank.");
        }

        if (RSSParser.CurrentParser.Styles != null)
        {
            RSSStyle Style = RSSParser.CurrentParser.Styles.Find(Instance => Instance.styleName == styleName);

            if (Style != null)
            {
                throw new ParserException($"The style {styleName} already exsist");
            }
        }

        return(new string[] { styleName });
    }