Appointment

Appointment class

Represents a calendar to an e-mail.

public class Appointment

Constructors

Name Description
Appointment(string, DateTime, DateTime, MailAddress, MailAddressCollection) Initialize a new instance of the Appointment class.
Appointment(string, string, string, DateTime, DateTime, MailAddress, MailAddressCollection) Initialize a new instance of the Appointment class.
Appointment(string, string, string, DateTime, DateTime, MailAddress, MailAddressCollection, RecurrencePattern) Initialize a new instance of the Appointment class.
Appointment(string, string, string, DateTime, DateTime, MailAddress, MailAddressCollection, string) Initialize a new instance of the Appointment class.
Appointment(string, string, string, DateTime, DateTime, MailAddress, MailAddressCollection, string, RecurrencePattern) Initialize a new instance of the Appointment class.

Properties

Name Description
Attachments { get; } Gets the collection of attachments of appointment.
Attendees { get; set; } Gets or sets the attendees.
Class { get; set; } Specifies the access classification for the appointment.
CreatedDate { get; set; } Gets or sets the date and time that calendar information was created.
DateTimeStamp { get; set; } Gets or sets date/time that the instance of the iCalendar object was created..
Description { get; set; } Gets or sets the description.
EndDate { get; set; } Gets or sets the end date.
EndTimeZone { get; set; } End time zone
Flags { get; set; } Gets or sets appointment flags.
HtmlDescription { get; set; } Gets or sets html representation of description.
LastModifiedDate { get; set; } Gets or sets the date and time that calendar information was last revised.
Location { get; set; } Gets or sets the location.
MethodType { get; set; } Gets or sets the iCalendar object method type associated with the calendar object.
MicrosoftBusyStatus { get; set; } Specifies the BUSY status of an appointment.
MicrosoftImportance { get; set; } Specifies the importance of an appointment.
MicrosoftIntendedStatus { get; set; } Specifies the INTENDED status of an appointment.
OptionalAttendees { get; } Gets the optional attendees.
Organizer { get; set; } Gets or sets the organizer.
Recurrence { get; set; } Gets or sets the recurrence pattern.
Reminders { get; } Contains collection of AppointmentReminder AppointmentReminder objects.
SequenceId { get; } Gets the sequence id.
StartDate { get; set; } Gets or sets the start date.
StartTimeZone { get; set; } Start time zone
Status { get; set; } Gets or sets the overall status or confirmation for the object.
Summary { get; set; } Gets or sets the summary.
Transparency { get; set; } Specifies whether or not this appointment is intended to be visible in availability searches.
UniqueId { get; set; } Gets or sets a string value that contains the GUID for the calendar item. In MS Exchange this is PidLidGlobalObjectId mapi property.

Methods

Name Description
static Load(Stream) Loads Appointment from the stream
static Load(string) Loads Appointment from the file. Supported file formats: iCalendar
static Load(Stream, AppointmentLoadOptions) Loads Appointment from the stream
static Load(Stream, bool) Loads Appointment from the stream
static Load(string, AppointmentLoadOptions) Loads Appointment from the file. Supported file formats: iCalendar A file path.Represents appointment load optionsAppointmentLoadOptions.A read Appointment.
CancelAppointment() Cancels the appointment.
CancelAppointment(int) Cancels the appointment.
GetAppointmentHtml() Gets the calendar HTML.
GetAppointmentText() Gets the calendar text.
GetAppointmentText(AppointmentFormattingOptions) Gets the calendar text.
RequestApointment() Requests the apointment.
RequestApointment(int) Requests the apointment.
ResetTimeZone() Set local time zone
Save(Stream) Saves appointment to the file with iCalendar format using te default save options
Save(string) Saves appointment to the file with iCalendar format using te default save options
Save(Stream, AppointmentSaveFormat) Saves appointment to the stream with specified format using te default save options
Save(Stream, AppointmentSaveOptions) Saves appointment to the stream with specified save options
Save(string, AppointmentSaveFormat) Saves appointment to the file with specified format using te default save options
Save(string, AppointmentSaveOptions) Saves appointment to the file with specified save options
SetTimeZone(string) Set time zone
UpdateAppointment() Updates the appointment.
UpdateAppointment(int) Updates the appointment.

Examples

This example demonstrates how to add a calendar to an E-Mail message.

[C#]

MailMessage msg = new MailMessage();

//attendees for the event
MailAddressCollection attendees = new MailAddressCollection();
attendees.Add(new MailAddress("person1@domain.com"));
attendees.Add(new MailAddress("person2@domain.com"));
attendees.Add(new MailAddress("person3@domain.com"));

//create appointment
Appointment app = new Appointment("Room 112",new DateTime(2006,7,17,13,0,0),new DateTime(2006,7,17,14,0,0),new MailAddress("somebody@domain.com"), attendees );
cal.Summary = "Release Meetting";
cal.Description = "Discuss for the next release";

//add calendar to the message
msg.AddAlternateView(app.RequestApointment());

//send the email message
SmtpClient smtp= new SmtpClient("smtp.server.com", 25, "user", "password");
smtp.Send(msg);

[Visual Basic]

Dim msg As MailMessage =  New MailMessage() 

'attendees for the event
Dim attendees As MailAddressCollection =  New MailAddressCollection() 
attendees.Add(New MailAddress("person1@domain.com"))
attendees.Add(New MailAddress("person2@domain.com"))
attendees.Add(New MailAddress("person3@domain.com"))

'create calendar
Dim cal As Appointment =  New Appointment("Room 112",New DateTime(2006,7,17,13,0,0),New DateTime(2006,7,17,14,0,0),New MailAddress("somebody@domain.com"),attendees) 
cal.Summary = "Release Meetting"
cal.Description = "Discuss for the next release"

'add calendar to the message
msg.AddAlternateView(app.RequestApointment())

See Also