ReverseComparer still used old generic argument naming convention - fixed
git-svn-id: file:///srv/devel/repo-conversion/nusu@278 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
556b9ac0fb
commit
72511417ef
|
@ -26,9 +26,3 @@
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
Benchmark of cloners:
|
||||
|
||||
SerializationCloner took 13424 ms
|
||||
ReflectionCloner took 2126 ms
|
||||
ExpressionTreeCloner took 171 ms
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<Reference Include="NMock.StrongNamed">
|
||||
<HintPath>..\References\nmock\net-4.0\NMock.StrongNamed.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.5.10112, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\nunit\net-4.0\framework\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -26,17 +26,17 @@ namespace Nuclex.Support.Collections {
|
|||
/// <summary>
|
||||
/// Compares two values in reverse or reverses the output of another comparer
|
||||
/// </summary>
|
||||
/// <typeparam name="ComparedType">Type of values to be compared</typeparam>
|
||||
public class ReverseComparer<ComparedType> : IComparer<ComparedType> {
|
||||
/// <typeparam name="TCompared">Type of values to be compared</typeparam>
|
||||
public class ReverseComparer<TCompared> : IComparer<TCompared> {
|
||||
|
||||
/// <summary>Initializes a new reverse comparer</summary>
|
||||
public ReverseComparer() : this(Comparer<ComparedType>.Default) { }
|
||||
public ReverseComparer() : this(Comparer<TCompared>.Default) { }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the comparer to provide the inverse results of another comparer
|
||||
/// </summary>
|
||||
/// <param name="comparerToReverse">Comparer whose results will be inversed</param>
|
||||
public ReverseComparer(IComparer<ComparedType> comparerToReverse) {
|
||||
public ReverseComparer(IComparer<TCompared> comparerToReverse) {
|
||||
this.comparer = comparerToReverse;
|
||||
}
|
||||
|
||||
|
@ -44,12 +44,12 @@ namespace Nuclex.Support.Collections {
|
|||
/// <param name="left">Value on the left side</param>
|
||||
/// <param name="right">Value on the right side</param>
|
||||
/// <returns>The relationship of the two values</returns>
|
||||
public int Compare(ComparedType left, ComparedType right) {
|
||||
public int Compare(TCompared left, TCompared right) {
|
||||
return this.comparer.Compare(right, left); // intentionally reversed
|
||||
}
|
||||
|
||||
/// <summary>The default comparer from the .NET framework</summary>
|
||||
private IComparer<ComparedType> comparer;
|
||||
private IComparer<TCompared> comparer;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user