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
- TextServicesContext.cs
- MasterPage.cs
- BrushConverter.cs
- BooleanAnimationBase.cs
- OutputCacheProfileCollection.cs
- ByteStack.cs
- ExpressionBinding.cs
- DataPager.cs
- SqlDeflator.cs
- WorkflowServiceBehavior.cs
- XamlWriterExtensions.cs
- WmpBitmapDecoder.cs
- XmlConvert.cs
- SaveFileDialog.cs
- SolidBrush.cs
- FillRuleValidation.cs
- Helper.cs
- HttpBrowserCapabilitiesWrapper.cs
- StackBuilderSink.cs
- GatewayDefinition.cs
- DropTarget.cs
- ObjectCacheHost.cs
- XPathNodeList.cs
- CultureTableRecord.cs
- InteropEnvironment.cs
- RecognizerBase.cs
- SecurityHelper.cs
- ProjectionPath.cs
- BitmapEffectInputConnector.cs
- AttachedAnnotationChangedEventArgs.cs
- PrintController.cs
- SubclassTypeValidatorAttribute.cs
- DockingAttribute.cs
- RepeatBehaviorConverter.cs
- ServiceReference.cs
- X509CertificateCollection.cs
- DefaultTextStoreTextComposition.cs
- ValidationHelpers.cs
- RegexCapture.cs
- CFGGrammar.cs
- SafeCertificateStore.cs
- TreeWalker.cs
- SizeChangedInfo.cs
- UInt32Storage.cs
- TypeHelpers.cs
- CacheHelper.cs
- DataPagerFieldCommandEventArgs.cs
- EndpointAddress10.cs
- DBConnectionString.cs
- SqlDataSourceConfigureSortForm.cs
- TextServicesCompartmentContext.cs
- StartUpEventArgs.cs
- Vector3DCollection.cs
- EntityContainerAssociationSet.cs
- FixedSOMSemanticBox.cs
- MessageLoggingFilterTraceRecord.cs
- SecurityChannel.cs
- MouseEvent.cs
- PrincipalPermission.cs
- PreservationFileReader.cs
- ObjectNotFoundException.cs
- TextPointerBase.cs
- ToolStripContentPanel.cs
- AttributeTable.cs
- OracleParameterCollection.cs
- ConfigurationConverterBase.cs
- ItemPager.cs
- TiffBitmapEncoder.cs
- DropAnimation.xaml.cs
- ToolStripGripRenderEventArgs.cs
- IISUnsafeMethods.cs
- IMembershipProvider.cs
- DefaultObjectSerializer.cs
- SparseMemoryStream.cs
- _Win32.cs
- HashAlgorithm.cs
- Material.cs
- TypeInfo.cs
- TemplatedWizardStep.cs
- DataGridRowEventArgs.cs
- ImportContext.cs
- SingleAnimation.cs
- AddressHeaderCollectionElement.cs
- BinaryObjectReader.cs
- ObjectSet.cs
- CharEnumerator.cs
- Bezier.cs
- ManipulationInertiaStartingEventArgs.cs
- DeferredElementTreeState.cs
- SerialStream.cs
- OpCodes.cs
- COAUTHINFO.cs
- Accessible.cs
- HtmlPhoneCallAdapter.cs
- BulletedListEventArgs.cs
- UIElement3D.cs
- HttpInputStream.cs
- DynamicUpdateCommand.cs
- MenuItemCollection.cs
- AssemblyResolver.cs