GetHashcode and Equals usage
This commit is contained in:
parent
f6e8ddb91d
commit
1eed03ac14
@ -92,7 +92,7 @@ public abstract class Api : IDisposable
|
|||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return HashCode.Combine(ApiType);
|
return ApiType.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
@ -27,7 +27,7 @@ public abstract class OpenShockApi : Api
|
|||||||
|
|
||||||
private bool Equals(OpenShockApi other)
|
private bool Equals(OpenShockApi other)
|
||||||
{
|
{
|
||||||
return base.Equals(other) && Endpoint == other.Endpoint && ApiKey == other.ApiKey;
|
return base.Equals(other) && Endpoint.Equals(other.Endpoint) && ApiKey.Equals(other.ApiKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user