Skip to content

Commit

Permalink
Merge pull request #11 from tmacharia/patch-1
Browse files Browse the repository at this point in the history
fixes casting bug
  • Loading branch information
tmacharia committed Oct 5, 2020
2 parents e749243 + 40cbaef commit 3add9c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
35 changes: 1 addition & 34 deletions src/PagedResult.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;

namespace Paginator
{
Expand Down Expand Up @@ -49,17 +47,6 @@ public PagedResult()
/// </summary>
public ICollection<T> Items { get; set; }

/// <summary>
/// Determines whether the specified object matches the current object.
/// </summary>
/// <param name="obj"></param>
/// <returns>true or false</returns>
public override bool Equals(object obj)
{
if (obj == null)
return false;
return this == (PagedResult<T>)obj;
}
/// <summary>
/// Calculates &amp; returns the hashcode of the current object.
/// </summary>
Expand All @@ -78,25 +65,5 @@ public override int GetHashCode()
return hash;
}
}
/// <summary>
/// Determines whether this objects match.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
public static bool operator == (PagedResult<T> left, PagedResult<T> right)
{
return left.Equals(right);
}
/// <summary>
/// Determines whether this two objects do not match.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
public static bool operator !=(PagedResult<T> left, PagedResult<T> right)
{
return !(left == right);
}
}
}
3 changes: 1 addition & 2 deletions src/Paginator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
- List (collection of the first 20 records)
</Description>
<PackageId>LinqPaginator</PackageId>
<Version>1.2.5</Version>

<Version>1.2.6</Version>
<NeutralLanguage>en</NeutralLanguage>
<PackageReleaseNotes>
Fixes bug/issue with pagination result:
Expand Down

0 comments on commit 3add9c8

Please sign in to comment.