Class
SelectedDatesCollection

Holds a colleciton of selected dates for a Silverlight Calendar control.

Definition

Namespace:ArtOfTest.WebAii.Silverlight

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
[DataContract]
public class SelectedDatesCollection : AutomationObject<SelectedDatesCollection>, IAutomationPeer, IPeerConverter, IList<DateTime>, ICollection<DateTime>, IEnumerable<DateTime>, IEnumerable

Inheritance: objectAutomationObject<SelectedDatesCollection>SelectedDatesCollection

Implements: IAutomationPeerICollection<DateTime>IEnumerableIEnumerable<DateTime>IList<DateTime>IPeerConverter

Inherited Members AutomationObject<SelectedDatesCollection>.GetProperty(AutomationProperty)AutomationObject<SelectedDatesCollection>.GetProperty(AutomationProperty, object)AutomationObject<SelectedDatesCollection>.SetProperty(AutomationProperty, object)AutomationObject<SelectedDatesCollection>.InvokeMethod(AutomationMethod, params object[])AutomationObject<SelectedDatesCollection>.InvokeMethod(string, params object[])AutomationObject<SelectedDatesCollection>.Serialize()AutomationObject<SelectedDatesCollection>.Deserialize(string)AutomationObject<SelectedDatesCollection>.AssignReference(AutomationReference)AutomationObject<SelectedDatesCollection>.ReferenceAutomationObject<SelectedDatesCollection>.PropertyBag

Constructors

SelectedDatesCollection()

Constructs a new SelectedDatesCollection object.

Declaration

cs-api-definition
public SelectedDatesCollection()

Properties

Collection

Gets / Sets the collection of DateTime objects this class contains.

Declaration

cs-api-definition
[DataMember]
public List<DateTime> Collection { get; set; }

Property Value

List<DateTime>

Count

Returns the number of items contained in this collection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

Implements ICollection<DateTime>.Count

IsReadOnly

Always returns True.

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Implements ICollection<DateTime>.IsReadOnly

this[int]

Gets / Sets the DateTime at the specified index.

Declaration

cs-api-definition
public DateTime this[int index] { get; set; }

Parameters

index

int

The index to get/set the DateTime at. The index is 0 based.

Property Value

DateTime

The DateTime object at the specified index.

Implements IList<DateTime>.this[int]

Methods

Add(DateTime)

Adds a DateTime to this collection.

Declaration

cs-api-definition
public void Add(DateTime item)

Parameters

item

DateTime

The DateTime to add.

Implements ICollection<DateTime>.Add(DateTime)

Clear()

Clears this collection.

Declaration

cs-api-definition
public void Clear()

Implements ICollection<DateTime>.Clear()

Contains(DateTime)

Returns true if this collection contains the specified DateTime.

Declaration

cs-api-definition
public bool Contains(DateTime item)

Parameters

item

DateTime

The DateTime to look for.

Returns

bool

true if the specified DateTime is found. Else returns false.

Implements ICollection<DateTime>.Contains(DateTime)

CopyTo(DateTime[], int)

Copies this collection to the specified array.

Declaration

cs-api-definition
public void CopyTo(DateTime[] array, int arrayIndex)

Parameters

array

DateTime[]

The DateTime array to copy this collection to.

arrayIndex

int

The starting index in the array to copy to. This index is 0 based.

Implements ICollection<DateTime>.CopyTo(DateTime[], int)

FromRealObject(object)

Converts a real Silverlight object into this wrapped object.

Declaration

cs-api-definition
public override void FromRealObject(object obj)

Parameters

obj

object

The real Silverlight object to convert.

Overrides AutomationObject<SelectedDatesCollection>.FromRealObject(object)

GetEnumerator()

Returns an IEnumerator<T> that supports a simple iteration over a collection of DateTime objects.

Declaration

cs-api-definition
public IEnumerator<DateTime> GetEnumerator()

Returns

IEnumerator<DateTime>

An IEnumerator<DateTime>

Implements IEnumerable<DateTime>.GetEnumerator()

GetRealType()

Gets a string representing the Silverlight type this class wraps.

Declaration

cs-api-definition
public override string GetRealType()

Returns

string

Overrides AutomationObject<SelectedDatesCollection>.GetRealType()

IndexOf(DateTime)

Gets the index of the specified DateTime.

Declaration

cs-api-definition
public int IndexOf(DateTime item)

Parameters

item

DateTime

The DateTime to get the index of.

Returns

int

The index of the DateTime if found in the collection. Returns -1 if not found. The index is 0 based.

Implements IList<DateTime>.IndexOf(DateTime)

Insert(int, DateTime)

Inserts the specified DateTime into the collection at the specified index. Existing DateTime values are moved down one index.

Declaration

cs-api-definition
public void Insert(int index, DateTime item)

Parameters

index

int

The index to insert into.

item

DateTime

The DateTime to insert.

Implements IList<DateTime>.Insert(int, DateTime)

Remove(DateTime)

Removes the specified DateTime from the collection.

Declaration

cs-api-definition
public bool Remove(DateTime item)

Parameters

item

DateTime

The DateTime to remove.

Returns

bool

Implements ICollection<DateTime>.Remove(DateTime)

RemoveAt(int)

Removes the DateTime at the specified index from this collection.

Declaration

cs-api-definition
public void RemoveAt(int index)

Parameters

index

int

The index of the DateTime to remove. The index is 0 based.

Implements IList<DateTime>.RemoveAt(int)

ToRealObject()

Throws the NotSupportedException because this object cannot be converted into a real Silverlight object.

Declaration

cs-api-definition
public override object ToRealObject()

Returns

object

Does not return.

Exceptions

NotSupportedException

Always thrown.

Overrides AutomationObject<SelectedDatesCollection>.ToRealObject()