Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataSet / System / Data / SortExpressionBuilder.cs / 1305376 / SortExpressionBuilder.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections; using System.Text; using System.Data; using System.Linq; using System.Diagnostics; namespace System.Data { ////// This class represents a combined sort expression build using mutiple sort expressions. /// ///internal class SortExpressionBuilder : IComparer > { /** * This class ensures multiple orderby/thenbys are handled correctly. Its semantics is as follows: * * Query 1: * orderby a * thenby b * orderby c * orderby d * thenby e * * is equivalent to: * * Query 2: * orderby d * thenby e * thenby c * thenby a * thenby b * **/ //Selectors and comparers are mapped using the index in the list. //E.g: _comparers[i] is used with _selectors[i] LinkedList
> _selectors = new LinkedList >(); LinkedList > _comparers = new LinkedList >(); LinkedListNode > _currentSelector = null; LinkedListNode > _currentComparer = null; /// /// Adds a sorting selector/comparer in the correct order /// internal void Add(FunckeySelector, Comparison
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsFormsLinkLabel.cs
- PerformanceCountersElement.cs
- IntSecurity.cs
- InvalidProgramException.cs
- ScriptControlManager.cs
- GridViewColumnCollectionChangedEventArgs.cs
- IEnumerable.cs
- ReferenceEqualityComparer.cs
- XmlDataSourceView.cs
- AccessControlEntry.cs
- UrlPath.cs
- ForeignKeyConstraint.cs
- WebBrowserProgressChangedEventHandler.cs
- BitmapEffectInputData.cs
- XamlStyleSerializer.cs
- Interlocked.cs
- Application.cs
- HtmlAnchor.cs
- ViewPort3D.cs
- SemanticResolver.cs
- EndpointInfo.cs
- OutOfMemoryException.cs
- LinkedList.cs
- ToolStripDropDown.cs
- ExpandCollapseProviderWrapper.cs
- StaticContext.cs
- EllipseGeometry.cs
- XmlSerializerVersionAttribute.cs
- WpfPayload.cs
- CanExecuteRoutedEventArgs.cs
- EventManager.cs
- MenuItemAutomationPeer.cs
- Sql8ExpressionRewriter.cs
- SourceFileBuildProvider.cs
- StrokeFIndices.cs
- SpeechRecognitionEngine.cs
- OleDbReferenceCollection.cs
- EventKeyword.cs
- LogReservationCollection.cs
- RoleManagerSection.cs
- CommandEventArgs.cs
- SqlUserDefinedAggregateAttribute.cs
- WsdlInspector.cs
- RelationshipSet.cs
- XamlFilter.cs
- ControlBindingsCollection.cs
- ConnectionManagementElement.cs
- BindToObject.cs
- Clause.cs
- MasterPageParser.cs
- Application.cs
- PrePrepareMethodAttribute.cs
- NativeObjectSecurity.cs
- HTTPNotFoundHandler.cs
- Script.cs
- XmlDataSourceNodeDescriptor.cs
- DirectoryInfo.cs
- CultureTableRecord.cs
- ReadOnlyPropertyMetadata.cs
- DataServiceQueryOfT.cs
- ThumbButtonInfoCollection.cs
- X509ChainElement.cs
- DataSetMappper.cs
- WindowsFont.cs
- EdmValidator.cs
- Decorator.cs
- DebugView.cs
- CopyNodeSetAction.cs
- UIAgentInitializationException.cs
- StackOverflowException.cs
- Font.cs
- SqlInternalConnection.cs
- ExpressionNode.cs
- Delegate.cs
- MouseBinding.cs
- WinFormsUtils.cs
- ConfigurationPropertyCollection.cs
- CompoundFileIOPermission.cs
- WsdlHelpGeneratorElement.cs
- latinshape.cs
- unsafeIndexingFilterStream.cs
- Int64AnimationUsingKeyFrames.cs
- Attributes.cs
- TreeWalker.cs
- XpsDocumentEvent.cs
- OracleEncoding.cs
- RectangleHotSpot.cs
- SizeChangedInfo.cs
- SettingsPropertyValueCollection.cs
- RequiredAttributeAttribute.cs
- SmtpLoginAuthenticationModule.cs
- GraphicsPath.cs
- Control.cs
- ReadOnlyAttribute.cs
- WindowsFormsDesignerOptionService.cs
- RadialGradientBrush.cs
- MetaChildrenColumn.cs
- XmlUtf8RawTextWriter.cs
- SqlDataSourceAdvancedOptionsForm.cs
- GcSettings.cs