InternetCalendarProperty Class

An iCalendar property kept verbatim: its name, its parameters and its value exactly as they are written in a content line (RFC 5545 section 3.1).

public sealed class InternetCalendarProperty

Remarks

Unlike the TEXT values of InternetCalendar.AdditionalProperties and Event.AdditionalProperties, the value is neither escaped when written nor unescaped when read, so structured values such as GEO:37.386013;-122.082932, CATEGORIES:WORK,MEETING or EXDATE;TZID=Europe/Paris:20240104T100000 round-trip unchanged.

A parameter value is kept in its param-value form, including the DQUOTE characters of a quoted value, as in new KeyValuePair<string, string>("ALTREP", "\"cid:part1@example.org\""), but with the RFC 6868 encoding (^^, ^n and ^') decoded. See InternetCalendarProperty.Parameters.

Constructors

NameDescription
InternetCalendarProperty(string, IEnumerable<KeyValuePair<string, string>>, string)Initializes a new instance of the InternetCalendarProperty class.
InternetCalendarProperty(string, string)Initializes a new instance of the InternetCalendarProperty class without parameters.

InternetCalendarProperty overloads

InternetCalendarProperty(string, IEnumerable<KeyValuePair<string, string>>, string)

InternetCalendarProperty.cs

Initializes a new instance of the InternetCalendarProperty class.

public InternetCalendarProperty(string name, IEnumerable<KeyValuePair<string, string>> parameters, string value)
Parameters
name string
The property name, made of ASCII letters, digits and dashes.
parameters IEnumerable<KeyValuePair<string, string>>
The property parameters. See InternetCalendarProperty.Parameters for the form of a value.
value string
The value as it is written in the content line.
Exceptions
ArgumentNullException
name, parameters or value is null.
ArgumentException
The name of the property or of a parameter is not a valid name, a parameter value is null or contains a control character other than a horizontal tab or a line feed, or value contains a control character.

InternetCalendarProperty(string, string)

InternetCalendarProperty.cs

Initializes a new instance of the InternetCalendarProperty class without parameters.

public InternetCalendarProperty(string name, string value)
Parameters
name string
The property name, made of ASCII letters, digits and dashes.
value string
The value as it is written in the content line.
Exceptions
ArgumentNullException
name or value is null.
ArgumentException
name is not a property name, or value contains a control character.

Properties

NameDescription
NameGets the property name.
ParametersGets the property parameters.
ValueGets the value as it is written in the content line.

Gets the property name.

public string Name { get; }

Property value

string

Gets the property parameters.

public IReadOnlyList<KeyValuePair<string, string>> Parameters { get; }

Property value

IReadOnlyList<KeyValuePair<string, string>>

Remarks

A value that is a param-value list (RFC 5545 section 3.1), made of paramtext and quoted-string values separated by commas, such as ACCEPTED, "Doe, Jane" or "mailto:a@example.com","mailto:b@example.com", is written as such. Any other value, such as Jane "JD" Doe or a:b, is a single value, written as a quoted-string.

The characters a param-value cannot hold are written with the RFC 6868 encoding, which the parser decodes: a circumflex accent as ^^, a line feed as ^n and, in a single value, a DQUOTE as ^'. As a consequence, a value that is itself a param-value list, such as "a", cannot denote a value holding DQUOTE characters.

Gets the value as it is written in the content line.

public string Value { get; }

Property value

string