Table of Contents

Class OrderByCollection

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents an ordered collection of property definitions qualified with a sort direction.

public sealed class OrderByCollection : IEnumerable<KeyValuePair<PropertyDefinitionBase, SortDirection>>, IEnumerable
Inheritance
OrderByCollection
Implements
Inherited Members

Properties

Count

Gets the number of elements contained in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets the element at the specified index from the collection.

public KeyValuePair<PropertyDefinitionBase, SortDirection> this[int index] { get; }

Parameters

index int

Index.

Property Value

KeyValuePair<PropertyDefinitionBase, SortDirection>

Methods

Add(PropertyDefinitionBase, SortDirection)

Adds the specified property definition / sort direction pair to the collection.

public void Add(PropertyDefinitionBase propertyDefinition, SortDirection sortDirection)

Parameters

propertyDefinition PropertyDefinitionBase

The property definition.

sortDirection SortDirection

The sort direction.

Clear()

Removes all elements from the collection.

public void Clear()

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<KeyValuePair<PropertyDefinitionBase, SortDirection>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<PropertyDefinitionBase, SortDirection>>

A IEnumerator<T> that can be used to iterate through the collection.

Remove(PropertyDefinitionBase)

Removes the specified property definition from the collection.

public bool Remove(PropertyDefinitionBase propertyDefinition)

Parameters

propertyDefinition PropertyDefinitionBase

The property definition.

Returns

bool

True if the property definition is successfully removed; otherwise, false

RemoveAt(int)

Removes the element at the specified index from the collection.

public void RemoveAt(int index)

Parameters

index int

The index.

Exceptions

ArgumentOutOfRangeException

Index is less than 0 or index is equal to or greater than Count.

TryGetValue(PropertyDefinitionBase, out SortDirection)

Tries to get the value for a property definition in the collection.

public bool TryGetValue(PropertyDefinitionBase propertyDefinition, out SortDirection sortDirection)

Parameters

propertyDefinition PropertyDefinitionBase

The property definition.

sortDirection SortDirection

The sort direction.

Returns

bool

True if collection contains property definition, otherwise false.