Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ListSortDescriptionCollection.cs / 1305376 / ListSortDescriptionCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System.Collections; using System.Security.Permissions; ////// [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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System.Collections; using System.Security.Permissions; ////// [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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AdjustableArrowCap.cs
- CancelEventArgs.cs
- DecryptedHeader.cs
- AnnotationService.cs
- WindowsNonControl.cs
- WebBrowserNavigatedEventHandler.cs
- SoapAttributeAttribute.cs
- typedescriptorpermission.cs
- DataViewListener.cs
- SmiContextFactory.cs
- CompilerCollection.cs
- HtmlTextArea.cs
- UnsignedPublishLicense.cs
- GeometryHitTestParameters.cs
- MailAddress.cs
- ConfigXmlAttribute.cs
- TextSerializer.cs
- FragmentNavigationEventArgs.cs
- WebProxyScriptElement.cs
- DataPager.cs
- DispatcherHooks.cs
- LocatorPart.cs
- TypeValidationEventArgs.cs
- AdapterDictionary.cs
- _SingleItemRequestCache.cs
- StringValidatorAttribute.cs
- CompilationSection.cs
- RecognizerBase.cs
- ResourceCategoryAttribute.cs
- SecureEnvironment.cs
- ValidationPropertyAttribute.cs
- TextContainerChangedEventArgs.cs
- WebPartAuthorizationEventArgs.cs
- TerminatorSinks.cs
- MatrixTransform3D.cs
- MenuItem.cs
- Pair.cs
- TcpPortSharing.cs
- XmlEnumAttribute.cs
- basenumberconverter.cs
- SubstitutionDesigner.cs
- DirectoryNotFoundException.cs
- DbProviderSpecificTypePropertyAttribute.cs
- WhitespaceReader.cs
- SchemaNotation.cs
- EntityModelSchemaGenerator.cs
- StructuredProperty.cs
- CompilerGeneratedAttribute.cs
- SoapSchemaMember.cs
- DataGridViewComboBoxColumnDesigner.cs
- ClassValidator.cs
- CriticalFinalizerObject.cs
- ObjectReaderCompiler.cs
- ModuleBuilderData.cs
- Soap11ServerProtocol.cs
- StateManagedCollection.cs
- SqlServer2KCompatibilityAnnotation.cs
- ObjectQueryProvider.cs
- TextTreeRootNode.cs
- DrawListViewItemEventArgs.cs
- JavaScriptSerializer.cs
- Collection.cs
- ByteArrayHelperWithString.cs
- RepeaterCommandEventArgs.cs
- ImageIndexConverter.cs
- ValidationRuleCollection.cs
- Int64Converter.cs
- CompilationUnit.cs
- AnnotationComponentManager.cs
- ToolStripDropDownItemDesigner.cs
- UnsafeNativeMethodsCLR.cs
- XmlSequenceWriter.cs
- ElementUtil.cs
- TextMarkerSource.cs
- ErrorHandler.cs
- IdnElement.cs
- HyperLinkField.cs
- DetailsViewCommandEventArgs.cs
- WbmpConverter.cs
- ServiceInstanceProvider.cs
- ToolStripItemTextRenderEventArgs.cs
- XamlPathDataSerializer.cs
- HttpDebugHandler.cs
- Int32Animation.cs
- _NestedSingleAsyncResult.cs
- FtpRequestCacheValidator.cs
- SQLUtility.cs
- EncryptedType.cs
- RequestQueryParser.cs
- AnonymousIdentificationSection.cs
- XmlNodeReader.cs
- CacheDependency.cs
- LayoutTable.cs
- XslCompiledTransform.cs
- CodeThrowExceptionStatement.cs
- ObservableDictionary.cs
- SiteMapDataSource.cs
- OdbcEnvironment.cs
- XamlToRtfParser.cs
- DataGridColumnReorderingEventArgs.cs