Example #1
0
        public CalendarParameter(string source)
        {
            string unfold         = ContentLine.UnfoldAndUnescape(source);
            Match  nameValueMatch = Regex.Match(unfold, NameValuePattern);

            Name  = nameValueMatch.Groups[1].ToString().Trim();
            Value = nameValueMatch.Groups[2].ToString().Trim();
        }
Example #2
0
        public vEvent(string source)
        {
            Match           contentMatch = Regex.Match(source, vEventContentPattern, vEventContentRegexOptions);
            string          content      = contentMatch.Groups[1].ToString();
            MatchCollection matches      = Regex.Matches(content, ContentLinePattern, ContentLineTRegexOptions);

            ContentLines = new Dictionary <string, ContentLine>();
            foreach (Match match in matches)
            {
                string      contentLineString = match.Groups[0].ToString();
                ContentLine contentLine       = new ContentLine(contentLineString);
                ContentLines[contentLine.Name] = contentLine;
            }
        }