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
- TextSpanModifier.cs
- EnumValidator.cs
- StdRegProviderWrapper.cs
- CodeSnippetCompileUnit.cs
- XmlBoundElement.cs
- CheckBox.cs
- DataGridViewColumn.cs
- SelectionListDesigner.cs
- filewebrequest.cs
- KeyToListMap.cs
- LightweightCodeGenerator.cs
- SymLanguageType.cs
- StylusOverProperty.cs
- FormatConvertedBitmap.cs
- Padding.cs
- SystemIPGlobalStatistics.cs
- DataSourceControl.cs
- DesignerUtils.cs
- CodeDomConfigurationHandler.cs
- KeyBinding.cs
- RichTextBox.cs
- AsymmetricSignatureDeformatter.cs
- StringWriter.cs
- Point3DAnimationUsingKeyFrames.cs
- ObjectHandle.cs
- HtmlTableRowCollection.cs
- DescendantBaseQuery.cs
- IdentityManager.cs
- SerializationInfo.cs
- PerformanceCounterLib.cs
- ProxySimple.cs
- Animatable.cs
- SettingsContext.cs
- Transform.cs
- SystemTcpConnection.cs
- OuterGlowBitmapEffect.cs
- TypeSystemProvider.cs
- ProcessingInstructionAction.cs
- NotifyIcon.cs
- SqlCacheDependency.cs
- ApplicationDirectoryMembershipCondition.cs
- HtmlControlAdapter.cs
- PolicyAssertionCollection.cs
- AutoResetEvent.cs
- RegistryConfigurationProvider.cs
- OutOfProcStateClientManager.cs
- safemediahandle.cs
- BufferedGraphicsManager.cs
- Function.cs
- TextBoxAutoCompleteSourceConverter.cs
- DateTimeConverter2.cs
- ModifierKeysConverter.cs
- TreeView.cs
- Base64Encoding.cs
- ObjectTag.cs
- FileSecurity.cs
- IncrementalHitTester.cs
- ToolStripDropDown.cs
- BulletedListEventArgs.cs
- ObjectQuery_EntitySqlExtensions.cs
- LocalClientSecuritySettings.cs
- QueryInterceptorAttribute.cs
- HierarchicalDataSourceIDConverter.cs
- MenuItemStyleCollection.cs
- ExternalFile.cs
- XPathDocumentNavigator.cs
- BeginEvent.cs
- BuildProviderCollection.cs
- XmlIterators.cs
- SQLDecimalStorage.cs
- OneOfConst.cs
- ACL.cs
- SmtpClient.cs
- X509Chain.cs
- _ConnectionGroup.cs
- Helpers.cs
- SignatureResourcePool.cs
- Content.cs
- NumberFunctions.cs
- XPathExpr.cs
- WebControlsSection.cs
- DataGridTableStyleMappingNameEditor.cs
- FactoryId.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ProgressChangedEventArgs.cs
- AdapterDictionary.cs
- RelatedImageListAttribute.cs
- X509Utils.cs
- _CacheStreams.cs
- GeneralTransform2DTo3DTo2D.cs
- ComplexType.cs
- TreeNodeBinding.cs
- HttpHeaderCollection.cs
- ServiceChannelManager.cs
- ProfilePropertySettings.cs
- CollectionEditor.cs
- TreeNodeStyle.cs
- PeerCustomResolverSettings.cs
- CfgParser.cs
- GcSettings.cs