New to Telerik UI for WinForms? Start a free 30-day trial

ICalendar Property object.

Definition

Namespace:Telerik.WinControls.UI.Scheduler.ICalendar

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class CalProperty : IEquatable<CalProperty>

Inheritance: objectCalProperty

Implements: IEquatable<CalProperty>

Constructors

Initializes a new instance of the CalProperty class.

C#
public CalProperty(string name, string value)
Parameters:namestring

The name.

valuestring

The value.

Properties

Gets or sets the property name.

C#
public string Name { get; }
Property Value:

The name.

Gets or sets the parameters.

C#
public Dictionary<string, string> Parameters { get; }
Property Value:

The parameters.

Gets the string with the specified key.

C#
public string this[string key] { get; }
Parameters:keystringProperty Value:

The parameter value, or null when the key is not present.

Gets or sets the value.

C#
public string Value { get; }
Property Value:

The value.

Methods

Indicates whether the current object is equal to another object of the same type.

C#
public bool Equals(CalProperty other)
Parameters:otherCalProperty

An object to compare with this object.

Returns:

bool

True if the current object is equal to the other parameter; otherwise, false.

Implements: IEquatable<CalProperty>.Equals(CalProperty)

Determines whether the property's VALUE parameter specifies the date value type. The comparison ignores surrounding whitespace and letter casing.

C#
public bool IsParameterValueDate()
Returns:

bool

true when the parameter value is DATE; otherwise, false.

Parses the property value as a date or date-time without supplying a time zone for a TZID parameter.

C#
public DateTime ToDateTime()
Returns:

DateTime

The parsed date or date-time.

Exceptions: CalendarParseException

The value cannot be parsed or requires a matching time zone.

Parses the property value as a date or date-time, checking any TZID parameter against the supplied time zone.

C#
public DateTime ToDateTime(TimeZoneInfo timeZone)
Parameters:timeZoneTimeZoneInfo

The time zone that must match the property's TZID parameter, when present.

Returns:

DateTime

The parsed date or date-time.

Exceptions: CalendarParseException

The value cannot be parsed or its TZID does not match timeZone.

Parses the property value as an iCalendar duration.

C#
public TimeSpan ToDuration()
Returns:

TimeSpan

The duration represented by the property.

Exceptions: CalendarParseException

The property value is not a valid duration.

Parses the comma-separated date values in the property as recurrence exception dates.

C#
public IList<DateTime> ToExceptionDates()
Returns:

IList<DateTime>

The parsed exception dates.

Exceptions: CalendarParseException

One or more date values cannot be parsed.

Parses the property value as a recurrence rule.

C#
public RecurrenceRule ToRecurrenceRule()
Returns:

RecurrenceRule

The parsed recurrence rule.

Exceptions: CalendarParseException

The property value is not a valid recurrence rule.

Returns a string that represents the current object.

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: object.ToString()

Decodes the escaped text value of an iCalendar property.

C#
public static string ToText(CalProperty property)
Parameters:propertyCalProperty

The property whose value will be decoded.

Returns:

string

The decoded text, or null when property is null.

Parses the signed hour, minute, and optional second value stored in the property.

C#
public TimeSpan ToTimeSpan()
Returns:

TimeSpan

The parsed time span.

Exceptions: CalendarParseException

The property value is not in the expected time-span format.