• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Calendar

An iCalendar (RFC 5545). Immutable after parsing. Construct via CalendarBuilder for writing.

Inheritance
object
Calendar
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.ICal
Assembly: DRIT.Mail.dll
Syntax
public sealed class Calendar

Constructors

View Source

Calendar(string?, string?, string?, CalendarMethod, IReadOnlyList<CalendarEvent>, IReadOnlyList<Todo>, IReadOnlyList<Journal>, IReadOnlyList<FreeBusy>, IReadOnlyList<VTimeZone>, IReadOnlyList<ICalProperty>)

Initializes a new instance of the Calendar class.

Declaration
public Calendar(string? productId, string? version, string? calendarScale, CalendarMethod method, IReadOnlyList<CalendarEvent> events, IReadOnlyList<Todo> todos, IReadOnlyList<Journal> journals, IReadOnlyList<FreeBusy> freeBusyEntries, IReadOnlyList<VTimeZone> timeZones, IReadOnlyList<ICalProperty> extendedProperties)
Parameters
Type Name Description
string productId
string version
string calendarScale
CalendarMethod method
IReadOnlyList<CalendarEvent> events
IReadOnlyList<Todo> todos
IReadOnlyList<Journal> journals
IReadOnlyList<FreeBusy> freeBusyEntries
IReadOnlyList<VTimeZone> timeZones
IReadOnlyList<ICalProperty> extendedProperties

Properties

View Source

CalendarScale

Gets the calendar scale (CALSCALE), or null. Default is GREGORIAN.

Declaration
public string? CalendarScale { get; }
Property Value
Type Description
string
View Source

Events

Gets the events (VEVENT). May be empty.

Declaration
public IReadOnlyList<CalendarEvent> Events { get; }
Property Value
Type Description
IReadOnlyList<CalendarEvent>
View Source

ExtendedProperties

Gets the X-* extension properties. May be empty.

Declaration
public IReadOnlyList<ICalProperty> ExtendedProperties { get; }
Property Value
Type Description
IReadOnlyList<ICalProperty>
View Source

FreeBusyEntries

Gets the free/busy entries (VFREEBUSY). May be empty.

Declaration
public IReadOnlyList<FreeBusy> FreeBusyEntries { get; }
Property Value
Type Description
IReadOnlyList<FreeBusy>
View Source

Journals

Gets the journal entries (VJOURNAL). May be empty.

Declaration
public IReadOnlyList<Journal> Journals { get; }
Property Value
Type Description
IReadOnlyList<Journal>
View Source

Method

Gets the calendar method (METHOD).

Declaration
public CalendarMethod Method { get; }
Property Value
Type Description
CalendarMethod
View Source

ProductId

Gets the product identifier (PRODID), or null.

Declaration
public string? ProductId { get; }
Property Value
Type Description
string
View Source

TimeZones

Gets the timezone definitions (VTIMEZONE). May be empty.

Declaration
public IReadOnlyList<VTimeZone> TimeZones { get; }
Property Value
Type Description
IReadOnlyList<VTimeZone>
View Source

Todos

Gets the to-do items (VTODO). May be empty.

Declaration
public IReadOnlyList<Todo> Todos { get; }
Property Value
Type Description
IReadOnlyList<Todo>
View Source

Version

Gets the iCalendar version (VERSION), or null.

Declaration
public string? Version { get; }
Property Value
Type Description
string

Methods

View Source

Load(Stream)

Loads a single Calendar from the specified stream. If the stream contains multiple calendars, the first is returned.

Declaration
public static Calendar Load(Stream stream)
Parameters
Type Name Description
Stream stream

The stream used to read or write the data.

Returns
Type Description
Calendar
View Source

Load(string)

Loads a single Calendar from the specified file. If the file contains multiple calendars, the first is returned.

Declaration
public static Calendar Load(string fileName)
Parameters
Type Name Description
string fileName

The file or path to process.

Returns
Type Description
Calendar
View Source

LoadAll(Stream)

Loads all calendars from the specified stream.

Declaration
public static IReadOnlyList<Calendar> LoadAll(Stream stream)
Parameters
Type Name Description
Stream stream

The stream used to read or write the data.

Returns
Type Description
IReadOnlyList<Calendar>
View Source

LoadAll(string)

Loads all calendars from the specified file.

Declaration
public static IReadOnlyList<Calendar> LoadAll(string fileName)
Parameters
Type Name Description
string fileName

The file or path to process.

Returns
Type Description
IReadOnlyList<Calendar>
View Source

Write(Stream)

Writes this calendar to the specified stream.

Declaration
public void Write(Stream stream)
Parameters
Type Name Description
Stream stream

The stream used to read or write the data.

View Source

Write(string)

Writes this calendar to the specified file.

Declaration
public void Write(string fileName)
Parameters
Type Name Description
string fileName

The file or path to process.

  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX