Example #1
0
        public static CalendarProperty ReadFrom(CalendarReader reader)
        {
            var line = new CalendarProperty {
                Name = reader.ReadName()
            };

            if (line.Name.Length == 0)
            {
                return(line);
            }

            while (reader.PeekOrRead(';'))
            {
                var param = CalendarPropertyParameter.ReadFrom(reader);
                if (line.Parameters == null)
                {
                    line.Parameters = new List <CalendarPropertyParameter>();
                }
                line.Parameters.Add(param);
            }
            reader.ReadChar(':');
            line.Value = ReadValue(reader);

            if (!reader.IsEof)
            {
                reader.ReadChar('\r');
            }
            if (!reader.IsEof)
            {
                reader.ReadChar('\n');
            }
            return(line);
        }
Example #2
0
        public static CalendarPropertyParameter ReadFrom(CalendarReader reader)
        {
            var res = new CalendarPropertyParameter {
                Name = reader.ReadName()
            };

            reader.ReadChar('=');
            res.Values = ParseParamValues(reader);
            return(res);
        }