Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Utils / PairComparer.cs / 1305376 / PairComparer.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // PairComparer.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { ////// PairComparer compares pairs by the first element, and breaks ties by the second /// element. /// ////// internal class PairComparer : IComparer > { private IComparer m_comparer1; private IComparer m_comparer2; public PairComparer(IComparer comparer1, IComparer comparer2) { m_comparer1 = comparer1; m_comparer2 = comparer2; } public int Compare(Pair x, Pair y) { int result1 = m_comparer1.Compare(x.First, y.First); if (result1 != 0) { return result1; } return m_comparer2.Compare(x.Second, y.Second); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyObject.cs
- SiteMapNode.cs
- TreeView.cs
- ZipIOLocalFileHeader.cs
- WebPartVerbsEventArgs.cs
- XhtmlBasicPanelAdapter.cs
- LinearKeyFrames.cs
- CodeVariableReferenceExpression.cs
- MulticastNotSupportedException.cs
- SynchronizedInputHelper.cs
- MouseButtonEventArgs.cs
- HMACSHA1.cs
- ListViewItemSelectionChangedEvent.cs
- DesignerActionPropertyItem.cs
- TableCellCollection.cs
- EmbeddedMailObject.cs
- TypeUsage.cs
- Psha1DerivedKeyGenerator.cs
- DocumentAutomationPeer.cs
- ImageMapEventArgs.cs
- ReferencedCollectionType.cs
- ReverseInheritProperty.cs
- FreezableCollection.cs
- Geometry3D.cs
- XmlTextAttribute.cs
- CollectionViewProxy.cs
- RecordConverter.cs
- ReflectPropertyDescriptor.cs
- DispatchChannelSink.cs
- EventBuilder.cs
- ActivityBindForm.Designer.cs
- Span.cs
- DependencyPropertyHelper.cs
- CompoundFileStreamReference.cs
- CodeTypeMemberCollection.cs
- SectionUpdates.cs
- LinqToSqlWrapper.cs
- ConstraintManager.cs
- ModelUtilities.cs
- Soap12FormatExtensions.cs
- ComponentConverter.cs
- MultipleViewProviderWrapper.cs
- WebPartCatalogCloseVerb.cs
- ComponentEditorForm.cs
- XmlTextEncoder.cs
- AuthenticationModulesSection.cs
- XPathPatternBuilder.cs
- DataRelationCollection.cs
- CacheSection.cs
- KnownBoxes.cs
- DropSource.cs
- HtmlControl.cs
- DrawingGroupDrawingContext.cs
- UnwrappedTypesXmlSerializerManager.cs
- HtmlTableRow.cs
- StringConcat.cs
- SoapFault.cs
- QuadraticBezierSegment.cs
- EditBehavior.cs
- DbConnectionStringBuilder.cs
- ToolStripScrollButton.cs
- datacache.cs
- TypedReference.cs
- DbBuffer.cs
- MimeReturn.cs
- ReaderWriterLock.cs
- VectorAnimation.cs
- TraceFilter.cs
- WebPartCancelEventArgs.cs
- MemoryMappedViewStream.cs
- XmlEncodedRawTextWriter.cs
- DiscoveryVersionConverter.cs
- TableDesigner.cs
- PropertyValueUIItem.cs
- StackOverflowException.cs
- AsyncResult.cs
- SecurityTokenRequirement.cs
- SpecialTypeDataContract.cs
- BindingGroup.cs
- EditBehavior.cs
- InfoCardRSACryptoProvider.cs
- ITextView.cs
- OracleNumber.cs
- CaseInsensitiveComparer.cs
- MetadataPropertyCollection.cs
- HtmlWindow.cs
- DBCommandBuilder.cs
- storepermission.cs
- EdmItemCollection.cs
- DbModificationCommandTree.cs
- ElementNotAvailableException.cs
- GeometryValueSerializer.cs
- SerialStream.cs
- SoapSchemaImporter.cs
- ColorMatrix.cs
- SpellerInterop.cs
- DependencyPropertyConverter.cs
- XmlDocumentViewSchema.cs
- SelfIssuedTokenFactoryCredential.cs
- ElementHostPropertyMap.cs