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:
Markus Ewald 2012-03-14 15:47:31 +00:00
parent 556b9ac0fb
commit 72511417ef
3 changed files with 7 additions and 13 deletions

View File

@ -26,9 +26,3 @@
#endif #endif
Benchmark of cloners:
SerializationCloner took 13424 ms
ReflectionCloner took 2126 ms
ExpressionTreeCloner took 171 ms

View File

@ -43,7 +43,7 @@
<Reference Include="NMock.StrongNamed"> <Reference Include="NMock.StrongNamed">
<HintPath>..\References\nmock\net-4.0\NMock.StrongNamed.dll</HintPath> <HintPath>..\References\nmock\net-4.0\NMock.StrongNamed.dll</HintPath>
</Reference> </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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\References\nunit\net-4.0\framework\nunit.framework.dll</HintPath> <HintPath>..\References\nunit\net-4.0\framework\nunit.framework.dll</HintPath>
</Reference> </Reference>

View File

@ -26,17 +26,17 @@ namespace Nuclex.Support.Collections {
/// <summary> /// <summary>
/// Compares two values in reverse or reverses the output of another comparer /// Compares two values in reverse or reverses the output of another comparer
/// </summary> /// </summary>
/// <typeparam name="ComparedType">Type of values to be compared</typeparam> /// <typeparam name="TCompared">Type of values to be compared</typeparam>
public class ReverseComparer<ComparedType> : IComparer<ComparedType> { public class ReverseComparer<TCompared> : IComparer<TCompared> {
/// <summary>Initializes a new reverse comparer</summary> /// <summary>Initializes a new reverse comparer</summary>
public ReverseComparer() : this(Comparer<ComparedType>.Default) { } public ReverseComparer() : this(Comparer<TCompared>.Default) { }
/// <summary> /// <summary>
/// Initializes the comparer to provide the inverse results of another comparer /// Initializes the comparer to provide the inverse results of another comparer
/// </summary> /// </summary>
/// <param name="comparerToReverse">Comparer whose results will be inversed</param> /// <param name="comparerToReverse">Comparer whose results will be inversed</param>
public ReverseComparer(IComparer<ComparedType> comparerToReverse) { public ReverseComparer(IComparer<TCompared> comparerToReverse) {
this.comparer = comparerToReverse; this.comparer = comparerToReverse;
} }
@ -44,12 +44,12 @@ namespace Nuclex.Support.Collections {
/// <param name="left">Value on the left side</param> /// <param name="left">Value on the left side</param>
/// <param name="right">Value on the right side</param> /// <param name="right">Value on the right side</param>
/// <returns>The relationship of the two values</returns> /// <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 return this.comparer.Compare(right, left); // intentionally reversed
} }
/// <summary>The default comparer from the .NET framework</summary> /// <summary>The default comparer from the .NET framework</summary>
private IComparer<ComparedType> comparer; private IComparer<TCompared> comparer;
} }