Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- XmlSchemaComplexContentExtension.cs
- SoapSchemaMember.cs
- AutomationPeer.cs
- PersonalizationStateInfoCollection.cs
- References.cs
- TreeViewItem.cs
- _ContextAwareResult.cs
- XmlNode.cs
- Util.cs
- ServiceModelConfigurationSection.cs
- SettingsSavedEventArgs.cs
- TableDetailsRow.cs
- CmsInterop.cs
- SevenBitStream.cs
- BrowserCapabilitiesCodeGenerator.cs
- UpdateDelegates.Generated.cs
- MachineKeyConverter.cs
- DrawingCollection.cs
- LiteralControl.cs
- HtmlPanelAdapter.cs
- ExtensionQuery.cs
- CodeNamespaceCollection.cs
- CircleHotSpot.cs
- DesignerWidgets.cs
- WebBrowserContainer.cs
- CompositionAdorner.cs
- XmlNodeWriter.cs
- ItemsControlAutomationPeer.cs
- TlsnegoTokenAuthenticator.cs
- MailWriter.cs
- ProfileBuildProvider.cs
- XmlNamespaceManager.cs
- Bits.cs
- X509ChainElement.cs
- DataGridViewImageColumn.cs
- DeviceContext2.cs
- DictionaryKeyPropertyAttribute.cs
- HealthMonitoringSection.cs
- NetPeerTcpBindingCollectionElement.cs
- StrongNameUtility.cs
- ExpressionCopier.cs
- MetafileHeaderEmf.cs
- HttpHandlerActionCollection.cs
- RangeBaseAutomationPeer.cs
- Int64AnimationUsingKeyFrames.cs
- WebPageTraceListener.cs
- DataListItemEventArgs.cs
- SQLInt32Storage.cs
- ArgumentElement.cs
- CalendarData.cs
- DefaultMemberAttribute.cs
- Converter.cs
- SafeHandle.cs
- ReturnType.cs
- LambdaCompiler.Binary.cs
- TextParaLineResult.cs
- WorkflowTransactionService.cs
- EncodingTable.cs
- TextEffectCollection.cs
- BlockUIContainer.cs
- ScriptMethodAttribute.cs
- Walker.cs
- SqlException.cs
- SerializationSectionGroup.cs
- SmtpException.cs
- EnumMember.cs
- ContainerVisual.cs
- InternalTypeHelper.cs
- RequestCacheValidator.cs
- AutomationEvent.cs
- BindingCollection.cs
- CaseStatement.cs
- RequestQueryProcessor.cs
- DataTemplate.cs
- DataGridGeneralPage.cs
- Point3DCollection.cs
- DataGrid.cs
- WindowsStatic.cs
- Module.cs
- UiaCoreTypesApi.cs
- IgnoreFlushAndCloseStream.cs
- DbInsertCommandTree.cs
- TextPatternIdentifiers.cs
- LinkedResourceCollection.cs
- IDictionary.cs
- LocalTransaction.cs
- MobileRedirect.cs
- SerializationEventsCache.cs
- ControlIdConverter.cs
- WebPartsSection.cs
- Vector3DKeyFrameCollection.cs
- DrawingVisual.cs
- EntitySqlQueryBuilder.cs
- RightsManagementEncryptionTransform.cs
- DataGridTable.cs
- WebZone.cs
- ObjectListField.cs
- ListViewUpdateEventArgs.cs
- ObservableCollection.cs
- ServicePoint.cs