Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; ////// [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
- NullableDoubleMinMaxAggregationOperator.cs
- WebBrowserEvent.cs
- PolicyException.cs
- BindingContext.cs
- InputLanguageCollection.cs
- EmptyWorkItem.cs
- FlowLayoutSettings.cs
- BaseDataBoundControl.cs
- InputBinder.cs
- ButtonRenderer.cs
- Viewport3DAutomationPeer.cs
- ValueType.cs
- _HelperAsyncResults.cs
- Number.cs
- SqlDataAdapter.cs
- ResourceCategoryAttribute.cs
- TextRangeBase.cs
- HtmlInputFile.cs
- UInt16Storage.cs
- ModelTreeEnumerator.cs
- ScrollPattern.cs
- Attribute.cs
- InvalidMessageContractException.cs
- RefreshEventArgs.cs
- activationcontext.cs
- MembershipUser.cs
- Choices.cs
- OletxTransactionManager.cs
- SafeCertificateContext.cs
- DuplicateWaitObjectException.cs
- XmlDocument.cs
- ImpersonateTokenRef.cs
- MatrixAnimationUsingKeyFrames.cs
- CodePageEncoding.cs
- MultipleViewPattern.cs
- MailAddressCollection.cs
- ServiceCredentialsElement.cs
- ListManagerBindingsCollection.cs
- DesignerHelpers.cs
- CodeMemberField.cs
- Rijndael.cs
- StylusPoint.cs
- TextEndOfParagraph.cs
- ForceCopyBuildProvider.cs
- SymmetricKeyWrap.cs
- IdnMapping.cs
- DataControlPagerLinkButton.cs
- RoutedCommand.cs
- Root.cs
- EventArgs.cs
- XmlNode.cs
- Asn1IntegerConverter.cs
- CacheAxisQuery.cs
- ItemsPanelTemplate.cs
- TextParaLineResult.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- PeerName.cs
- TextModifier.cs
- precedingsibling.cs
- BuildResult.cs
- SendMailErrorEventArgs.cs
- _NestedSingleAsyncResult.cs
- WindowsSolidBrush.cs
- SettingsContext.cs
- OleDbParameter.cs
- EllipticalNodeOperations.cs
- XamlStream.cs
- WebBrowserPermission.cs
- SessionEndingCancelEventArgs.cs
- Unit.cs
- ValidatorCompatibilityHelper.cs
- Control.cs
- ClosureBinding.cs
- WebPartCollection.cs
- SmtpCommands.cs
- DiscoveryClientDuplexChannel.cs
- ProxyManager.cs
- HtmlValidatorAdapter.cs
- InvalidStoreProtectionKeyException.cs
- EventToken.cs
- DescendantBaseQuery.cs
- ResourceDisplayNameAttribute.cs
- CustomErrorCollection.cs
- DataGridHelper.cs
- OleDbMetaDataFactory.cs
- RecordConverter.cs
- DataBindingCollectionConverter.cs
- RequestCachingSection.cs
- Int32.cs
- AssemblyContextControlItem.cs
- DynamicFilterExpression.cs
- DrawingCollection.cs
- Font.cs
- ManualResetEvent.cs
- ContextMenu.cs
- LinkedList.cs
- CalendarTable.cs
- SyndicationDeserializer.cs
- WebConfigurationManager.cs
- PointAnimation.cs