HtmlForgeX

API Reference

Class

EmailIcsCalendar

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers sealed

Dependency-free iCalendar (.ics) generator for email attachments. Output uses CRLF line endings and folds long lines (UTF-8, 75-octet limit).

Inheritance

  • Object
  • EmailIcsCalendar

Constructors

public EmailIcsCalendar() #

Methods

AddEvent 2 overloads
public EmailIcsCalendar AddEvent(EmailIcsEvent ev) #
Returns: EmailIcsCalendar

Adds an event configured via callback.

Parameters

configure System.Action{HtmlForgeX.Email.EmailIcsEvent} requiredposition: 0
AddEvent(HtmlForgeX.Email.EmailIcsEvent ev) #

Adds an event instance.

Parameters

ev HtmlForgeX.Email.EmailIcsEvent required
public Byte[] ToBytes() #
Returns: Byte[]

Returns the calendar as UTF-8 bytes.

public override String ToString() #
Returns: String
public EmailIcsCalendar WithDescription(String description) #
Returns: EmailIcsCalendar

Sets the calendar description (X-WR-CALDESC).

Parameters

description System.String requiredposition: 0
public EmailIcsCalendar WithFileName(String fileName) #
Returns: EmailIcsCalendar

Sets the suggested file name for the payload.

Parameters

fileName System.String requiredposition: 0
public EmailIcsCalendar WithGeneratedAt(DateTimeOffset utcTimestamp) #
Returns: EmailIcsCalendar

Sets the default UTC timestamp used for DTSTAMP.

Parameters

utcTimestamp System.DateTimeOffset requiredposition: 0
public EmailIcsCalendar WithMethod(EmailIcsMethod method) #
Returns: EmailIcsCalendar

Sets the calendar method.

Parameters

method HtmlForgeX.Email.EmailIcsMethod requiredposition: 0
public EmailIcsCalendar WithName(String name) #
Returns: EmailIcsCalendar

Sets the calendar name (X-WR-CALNAME).

Parameters

name System.String requiredposition: 0
public EmailIcsCalendar WithProductId(String productId) #
Returns: EmailIcsCalendar

Sets the PRODID value.

Parameters

productId System.String requiredposition: 0

Properties

public String FileName { get; set; } #

Recommended file name for the calendar payload.

public String ContentType { get; } #

Recommended content type for the payload.

public String ProductId { get; set; } #

PRODID value.

public EmailIcsMethod Method { get; set; } #

Calendar method.

public String CalendarName { get; set; } #

Optional calendar name (X-WR-CALNAME).

public String CalendarDescription { get; set; } #

Optional calendar description (X-WR-CALDESC).

public DateTimeOffset GeneratedAtUtc { get; set; } #

Timestamp used for DTSTAMP when events do not specify one.

public List<EmailIcsEvent> Events { get; } #

Calendar events.