Every release of DevOp.ICalendar. Versions follow semantic versioning; within 1.x the public API only grows.
Richer typed scheduling properties, RFC 6868 parameter encoding, three target frameworks, dependency injection, parse limits, and round trips that keep what the model cannot hold.
- Adds netstandard2.0 and net8.0 assets next to net10.0, with the same public API on each; System.Text.Json is a dependency on netstandard2.0 only. The net8.0 and netstandard2.0 assets depend on the 8.0 line (Microsoft.Extensions.DependencyInjection.Abstractions and Microsoft.Extensions.Options 8.0.2, Microsoft.Extensions.Options.ConfigurationExtensions 8.0.0, System.Security.Cryptography.Pkcs 8.0.2, System.Text.Json 8.0.6), so an application on .NET 8 or .NET Framework is not lifted to 10.x; net10.0 depends on 10.0.10 (Pkcs 10.0.13)
- Updates the licence: the package is MIT (licence expression MIT), where 1.1.x carried the DevOp all-rights-reserved licence file
- Adds dependency injection: services.AddDevOpICalendar() registers IIcalendarCodec and IImipMessageComposer as singletons (TryAdd) over the unchanged static API, with IcalendarOptions (DefaultProdId, ParseLimits) bound from code or IConfiguration and validated at startup
- Adds IcalCodec.Parse(document, IcalParseLimits) for untrusted input: bounds on input length, component count, content lines per component, unfolded line length, nesting depth and TZID length (MaxTzidLength, default 256), refused with IcalParseLimitExceededException (a FormatException). IcalCodec.Parse(document) keeps its unbounded behaviour; the service applies IcalParseLimits.Default unless configured
- Improves ContentLine.Unfold: a line with many continuations is joined in linear time
- Updates parameter value encoding to RFC 6868: ^ is written as ^^, a newline as ^n and " as ^', and a value is quoted only when it contains ':', ';' or ',' or starts or ends with whitespace. Double quotes in an attendee or organizer CN used to be stripped and are now kept; ContentLine.Parse decodes the same escapes
- Adds multi-valued parameters: IcalParameter.Of(name, values) and IcalParameter.Values with per-value quoting (FEATURE=AUDIO,VIDEO; MEMBER="mailto:a@x","mailto:b@x"), single-value Name/Value kept, and IcalParameterJsonConverter, which also reads the single-value JSON shape
- Adds ContentLine.Parsed.ParamValues(name): the decoded values of a multi-valued parameter, split on commas outside quotes, and for the token lists TYPE, FEATURE and DISPLAY inside quotes too (TYPE="voice,home" is two values). A single-valued parameter (CN, TZID, LABEL, ROLE, ...) is one value, its commas and surrounding spaces kept: CN=Doe, John reads "Doe, John" as in 1.1.x. ParamHas splits every value on ',' as 1.1.x did, so TYPE="voice,home" and a directly constructed TYPE=WORK,VOICE match each token. The four-member Parsed record, its constructor, Deconstruct and equality are unchanged from 1.1.x
- Adds IcalComponent.OrganizerName (CN on ORGANIZER), IcalAttendee.Rsvp (RSVP=TRUE|FALSE) and IcalAttendee.UserType (CUTYPE); defaults write neither RSVP nor CUTYPE
- Adds IcalComponent.Conferences (RFC 7986 CONFERENCE with VALUE=URI, FEATURE and LABEL); a conference with other features or parameters, or a URI the writer would refuse (empty, a space, a control character), stays verbatim in UnknownProperties
- Adds IcalComponent.Alarms: DISPLAY alarms with a start-relative duration trigger, a description and an optional RFC 9074 UID. IcalAlarm.TriggerBeforeStart is written as a negative duration (-PT15M); a negative value (after the start) is written as a positive one (PT5M) and reads back typed; durations follow the RFC 5545 grammar (1h 0m 5s is -PT1H0M5S); TimeSpan.MinValue is refused with ArgumentOutOfRangeException when assigned. Any other alarm (other actions, repeats, absolute triggers, RELATED=END, an explicit '+', a trigger too large to represent) stays verbatim in UnknownProperties. A VALARM that is never closed is not an alarm: the lines after its BEGIN are read as the component's own, as in 1.1.x, and kept
- Adds IcalComponent.DescriptionDerived (RFC 9073 DERIVED=TRUE) and IcalComponent.Properties: typed extra properties such as STYLED-DESCRIPTION, X-ALT-DESC and IMAGE, with token-validated names. A typed property cannot be named BEGIN, END, METHOD or any property the model writes (including DUE and COMMENT)
- Fixes URL: it is a URI value (RFC 5545 §3.8.4.6) and is now written and read verbatim instead of TEXT-escaped. A URL set in code with a space or a control character is refused; a parsed one is kept verbatim in UnknownProperties with Url null, so a parse-then-serialize never throws
- Fixes recurrence round trips while keeping what 1.1.x read. Readers see: Recurrence is set for every rule with FREQ DAILY to YEARLY, exactly as 1.1.x read it (FREQ, INTERVAL, COUNT, UNTIL, the plain weekdays of BYDAY; WKST, BYMONTHDAY, BYMONTH, BYSETPOS and ordinal weekdays such as 1MO are not represented), and with more than one RRULE the last is read, as in 1.1.x. Two differences: a DATE UNTIL, which 1.1.x read as null (an open-ended series), reads as the whole of that date - the date itself (midnight UTC) for an all-day component, otherwise the last second of that date in DTSTART's zone (UTC when it has none) converted to UTC, so FREQ=DAILY;UNTIL=20261231 from DTSTART;TZID=Atlantic/Reykjavik:20261201T100000 keeps the 31 December occurrence; and a rule that repeats a part (which threw in 1.1.x) reads as null. A rule the record cannot reproduce exactly, a rule with parameters, every RRULE when there are several, and a rule with another FREQ (HOURLY, MINUTELY) are also kept verbatim in UnknownProperties and written back unchanged, never reduced. Adds IcalComponent.IsRecurring (a rule of any kind, or an RDATE) and IcalComponent.RecurrenceRuleText (the RRULE value the writer emits) for rules Recurrence cannot hold. A series defined by a verbatim RRULE or by RDATE is still written in its time zone. A kept rule is the sender's explicit rule: moving Start alone does not rewrite it, so an explicit BYMONTHDAY=15 stays when the first occurrence moves to the 20th
- Fixes RECURRENCE-ID: a DATE value is written with VALUE=DATE, and a RECURRENCE-ID the writer cannot reproduce exactly (RANGE=THISANDFUTURE, a TZID the series is not written in) is kept and written as read
- Fixes a kept line overriding a later edit. For RECURRENCE-ID, RRULE, STATUS and URL the typed value (RecurrenceId, Recurrence, IsCancelled, Url) is read from the last such line, as in 1.1.x (STATUS:CONFIRMED then STATUS:CANCELLED reads IsCancelled = true), and every line the writer would not reproduce exactly is kept verbatim (a RANGE or a foreign TZID on RECURRENCE-ID, a rule outside the record, a STATUS other than CANCELLED, a URL with parameters or one the writer would refuse, any repeated line). The kept lines are written instead of the typed value exactly while the typed value equals what the last line reads as (its projection), null included. So a changed value is written and the kept lines dropped (a parsed STATUS:CONFIRMED with IsCancelled = true writes one STATUS:CANCELLED; a RANGE=THISANDFUTURE RECURRENCE-ID with a new RecurrenceId writes the new value); a value set to null drops lines whose projection is not null, so clearing Recurrence, Url or RecurrenceId removes the property; and a line whose projection is null (an RRULE with FREQ=HOURLY or a repeated part, a URL with a space) is the caller's own and stays while the typed value is null. A caller writing a full-grammar RRULE in UnknownProperties sets Recurrence to what it reads as
- Fixes nested components the model does not know (VLOCATION, PARTICIPANT, X- components): they are kept whole in UnknownProperties, and their properties no longer replace the enclosing component's URL, SUMMARY, DESCRIPTION and so on
- Fixes Parse throwing on an alarm TRIGGER too large for a TimeSpan
- Fixes Parse throwing ArgumentOutOfRangeException for a TZID-qualified date-time that converts outside the range of a DateTimeOffset (TZID=America/Los_Angeles:99991231T235959, TZID=Europe/Berlin:00010101T000000): it throws FormatException, bounded or not
- Fixes TZID resolution cost: each distinct TZID is resolved once per parse, and a vendor-prefixed TZID looks up only trailing segments short enough to be a zone id, so a TZID of many slashes costs linear time
- Fixes Serialize throwing for a zoned series in year 9999: the VTIMEZONE is built up to the end of the representable range
- Changes METHOD:REPLY: an alarm in Alarms throws ArgumentException (RFC 5546 §3.2.3), including a DISPLAY alarm that a parse read into Alarms (Outlook's reminder is one), so clear Alarms before serializing a reply; alarms kept verbatim in UnknownProperties or OverrideComponents (AUDIO, EMAIL, repeating, absolute) are left out of the REPLY instead of throwing
Bytes written for a component built in code that differ from 1.1.4:
- ATTENDEE and ORGANIZER CN is quoted only when it needs to be (':', ';' or ',', or leading or trailing whitespace): CN="Jane Doe" is now CN=Jane Doe
- A parameter value's " is written as ^' and ^ as ^^ (RFC 6868); 1.1.4 dropped " and wrote ^ as is
- URL is written verbatim instead of TEXT-escaped: https://x.test/?a=1,2;b=3 was https://x.test/?a=1,2;b=3, and a backslash is no longer doubled
- A series defined only by RDATE in UnknownProperties, with a zone whose offset moves, is written with DTSTART;TZID=... / DTEND;TZID=... and a VTIMEZONE, as an RRULE series already was
- A DATE RECURRENCE-ID is written with VALUE=DATE (RECURRENCE-ID;VALUE=DATE:20261120)
- A REPLY whose components carry verbatim alarms is written without them instead of with them; a typed alarm on a REPLY throws
- A kept RECURRENCE-ID, STATUS, RRULE or URL in UnknownProperties is dropped when the typed value differs from what the line reads as, or is null while the line reads as a value (see above), where 1.1.4 wrote both
Content lines fold by UTF-8 octets.
- Fixes ContentLine.AppendFolded folding every 73 UTF-16 characters: it now folds by UTF-8 octets (at most 75 per physical line, the continuation space included) between grapheme clusters, and never splits a character, so a long DESCRIPTION of emoji no longer reaches the wire as U+FFFD and non-ASCII text no longer overruns the 75-octet limit. Long ASCII lines now fold at 75 octets instead of 73
Dependency update.
- Updates dependencies: System.Security.Cryptography.Pkcs 10.0.13 (GHSA-846f-f764-76mx), pinned as a transitive package so a restore is free of NU1903
Control characters are refused in every content line.
- Fixes CRLF property injection through organizer and attendee addresses, attendee display names, PRODID, TZID and pass-through property lines; HTAB stays valid; complete recurrence overrides are unfolded and written one checked line at a time
Quoted parameter values are opaque.
- Fixes ContentLine.Parse splitting a line at a colon or semicolon inside a double-quoted parameter value (RFC 5545 §3.2 requires the quotes for exactly those characters), so a TZID such as "(UTC+01:00) Amsterdam, Berlin, ..." no longer loses the whole DTSTART; such a TZID still reads as UTC because it names no zone the host knows
A recurring component repeats at a wall-clock time, and the wire says so.
- Adds IcalComponent.TimeZone: the TZID a DTSTART carried on the way in, or the zone a caller wants a series written in
- Adds TZID-aware parsing: a TZID-qualified DTSTART, DTEND or DUE is read in its zone per RFC 5545 §3.3.5 (a time that occurs twice is the first occurrence; a time that does not occur takes the offset before the gap); vendor-prefixed ids (/mozilla.org/.../Europe/Berlin) resolve; an unresolvable TZID is read as UTC rather than dropped
- Adds TZID output: a recurring component whose zone has a moving offset is written as DTSTART;TZID=... / DTEND;TZID=... with a VTIMEZONE derived from the host's TimeZoneInfo (IcalTimeZoneComponent: sampled transitions, collapsed to an RRULE when the pattern is yearly); a wall-clock RECURRENCE-ID is qualified with the zone. Single occurrences, all-day components, and series in UTC or in a zone whose clocks read UTC from the series' start (Atlantic/Reykjavik) keep the Z form, so their output is byte-identical
- Adds IcalTimeZones: Resolve, ResolveId, ToUtc, ToLocal, ParseInstant (Z, wall-clock or DATE values as found on EXDATE and RECURRENCE-ID) and IsFixedUtc, for callers that expand a series themselves
First release.
- Adds IcalComponent and IcalDocument: an immutable VEVENT / VTODO / VJOURNAL model, plus UnknownProperties and OverrideComponents so a round trip keeps VALARM, EXDATE, X- extensions and modified occurrences verbatim
- Adds IcalCodec: Serialize (VERSION, PRODID, CALSCALE, optional METHOD), SerializeComponent, Parse and ReadMethod; 75-octet folding, TEXT escaping, UTC and DATE values
- Adds ItipMethod and ItipMethods: the eight RFC 5546 methods and their tokens
- Adds ImipEnvelope and ImipCalendarPart: the text/calendar; charset=utf-8; method= content type and inbound classification (method= parameter, then METHOD, then PUBLISH)
- Adds ImipMessageComposer: a multipart/alternative with a text/plain summary and an inline text/calendar part carrying the method, Content-Class: urn:content-classes:calendarmessage, and a refusal when the payload's METHOD does not match the declared method (RFC 6047 §2.4); ComposeToStream pins CRLF regardless of host OS
- Adds ContentLine: the RFC 5545 / RFC 6350 content-line primitives (escape, fold, unfold, parse), public so a vCard writer can share them
- UID and SEQUENCE are caller-supplied and written verbatim; nothing here invents an identifier or bumps a sequence