207 lines
8.3 KiB
C#
207 lines
8.3 KiB
C#
using System;
|
|
using System.Collections;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Represents a collection of <see cref="T:System.ComponentModel.ListSortDescription" /> objects.</summary>
|
|
// Token: 0x020000A8 RID: 168
|
|
public class ListSortDescriptionCollection : ICollection, IEnumerable, IList
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> class. </summary>
|
|
// Token: 0x06000565 RID: 1381 RVA: 0x0000E368 File Offset: 0x0000C568
|
|
public ListSortDescriptionCollection()
|
|
{
|
|
this.list = new ArrayList();
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> class with the specified array of <see cref="T:System.ComponentModel.ListSortDescription" /> objects.</summary>
|
|
/// <param name="sorts">The array of <see cref="T:System.ComponentModel.ListSortDescription" /> objects to be contained in the collection.</param>
|
|
// Token: 0x06000566 RID: 1382 RVA: 0x0000E37C File Offset: 0x0000C57C
|
|
public ListSortDescriptionCollection(ListSortDescription[] sorts)
|
|
{
|
|
this.list = new ArrayList();
|
|
foreach (ListSortDescription listSortDescription in sorts)
|
|
{
|
|
this.list.Add(listSortDescription);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the specified <see cref="T:System.ComponentModel.ListSortDescription" />.</summary>
|
|
/// <returns>The <see cref="T:System.ComponentModel.ListSortDescription" /> with the specified index.</returns>
|
|
/// <param name="index">The zero-based index of the <see cref="T:System.ComponentModel.ListSortDescription" /> to get in the collection </param>
|
|
// Token: 0x17000167 RID: 359
|
|
object IList.this[int index]
|
|
{
|
|
get
|
|
{
|
|
return this[index];
|
|
}
|
|
set
|
|
{
|
|
throw new InvalidOperationException("ListSortDescriptorCollection is read only.");
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether the collection has a fixed size.</summary>
|
|
/// <returns>true in all cases.</returns>
|
|
// Token: 0x17000168 RID: 360
|
|
// (get) Token: 0x06000569 RID: 1385 RVA: 0x0000E3DC File Offset: 0x0000C5DC
|
|
bool IList.IsFixedSize
|
|
{
|
|
get
|
|
{
|
|
return this.list.IsFixedSize;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether access to the collection is thread safe.</summary>
|
|
/// <returns>true in all cases.</returns>
|
|
// Token: 0x17000169 RID: 361
|
|
// (get) Token: 0x0600056A RID: 1386 RVA: 0x0000E3EC File Offset: 0x0000C5EC
|
|
bool ICollection.IsSynchronized
|
|
{
|
|
get
|
|
{
|
|
return this.list.IsSynchronized;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the current instance that can be used to synchronize access to the collection.</summary>
|
|
/// <returns>The current instance of the <see cref="T:System.ComponentModel.ListSortDescriptionCollection" />.</returns>
|
|
// Token: 0x1700016A RID: 362
|
|
// (get) Token: 0x0600056B RID: 1387 RVA: 0x0000E3FC File Offset: 0x0000C5FC
|
|
object ICollection.SyncRoot
|
|
{
|
|
get
|
|
{
|
|
return this.list.SyncRoot;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether the collection is read-only.</summary>
|
|
/// <returns>true in all cases.</returns>
|
|
// Token: 0x1700016B RID: 363
|
|
// (get) Token: 0x0600056C RID: 1388 RVA: 0x0000E40C File Offset: 0x0000C60C
|
|
bool IList.IsReadOnly
|
|
{
|
|
get
|
|
{
|
|
return this.list.IsReadOnly;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</summary>
|
|
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
|
// Token: 0x0600056D RID: 1389 RVA: 0x0000E41C File Offset: 0x0000C61C
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return this.list.GetEnumerator();
|
|
}
|
|
|
|
/// <summary>Adds an item to the collection.</summary>
|
|
/// <returns>The position into which the new element was inserted.</returns>
|
|
/// <param name="value">The item to add to the collection.</param>
|
|
/// <exception cref="T:System.InvalidOperationException">In all cases.</exception>
|
|
// Token: 0x0600056E RID: 1390 RVA: 0x0000E42C File Offset: 0x0000C62C
|
|
int IList.Add(object value)
|
|
{
|
|
return this.list.Add(value);
|
|
}
|
|
|
|
/// <summary>Removes all items from the collection.</summary>
|
|
/// <exception cref="T:System.InvalidOperationException">In all cases.</exception>
|
|
// Token: 0x0600056F RID: 1391 RVA: 0x0000E43C File Offset: 0x0000C63C
|
|
void IList.Clear()
|
|
{
|
|
this.list.Clear();
|
|
}
|
|
|
|
/// <summary>Inserts an item into the collection at a specified index.</summary>
|
|
/// <param name="index">The zero-based index of the <see cref="T:System.ComponentModel.ListSortDescription" /> to get or set in the collection</param>
|
|
/// <param name="value">The item to insert into the collection.</param>
|
|
/// <exception cref="T:System.InvalidOperationException">In all cases.</exception>
|
|
// Token: 0x06000570 RID: 1392 RVA: 0x0000E44C File Offset: 0x0000C64C
|
|
void IList.Insert(int index, object value)
|
|
{
|
|
this.list.Insert(index, value);
|
|
}
|
|
|
|
/// <summary>Removes the first occurrence of an item from the collection.</summary>
|
|
/// <param name="value">The item to remove from the collection.</param>
|
|
/// <exception cref="T:System.InvalidOperationException">In all cases.</exception>
|
|
// Token: 0x06000571 RID: 1393 RVA: 0x0000E45C File Offset: 0x0000C65C
|
|
void IList.Remove(object value)
|
|
{
|
|
this.list.Remove(value);
|
|
}
|
|
|
|
/// <summary>Removes an item from the collection at a specified index.</summary>
|
|
/// <param name="index">The zero-based index of the <see cref="T:System.ComponentModel.ListSortDescription" /> to remove from the collection</param>
|
|
/// <exception cref="T:System.InvalidOperationException">In all cases.</exception>
|
|
// Token: 0x06000572 RID: 1394 RVA: 0x0000E46C File Offset: 0x0000C66C
|
|
void IList.RemoveAt(int index)
|
|
{
|
|
this.list.RemoveAt(index);
|
|
}
|
|
|
|
/// <summary>Gets the number of items in the collection.</summary>
|
|
/// <returns>The number of items in the collection.</returns>
|
|
// Token: 0x1700016C RID: 364
|
|
// (get) Token: 0x06000573 RID: 1395 RVA: 0x0000E47C File Offset: 0x0000C67C
|
|
public int Count
|
|
{
|
|
get
|
|
{
|
|
return this.list.Count;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the specified <see cref="T:System.ComponentModel.ListSortDescription" />.</summary>
|
|
/// <returns>The <see cref="T:System.ComponentModel.ListSortDescription" /> with the specified index.</returns>
|
|
/// <param name="index">The zero-based index of the <see cref="T:System.ComponentModel.ListSortDescription" /> to get or set in the collection. </param>
|
|
/// <exception cref="T:System.InvalidOperationException">An item is set in the <see cref="T:System.ComponentModel.ListSortDescriptionCollection" />, which is read-only.</exception>
|
|
// Token: 0x1700016D RID: 365
|
|
public ListSortDescription this[int index]
|
|
{
|
|
get
|
|
{
|
|
return this.list[index] as ListSortDescription;
|
|
}
|
|
set
|
|
{
|
|
throw new InvalidOperationException("ListSortDescriptorCollection is read only.");
|
|
}
|
|
}
|
|
|
|
/// <summary>Determines if the <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> contains a specific value.</summary>
|
|
/// <returns>true if the <see cref="T:System.Object" /> is found in the collection; otherwise, false. </returns>
|
|
/// <param name="value">The <see cref="T:System.Object" /> to locate in the collection.</param>
|
|
// Token: 0x06000576 RID: 1398 RVA: 0x0000E4AC File Offset: 0x0000C6AC
|
|
public bool Contains(object value)
|
|
{
|
|
return this.list.Contains(value);
|
|
}
|
|
|
|
/// <summary>Copies the contents of the collection to the specified array, starting at the specified destination array index.</summary>
|
|
/// <param name="array">The destination array for the items copied from the collection.</param>
|
|
/// <param name="index">The index of the destination array at which copying begins.</param>
|
|
// Token: 0x06000577 RID: 1399 RVA: 0x0000E4BC File Offset: 0x0000C6BC
|
|
public void CopyTo(Array array, int index)
|
|
{
|
|
this.list.CopyTo(array, index);
|
|
}
|
|
|
|
/// <summary>Returns the index of the specified item in the collection.</summary>
|
|
/// <returns>The index of <paramref name="value" /> if found in the list; otherwise, -1.</returns>
|
|
/// <param name="value">The <see cref="T:System.Object" /> to locate in the collection.</param>
|
|
// Token: 0x06000578 RID: 1400 RVA: 0x0000E4CC File Offset: 0x0000C6CC
|
|
public int IndexOf(object value)
|
|
{
|
|
return this.list.IndexOf(value);
|
|
}
|
|
|
|
// Token: 0x0400019D RID: 413
|
|
private ArrayList list;
|
|
}
|
|
}
|