IList

Mobilize.QualityMate.ControlInterfaces

IList Interface

Defines the basic interactions for controls that implement the IList interface.

public interface IList<out T>
    where T : Mobilize.QualityMate.ControlInterfaces.IControl

Type parameters

T

The type of the elements of source.

Derived ↳ IComboBoxIListBoxIMenuIRadioButtonGroupISplitButtonIStatusStripITabIToolBarITreeView

Properties

IList.Items Property

Gets all the items of this element.

System.Collections.Generic.IEnumerable<T> Items { get; }

Property Value

System.Collections.Generic.IEnumerable<T>

IList.this[int] Property

Gets the control on the specified index.

T this[int index] { get; }

Parameters

index System.Int32

The selected index.

Property Value

T

IList.this[string] Property

Gets the first control in the list with the specified text.

T this[string text] { get; }

Parameters

text System.String

The control's text to query.

Property Value

T

Methods

IList.ElementAt(int) Method

Returns the element at a specified index in a sequence.

T ElementAt(int index);

Parameters

index System.Int32

The zero-based index of the element to retrieve.

Returns

T The element at the specified position in the source sequence.

Exceptions

System.ArgumentNullException Source or predicate is null.

Mobilize.QualityMate.Common.Exceptions.QualityMateException No item is found on the index.

IList.First() Method

Returns the first element in a sequence that satisfies a specified condition.

T First();

Returns

T The first element in the sequence that passes the test in the specified predicate function.

Exceptions

System.ArgumentNullException Source or predicate is null.

Mobilize.QualityMate.Common.Exceptions.QualityMateException No element satisfies the condition in predicate. -or- The source sequence is empty.

IList.First(Func<T,bool>) Method

Returns the first element in a sequence that satisfies a specified condition.

T First(System.Func<T,bool> predicate);

Parameters

predicate System.Func<T,System.Boolean>

A function to test each element for a condition.

Returns

T The first element in the sequence that passes the test in the specified predicate function.

Exceptions

System.ArgumentNullException Source or predicate is null.

Mobilize.QualityMate.Common.Exceptions.QualityMateException No element satisfies the condition in predicate. -or- The source sequence is empty.

IList.IndexOf(TElement) Method

Returns the index of the first occurrence of a given value in a range of this list.

int IndexOf<TElement>(TElement element)
    where TElement : Mobilize.QualityMate.ControlInterfaces.IControl;

Type parameters

TElement

The type of the elements of source.

Parameters

element TElement

The zero-based index of the element to retrieve.

Returns

System.Int32 Returns the index of the item, otherwise, -1 if the item isn't in the list.

Exceptions

System.ArgumentNullException Source or predicate is null.

Mobilize.QualityMate.Common.Exceptions.QualityMateException item index is not found on the collection.

Remarks

The list is searched forwards from beginning to end. The elements of the list are compared to the given value using the Object.Equals method.

Last updated