Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / ListSortDescriptionCollection.cs / 1 / ListSortDescriptionCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System.Collections;
using System.Security.Permissions;
///
/// [To be supplied.]
///
[HostProtection(SharedState = true)]
public class ListSortDescriptionCollection : IList {
ArrayList sorts = new ArrayList();
///
/// [To be supplied.]
///
public ListSortDescriptionCollection() {
}
///
/// [To be supplied.]
///
public ListSortDescriptionCollection(ListSortDescription[] sorts) {
if (sorts != null) {
for (int i = 0; i < sorts.Length; i ++) {
this.sorts.Add(sorts[i]);
}
}
}
///
/// [To be supplied.]
///
public ListSortDescription this[int index] {
get {
return (ListSortDescription) sorts[index];
}
set {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
}
// IList implementation
//
///
/// [To be supplied.]
///
bool IList.IsFixedSize {
get {
return true;
}
}
///
/// [To be supplied.]
///
bool IList.IsReadOnly {
get {
return true;
}
}
///
/// [To be supplied.]
///
object IList.this[int index] {
get {
return this[index];
}
set {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
}
///
/// [To be supplied.]
///
int IList.Add(object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.Clear() {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
public bool Contains(object value) {
return ((IList)this.sorts).Contains(value);
}
///
/// [To be supplied.]
///
public int IndexOf(object value) {
return ((IList)this.sorts).IndexOf(value);
}
///
/// [To be supplied.]
///
void IList.Insert(int index, object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.Remove(object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.RemoveAt(int index) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
// ICollection
//
///
/// [To be supplied.]
///
public int Count {
get {
return this.sorts.Count;
}
}
///
/// [To be supplied.]
///
bool ICollection.IsSynchronized {
get {
// true because after the constructor finished running the ListSortDescriptionCollection is Read Only
return true;
}
}
///
/// [To be supplied.]
///
object ICollection.SyncRoot {
get {
return this;
}
}
///
/// [To be supplied.]
///
public void CopyTo(Array array, int index) {
this.sorts.CopyTo(array, index);
}
// IEnumerable
//
///
/// [To be supplied.]
///
IEnumerator IEnumerable.GetEnumerator() {
return this.sorts.GetEnumerator();
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListMarkerLine.cs
- TextBlock.cs
- XmlMessageFormatter.cs
- TextServicesManager.cs
- MdImport.cs
- WaitHandle.cs
- RecordManager.cs
- CapabilitiesRule.cs
- ExpressionVisitor.cs
- BuilderInfo.cs
- ToolStripSplitButton.cs
- FormatterServices.cs
- SecurityState.cs
- FixedDocumentPaginator.cs
- HtmlEncodedRawTextWriter.cs
- SafeCryptContextHandle.cs
- ToolStripDropDownClosedEventArgs.cs
- CodeAttributeArgumentCollection.cs
- TokenizerHelper.cs
- Schema.cs
- GridViewItemAutomationPeer.cs
- ObjectConverter.cs
- RectAnimationUsingKeyFrames.cs
- LessThanOrEqual.cs
- SmiRequestExecutor.cs
- StylusLogic.cs
- CngAlgorithmGroup.cs
- SqlTypesSchemaImporter.cs
- BitmapDecoder.cs
- DataServiceQueryOfT.cs
- BatchWriter.cs
- columnmapkeybuilder.cs
- IssuanceTokenProviderBase.cs
- MenuEventArgs.cs
- WindowsSecurityTokenAuthenticator.cs
- WebPartCatalogCloseVerb.cs
- ScriptModule.cs
- PeerMessageDispatcher.cs
- CuspData.cs
- FormViewDeletedEventArgs.cs
- DataServiceExpressionVisitor.cs
- NamedPipeAppDomainProtocolHandler.cs
- FontInfo.cs
- RemotingClientProxy.cs
- EditorServiceContext.cs
- ValidateNames.cs
- ResolveMatchesApril2005.cs
- GifBitmapEncoder.cs
- SearchForVirtualItemEventArgs.cs
- ConfigurationValidatorBase.cs
- TextRange.cs
- CookielessHelper.cs
- ContractNamespaceAttribute.cs
- NavigationPropertyEmitter.cs
- Invariant.cs
- ServerIdentity.cs
- ServiceNameElement.cs
- QueryCacheEntry.cs
- WpfXamlMember.cs
- TreeNodeBinding.cs
- ScrollItemPattern.cs
- TransformerConfigurationWizardBase.cs
- InternalConfigConfigurationFactory.cs
- HtmlEmptyTagControlBuilder.cs
- ColumnMapVisitor.cs
- CompilerState.cs
- Vector3D.cs
- TrackingServices.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- TextDecorations.cs
- ComplexLine.cs
- ToolStripEditorManager.cs
- CompatibleIComparer.cs
- PackagePart.cs
- ObjRef.cs
- DataBoundControl.cs
- ThreadPool.cs
- DbConnectionOptions.cs
- ControlBindingsConverter.cs
- DataRow.cs
- XmlQualifiedNameTest.cs
- XmlSerializer.cs
- RealizationDrawingContextWalker.cs
- QueueProcessor.cs
- DebugHandleTracker.cs
- TypedMessageConverter.cs
- HtmlTableCellCollection.cs
- DataGridItem.cs
- MultilineStringConverter.cs
- AdornerLayer.cs
- BlurBitmapEffect.cs
- DataGridViewSelectedRowCollection.cs
- TemplateBuilder.cs
- PolicyUnit.cs
- Int32AnimationUsingKeyFrames.cs
- SegmentInfo.cs
- SqlDataSourceEnumerator.cs
- DataTableCollection.cs
- DataGridView.cs
- LicenseException.cs