blog index
This commit is contained in:
parent
74a6d40a4d
commit
2d41b45c93
4 changed files with 114 additions and 36 deletions
31
Yavsc/ViewModels/Blogspot/BlogIndexKey.cs
Normal file
31
Yavsc/ViewModels/Blogspot/BlogIndexKey.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Yavsc.ViewModels.Blogspot
|
||||
{
|
||||
public class BlogIndexKey
|
||||
{
|
||||
public string AuthorId { get; set; }
|
||||
public string Title { get; set; }
|
||||
// override object.Equals
|
||||
public override bool Equals (object obj)
|
||||
{
|
||||
//
|
||||
// See the full list of guidelines at
|
||||
// http://go.microsoft.com/fwlink/?LinkID=85237
|
||||
// and also the guidance for operator== at
|
||||
// http://go.microsoft.com/fwlink/?LinkId=85238
|
||||
//
|
||||
|
||||
if (obj == null || GetType() != obj.GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var blogindexkey = (BlogIndexKey)obj;
|
||||
return Title == blogindexkey.Title && AuthorId == blogindexkey.AuthorId;
|
||||
}
|
||||
|
||||
// override object.GetHashCode
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Title.GetHashCode() * AuthorId.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue