Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IgnorePropertiesAttribute.cs
- ImageButton.cs
- SortedList.cs
- RectValueSerializer.cs
- RegexStringValidator.cs
- RightsManagementPermission.cs
- ButtonColumn.cs
- CompositeFontParser.cs
- XmlEncoding.cs
- MiniCustomAttributeInfo.cs
- TreeView.cs
- XmlSchemaValidationException.cs
- PenLineCapValidation.cs
- CodeDirectionExpression.cs
- VectorCollectionValueSerializer.cs
- ExpressionNormalizer.cs
- Calendar.cs
- RequestSecurityToken.cs
- DbDeleteCommandTree.cs
- CodeTypeMember.cs
- PageClientProxyGenerator.cs
- ThousandthOfEmRealDoubles.cs
- mil_sdk_version.cs
- CounterCreationData.cs
- FontWeights.cs
- FileRegion.cs
- Stacktrace.cs
- AppDomainAttributes.cs
- FtpCachePolicyElement.cs
- MarkupCompilePass2.cs
- SmtpDigestAuthenticationModule.cs
- ControlUtil.cs
- CmsInterop.cs
- EmptyElement.cs
- sqlser.cs
- WmlCalendarAdapter.cs
- FixedSOMPage.cs
- DbConnectionInternal.cs
- DataControlFieldHeaderCell.cs
- TypeSystemProvider.cs
- TextFragmentEngine.cs
- Message.cs
- TextServicesLoader.cs
- HwndPanningFeedback.cs
- DataServices.cs
- PeerTransportSecuritySettings.cs
- SecurityContext.cs
- XmlArrayItemAttributes.cs
- ZipIOLocalFileDataDescriptor.cs
- AttributeCollection.cs
- XpsResourcePolicy.cs
- TextProperties.cs
- XmlNotation.cs
- NullableDoubleAverageAggregationOperator.cs
- FormDesigner.cs
- HttpRuntimeSection.cs
- Set.cs
- XmlSerializerNamespaces.cs
- ObjectQueryState.cs
- DebuggerService.cs
- BinaryExpressionHelper.cs
- DataServiceKeyAttribute.cs
- ControlValuePropertyAttribute.cs
- SmiEventSink.cs
- DataViewManagerListItemTypeDescriptor.cs
- SchemaImporterExtensionsSection.cs
- GetPageNumberCompletedEventArgs.cs
- LinearQuaternionKeyFrame.cs
- httpstaticobjectscollection.cs
- DataGridViewCellValueEventArgs.cs
- ClosableStream.cs
- SimplePropertyEntry.cs
- WaitHandle.cs
- SecurityPolicySection.cs
- QilNode.cs
- PointAnimationUsingPath.cs
- ButtonColumn.cs
- MSHTMLHost.cs
- TranslateTransform3D.cs
- AudioStateChangedEventArgs.cs
- DesignerObjectListAdapter.cs
- WaitHandleCannotBeOpenedException.cs
- SwitchLevelAttribute.cs
- X509DefaultServiceCertificateElement.cs
- TemplateControl.cs
- FastPropertyAccessor.cs
- ToolStripDropDownDesigner.cs
- KeyEvent.cs
- ScalarRestriction.cs
- HtmlElementErrorEventArgs.cs
- ReferencedAssemblyResolver.cs
- OutputCacheSettings.cs
- CultureMapper.cs
- ConfigXmlAttribute.cs
- Screen.cs
- FontWeightConverter.cs
- StatusBarItemAutomationPeer.cs
- ListControlDesigner.cs
- SessionChannels.cs
- ColorConvertedBitmap.cs