ground up refactor!
This commit is contained in:
1 parent
6a2ab0d873
commit
7c2960e1d7
19 files changed
+3534
-3444
No files matched your search
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FrappeMocha.Keygen
|
||||
{
|
||||
public class KeygenProduct
|
||||
{
|
||||
public LicenseTypes Licence;
|
||||
public string Description;
|
||||
|
||||
public KeygenProduct(LicenseTypes licence, string description, string platform)
|
||||
{
|
||||
Licence = licence;
|
||||
Description = description + " for " + platform;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Description;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is KeygenProduct product && Description == product.Description ||
|
||||
obj is string description && description == Description;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashCode = -1651123971;
|
||||
hashCode = hashCode * -1521134295 + Licence.GetHashCode();
|
||||
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Description);
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user