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
- Highlights.cs
- MouseDevice.cs
- ControlEvent.cs
- DateTimeSerializationSection.cs
- SecurityPermission.cs
- InfoCardTraceRecord.cs
- FileLevelControlBuilderAttribute.cs
- TransformerConfigurationWizardBase.cs
- TextChange.cs
- ExecutionContext.cs
- AlphabeticalEnumConverter.cs
- DataMemberAttribute.cs
- RoutedUICommand.cs
- PropertyValueChangedEvent.cs
- ConnectionManagementElementCollection.cs
- _NegotiateClient.cs
- CompositeControl.cs
- NameValueFileSectionHandler.cs
- WindowsGraphics.cs
- CompiledQueryCacheEntry.cs
- TableLayoutStyleCollection.cs
- CompleteWizardStep.cs
- SchemaImporterExtensionsSection.cs
- HyperLinkField.cs
- ProxyWebPart.cs
- ValueType.cs
- TokenBasedSetEnumerator.cs
- connectionpool.cs
- ChtmlSelectionListAdapter.cs
- DeflateStream.cs
- OracleBinary.cs
- TypeExtension.cs
- KeyInterop.cs
- ReversePositionQuery.cs
- Int64.cs
- XsltArgumentList.cs
- DefaultAutoFieldGenerator.cs
- AssemblyAssociatedContentFileAttribute.cs
- GridViewDesigner.cs
- ContentPosition.cs
- SerialPort.cs
- RequiredAttributeAttribute.cs
- MemberPath.cs
- InheritanceAttribute.cs
- SchemaImporterExtensionElement.cs
- ChildDocumentBlock.cs
- HttpException.cs
- BitArray.cs
- Wrapper.cs
- ChannelServices.cs
- StreamingContext.cs
- QilFunction.cs
- AppliedDeviceFiltersDialog.cs
- TextPatternIdentifiers.cs
- DataViewSetting.cs
- TransformPattern.cs
- Model3DGroup.cs
- ChannelServices.cs
- DynamicValidator.cs
- GridEntry.cs
- RequiredAttributeAttribute.cs
- DatagridviewDisplayedBandsData.cs
- AttachedPropertyMethodSelector.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- UseAttributeSetsAction.cs
- TTSEvent.cs
- RangeBaseAutomationPeer.cs
- ParameterCollection.cs
- ToolStripStatusLabel.cs
- UDPClient.cs
- ScriptManager.cs
- Transactions.cs
- CommandEventArgs.cs
- TypeUtil.cs
- DataGridViewRowStateChangedEventArgs.cs
- NativeMethods.cs
- VirtualPathProvider.cs
- SourceLineInfo.cs
- ResourceAttributes.cs
- FontClient.cs
- Html32TextWriter.cs
- EditingCommands.cs
- SecureConversationSecurityTokenParameters.cs
- ConditionalBranch.cs
- VisualBasicImportReference.cs
- BounceEase.cs
- EntityContainerEmitter.cs
- IdentityNotMappedException.cs
- BindingValueChangedEventArgs.cs
- CollectionViewGroupInternal.cs
- ConstraintConverter.cs
- SizeAnimationBase.cs
- FileLogRecordEnumerator.cs
- QilScopedVisitor.cs
- StateDesignerConnector.cs
- ConfigurationElementCollection.cs
- Substitution.cs
- WindowInteropHelper.cs
- ZipPackagePart.cs
- ListBindingHelper.cs