New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

A collection of appointments.

Definition

Constructors

Creates an empty AppointmentCollection.

C#
public AppointmentCollection()

Creates an AppointmentCollection and populates it with Appointment objects.

C#
public AppointmentCollection(IEnumerable<Appointment> appointments)
Parameters:appointmentsIEnumerable<Appointment>

The Appointment objects to add to the collection.

Properties

Gets or sets the Appointment at the specified index.

C#
public Appointment this[int index] { get; set; }
Parameters:indexint

The zero-based index of the Appointment to get or set.

Property Value:

The appointment at the specified index.

Methods

Determines whether an element is in the AppointmentCollection.

C#
public bool Contains(Appointment appointment)
Parameters:appointmentAppointment

The Appointment to locate in the AppointmentCollection.

Returns:

bool

true if item is found in the AppointmentCollection; otherwise, false.

This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.

Copies the entire AppointmentCollection to a compatible one-dimensional Array, starting at the specified index of the target array.

C#
public void CopyTo(Appointment[] array, int index)
Parameters:arrayAppointment[]

The one-dimensional Array that is the destination of the Appointments copied from AppointmentCollection. The Array must have zero-based indexing.

indexint

The zero-based index in array at which copying begins.

C#
protected override object CreateKnownType(int index)
Parameters:indexintReturns:

object

Overrides: StateManagedCollection.CreateKnownType(int)

Searches for an Appointment with the specified ID and returns a reference to it.

C#
public Appointment FindByID(object id)
Parameters:idobject

The Appointment ID to search for.

Returns:

Appointment

The Appointment with the specified ID, if found; otherwise, null.

This method determines equality by calling Equals(object).

Searches for all Appointment with the specified RecurrenceParentID and RecurrenceState.

C#
public IList<Appointment> FindByRecurrenceParentID(object parentId, RecurrenceState state)
Parameters:parentIdobject

The RecurrenceParentID to search for.

stateRecurrenceState

The RecurrenceState to search for.

Returns:

IList<Appointment>

A generic IList containing the Appointment with the specified RecurrenceParentID and RecurrenceState, if found.

This method determines equality by calling Equals(object).

Searches for all Appointment with the specified RecurrenceParentID and returns a generic IList containing them.

C#
public IList<Appointment> FindByRecurrenceParentID(object parentId)
Parameters:parentIdobject

The RecurrenceParentID to search for.

Returns:

IList<Appointment>

A generic IList containing the Appointment with the specified RecurrenceParentID, if found.

This method determines equality by calling Equals(object).

Appointments with recurrence state Exception are linked to their parents using the RecurrenceParentID property.

Searches for all Appointment that are fully contained within the specified time range.

C#
public IList<Appointment> GetAppointmentsEnclosingRange(DateTime rangeStart, DateTime rangeEnd)
Parameters:rangeStartDateTime

The start of the time range.

rangeEndDateTime

The end of the time range.

Returns:

IList<Appointment>

A generic IList containing the Appointment that are fully contained within the specified time range.

Searches for all Appointment that overlap with the specified time range and returns a generic IList containing them.

C#
public IList<Appointment> GetAppointmentsInRange(DateTime rangeStart, DateTime rangeEnd)
Parameters:rangeStartDateTime

The start of the time range.

rangeEndDateTime

The end of the time range.

Returns:

IList<Appointment>

A generic IList containing the Appointment that overlap with the specified time range.

Searches for all Appointment that start in the specified time range and returns a generic IList containing them.

C#
public IList<Appointment> GetAppointmentsStartingInRange(DateTime rangeStart, DateTime rangeEnd)
Parameters:rangeStartDateTime

The start of the time range.

rangeEndDateTime

The end of the time range.

Returns:

IList<Appointment>

A generic IList containing the Appointment that start in the specified time range.

Returns an enumerator for the entire AppointmentCollection.

C#
public IEnumerator<Appointment> GetEnumerator()
Returns:

IEnumerator<Appointment>

An IEnumerator for the entire AppointmentCollection.

Implements: IEnumerable<Appointment>.GetEnumerator()

C#
protected override Type[] GetKnownTypes()
Returns:

Type[]

Overrides: StateManagedCollection.GetKnownTypes()

Searches for the specified Appointment and returns the zero-based index of the first occurrence within the entire AppointmentCollection.

C#
public int IndexOf(Appointment appointment)
Parameters:appointmentAppointment

The Appointment to locate in the AppointmentCollection.

Returns:

int

The zero-based index of the first occurrence of value within the entire AppointmentCollection, if found; otherwise, -1.

C#
protected override void SetDirtyObject(object o)
Parameters:oobject

Overrides: StateManagedCollection.SetDirtyObject(object)

Copies the elements of the AppointmentCollection to a new Appointment array.

C#
public Appointment[] ToArray()
Returns:

Appointment[]

An Appointment array containing copies of the elements of the AppointmentCollection.