Calendar Class
Represents a calendar
- Inheritance:
- System.ObjectCalendar
Constructors
Calendar()
Initializes a new instance of the Calendar class.
Properties
Events
List of all events
Property Value
- System.Collections.Generic.IList<Event>
Method
Gets or sets the calendar method.
Property Value
Method which specifies what is the calendar used for.
Tasks
List of all Tasks
Property Value
- System.Collections.Generic.IList<Task>
Methods
Load(Stream, CalendarFormat)
Loads the calendar from the specified stream.
public static Calendar Load(Stream stream, CalendarFormat format)
Public Shared Function Load(stream As Stream, format As CalendarFormat) As Calendar
Parameters
stream
- System.IO.Stream
The stream from which the calendar will be loaded.
format
- CalendarFormat
The calendar format.
Returns
Exceptions
- System.ArgumentNullException
Stream is null.
- System.ArgumentException
Unknown calendar format.
Load(String)
Loads the calendar from the specified file.
public static Calendar Load(string filePath)
Public Shared Function Load(filePath As String) As Calendar
Parameters
filePath
- System.String
A relative or absolute path to the file.
Returns
Exceptions
- System.ArgumentException
File path is null or empty.
Load(String, CalendarFormat)
Loads the message from the specified file.
public static Calendar Load(string filePath, CalendarFormat format)
Public Shared Function Load(filePath As String, format As CalendarFormat) As Calendar
Parameters
filePath
- System.String
A relative or absolute path to the file.
format
- CalendarFormat
The calendar format.
Returns
Exceptions
- System.ArgumentException
File path is null or empty.
Save(Stream, CalendarFormat)
Saves the calendar to a stream.
public void Save(Stream stream, CalendarFormat format)
Public Sub Save(stream As Stream, format As CalendarFormat)
Parameters
stream
- System.IO.Stream
The stream to save the calendar to.
format
- CalendarFormat
The message format.
Exceptions
- System.ArgumentNullException
Stream is null.
- System.ArgumentException
Unknown calendar format.
Save(String)
Saves the calendar to a file.
Parameters
filePath
- System.String
A relative or absolute path for the file where calendar will be saved.
Exceptions
- System.ArgumentException
File path is null or empty.
Save(String, CalendarFormat)
Saves the calendar to a file.
public void Save(string filePath, CalendarFormat format)
Public Sub Save(filePath As String, format As CalendarFormat)
Parameters
filePath
- System.String
A relative or absolute path for the file where calendar will be saved.
format
- CalendarFormat
The calendar format.
Exceptions
- System.ArgumentException
File path is null or empty.