Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Utils / ReverseComparer.cs / 1305376 / ReverseComparer.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ReverseComparer.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { ////// Comparer that wraps another comparer, and flips the result of each comparison to the /// opposite answer. /// ///internal class ReverseComparer : IComparer { private IComparer m_comparer; internal ReverseComparer(IComparer comparer) { m_comparer = comparer; } public int Compare(T x, T y) { return -m_comparer.Compare(x, y); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ReverseComparer.cs // // [....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { ////// Comparer that wraps another comparer, and flips the result of each comparison to the /// opposite answer. /// ///internal class ReverseComparer : IComparer { private IComparer m_comparer; internal ReverseComparer(IComparer comparer) { m_comparer = comparer; } public int Compare(T x, T y) { return -m_comparer.Compare(x, y); } } } // 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
- LineBreak.cs
- IssuedTokenClientBehaviorsElement.cs
- BindingMAnagerBase.cs
- TextServicesCompartment.cs
- DetailsViewDeletedEventArgs.cs
- SByteConverter.cs
- SynchronizedDispatch.cs
- FormParameter.cs
- OperationParameterInfoCollection.cs
- Property.cs
- QilPatternFactory.cs
- SoapHeaders.cs
- LinqToSqlWrapper.cs
- DataTableTypeConverter.cs
- ExceptionHandlerDesigner.cs
- Pointer.cs
- AssemblyResourceLoader.cs
- BinaryMessageEncodingBindingElement.cs
- ImagingCache.cs
- OrderedParallelQuery.cs
- CompilationUtil.cs
- TypeListConverter.cs
- CacheDependency.cs
- Stream.cs
- ClientProtocol.cs
- Storyboard.cs
- TemplateColumn.cs
- CompressionTracing.cs
- TemplateLookupAction.cs
- ScrollBarRenderer.cs
- CodeBlockBuilder.cs
- TransformProviderWrapper.cs
- storepermission.cs
- GenericParameterDataContract.cs
- Faults.cs
- DetailsViewPagerRow.cs
- LinkedResource.cs
- FixedPosition.cs
- XmlReflectionMember.cs
- XmlnsDictionary.cs
- ImageClickEventArgs.cs
- DispatcherEventArgs.cs
- SharedStatics.cs
- QueryOutputWriter.cs
- FragmentQuery.cs
- StaticTextPointer.cs
- CatalogZoneDesigner.cs
- EmissiveMaterial.cs
- SqlExpander.cs
- SQLStringStorage.cs
- GenericPrincipal.cs
- EditorPartChrome.cs
- arabicshape.cs
- PackageDigitalSignature.cs
- EUCJPEncoding.cs
- DbParameterHelper.cs
- OutArgument.cs
- Camera.cs
- TextTrailingWordEllipsis.cs
- HeaderedItemsControl.cs
- AttributeCollection.cs
- ExtractedStateEntry.cs
- ExpressionNormalizer.cs
- ByteConverter.cs
- BasicCellRelation.cs
- UrlAuthorizationModule.cs
- SamlConditions.cs
- OptimisticConcurrencyException.cs
- PageContentAsyncResult.cs
- DurableEnlistmentState.cs
- ParseHttpDate.cs
- Page.cs
- C14NUtil.cs
- SoapAttributeAttribute.cs
- EditCommandColumn.cs
- PrintDialog.cs
- ServiceOperation.cs
- SimplePropertyEntry.cs
- DesignTimeDataBinding.cs
- arc.cs
- CollectionChangedEventManager.cs
- DoubleUtil.cs
- DashStyle.cs
- HwndSourceKeyboardInputSite.cs
- ResourcePermissionBase.cs
- TableRowGroup.cs
- DataGridViewSelectedRowCollection.cs
- SimpleTextLine.cs
- XmlSchemaSimpleType.cs
- SolidBrush.cs
- MatrixCamera.cs
- SessionEndedEventArgs.cs
- AuthenticationService.cs
- UserPreferenceChangingEventArgs.cs
- IIS7UserPrincipal.cs
- Header.cs
- RequestDescription.cs
- TextSelectionHelper.cs
- AttributeProviderAttribute.cs
- StackOverflowException.cs