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

Class CalendarEvent

A calendar event (RFC 5545 §3.6.1), the value of a VEVENT component.

Inheritance
object
CalendarEvent
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 CalendarEvent

Constructors

View Source

CalendarEvent(string?, ICalDateTime?, ICalDateTime?, ICalDuration?, bool, string?, string?, string?, string?, ICalDateTime?, ICalDateTime?, ICalDateTime?, int?, EventStatus?, Transparency?, int?, Classification?, IReadOnlyList<string>, string?, string?, IReadOnlyList<string>, ICalGeo?, Organizer?, IReadOnlyList<Attendee>, RecurrenceRule?, IReadOnlyList<ICalDateTime>, IReadOnlyList<ICalDateTime>, ICalDateTime?, IReadOnlyList<Alarm>, IReadOnlyList<ICalProperty>)

Initializes a new instance of the CalendarEvent class.

Declaration
public CalendarEvent(string? uid, ICalDateTime? start, ICalDateTime? end, ICalDuration? duration, bool allDay, string? summary, string? description, string? location, string? url, ICalDateTime? dateTimeStamp, ICalDateTime? created, ICalDateTime? lastModified, int? sequence, EventStatus? status, Transparency? transparency, int? priority, Classification? classification, IReadOnlyList<string> categories, string? comment, string? contact, IReadOnlyList<string> resources, ICalGeo? geo, Organizer? organizer, IReadOnlyList<Attendee> attendees, RecurrenceRule? recurrenceRule, IReadOnlyList<ICalDateTime> recurrenceDates, IReadOnlyList<ICalDateTime> exceptionDates, ICalDateTime? recurrenceId, IReadOnlyList<Alarm> alarms, IReadOnlyList<ICalProperty> extendedProperties)
Parameters
Type Name Description
string uid
ICalDateTime start
ICalDateTime end
ICalDuration duration
bool allDay
string summary
string description
string location
string url
ICalDateTime dateTimeStamp
ICalDateTime created
ICalDateTime lastModified
int? sequence
EventStatus? status
Transparency? transparency
int? priority
Classification? classification
IReadOnlyList<string> categories
string comment
string contact
IReadOnlyList<string> resources
ICalGeo geo
Organizer organizer
IReadOnlyList<Attendee> attendees
RecurrenceRule recurrenceRule
IReadOnlyList<ICalDateTime> recurrenceDates
IReadOnlyList<ICalDateTime> exceptionDates
ICalDateTime recurrenceId
IReadOnlyList<Alarm> alarms
IReadOnlyList<ICalProperty> extendedProperties

Properties

View Source

Alarms

Gets the alarms (VALARM). May be empty.

Declaration
public IReadOnlyList<Alarm> Alarms { get; }
Property Value
Type Description
IReadOnlyList<Alarm>
View Source

AllDay

Gets a value indicating whether this is an all-day event (DTSTART has VALUE=DATE).

Declaration
public bool AllDay { get; }
Property Value
Type Description
bool
View Source

Attendees

Gets the attendees (ATTENDEE). May be empty.

Declaration
public IReadOnlyList<Attendee> Attendees { get; }
Property Value
Type Description
IReadOnlyList<Attendee>
View Source

Categories

Gets the categories (CATEGORIES). May be empty.

Declaration
public IReadOnlyList<string> Categories { get; }
Property Value
Type Description
IReadOnlyList<string>
View Source

Classification

Gets the classification (CLASS), or null.

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

Comment

Gets the comment (COMMENT), or null.

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

Contact

Gets the contact (CONTACT), or null.

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

Created

Gets the creation timestamp (CREATED), or null.

Declaration
public ICalDateTime? Created { get; }
Property Value
Type Description
ICalDateTime
View Source

DateTimeStamp

Gets the last modification timestamp (DTSTAMP), or null.

Declaration
public ICalDateTime? DateTimeStamp { get; }
Property Value
Type Description
ICalDateTime
View Source

Description

Gets the description (DESCRIPTION), or null.

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

Duration

Gets the duration (DURATION), or null.

Declaration
public ICalDuration? Duration { get; }
Property Value
Type Description
ICalDuration
View Source

End

Gets the end date-time (DTEND), or null.

Declaration
public ICalDateTime? End { get; }
Property Value
Type Description
ICalDateTime
View Source

ExceptionDates

Gets the exception dates (EXDATE). May be empty.

Declaration
public IReadOnlyList<ICalDateTime> ExceptionDates { get; }
Property Value
Type Description
IReadOnlyList<ICalDateTime>
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

Geo

Gets the geographic position (GEO), or null.

Declaration
public ICalGeo? Geo { get; }
Property Value
Type Description
ICalGeo
View Source

LastModified

Gets the last modification timestamp (LAST-MODIFIED), or null.

Declaration
public ICalDateTime? LastModified { get; }
Property Value
Type Description
ICalDateTime
View Source

Location

Gets the location (LOCATION), or null.

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

Organizer

Gets the organizer (ORGANIZER), or null.

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

Priority

Gets the priority (PRIORITY, 0-9), or null.

Declaration
public int? Priority { get; }
Property Value
Type Description
int?
View Source

RecurrenceDates

Gets the recurrence dates (RDATE). May be empty.

Declaration
public IReadOnlyList<ICalDateTime> RecurrenceDates { get; }
Property Value
Type Description
IReadOnlyList<ICalDateTime>
View Source

RecurrenceId

Gets the recurrence identifier (RECURRENCE-ID), or null.

Declaration
public ICalDateTime? RecurrenceId { get; }
Property Value
Type Description
ICalDateTime
View Source

RecurrenceRule

Gets the recurrence rule (RRULE), or null.

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

Resources

Gets the resources (RESOURCES). May be empty.

Declaration
public IReadOnlyList<string> Resources { get; }
Property Value
Type Description
IReadOnlyList<string>
View Source

Sequence

Gets the revision sequence number (SEQUENCE), or null.

Declaration
public int? Sequence { get; }
Property Value
Type Description
int?
View Source

Start

Gets the start date-time (DTSTART), or null.

Declaration
public ICalDateTime? Start { get; }
Property Value
Type Description
ICalDateTime
View Source

Status

Gets the status (STATUS), or null.

Declaration
public EventStatus? Status { get; }
Property Value
Type Description
EventStatus?
View Source

Summary

Gets the summary (SUMMARY), or null.

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

Transparency

Gets the time transparency (TRANSP), or null.

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

Uid

Gets the unique identifier (UID), or null.

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

Url

Gets the URL, or null.

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

Methods

View Source

GetOccurrences(ICalDateTime?, ICalDateTime?, int)

Gets all occurrence date-times of this event, evaluated from the RecurrenceRule, RecurrenceDates (RDATE), and ExceptionDates (EXDATE). The first occurrence is always Start. If this event has no recurrence rule and no recurrence dates, a single-element list containing Start is returned (or an empty list if Start is null).

Declaration
public IReadOnlyList<ICalDateTime> GetOccurrences(ICalDateTime? rangeStart = null, ICalDateTime? rangeEnd = null, int maxOccurrences = 1000)
Parameters
Type Name Description
ICalDateTime rangeStart

The inclusive lower bound of the range, or null for no lower bound. Occurrences before this bound are still counted toward COUNT but are not returned.

ICalDateTime rangeEnd

The inclusive upper bound of the range, or null for no upper bound.

int maxOccurrences

The maximum number of occurrences to generate. Defaults to DefaultMaxOccurrences.

Returns
Type Description
IReadOnlyList<ICalDateTime>

An ordered list of occurrence date-times within the specified range.

  • View Source
Back to top

DR-IT Software documentation

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

Generated by DocFX