Added style guidance and performed enforcement
This commit is contained in:
@ -49,12 +49,12 @@ namespace IO.Swagger.Models.RequestDto
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class CurrencyAddAssetBody {\n");
|
||||
sb.Append(" CollectionId: ").Append(CollectionId).Append("\n");
|
||||
sb.Append(" AssetName: ").Append(AssetName).Append("\n");
|
||||
sb.Append(" AssetLink: ").Append(AssetLink).Append("\n");
|
||||
sb.Append("}\n");
|
||||
StringBuilder sb = new();
|
||||
StringBuilder unused4 = sb.Append("class CurrencyAddAssetBody {\n");
|
||||
StringBuilder unused3 = sb.Append(" CollectionId: ").Append(CollectionId).Append('\n');
|
||||
StringBuilder unused2 = sb.Append(" AssetName: ").Append(AssetName).Append('\n');
|
||||
StringBuilder unused1 = sb.Append(" AssetLink: ").Append(AssetLink).Append('\n');
|
||||
StringBuilder unused = sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@ -74,9 +74,7 @@ namespace IO.Swagger.Models.RequestDto
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
return obj.GetType() == GetType() && Equals((CurrencyAddAssetBody)obj);
|
||||
return obj is not null && (ReferenceEquals(this, obj) || (obj.GetType() == GetType() && Equals((CurrencyAddAssetBody) obj)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -86,25 +84,23 @@ namespace IO.Swagger.Models.RequestDto
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(CurrencyAddAssetBody other)
|
||||
{
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
|
||||
return
|
||||
(
|
||||
return other is not null
|
||||
&& (ReferenceEquals(this, other)
|
||||
|| ((
|
||||
CollectionId == other.CollectionId ||
|
||||
CollectionId != null &&
|
||||
CollectionId.Equals(other.CollectionId)
|
||||
(CollectionId != null &&
|
||||
CollectionId.Equals(other.CollectionId))
|
||||
) &&
|
||||
(
|
||||
AssetName == other.AssetName ||
|
||||
AssetName != null &&
|
||||
AssetName.Equals(other.AssetName)
|
||||
(AssetName != null &&
|
||||
AssetName.Equals(other.AssetName))
|
||||
) &&
|
||||
(
|
||||
AssetLink == other.AssetLink ||
|
||||
AssetLink != null &&
|
||||
AssetLink.Equals(other.AssetLink)
|
||||
);
|
||||
(AssetLink != null &&
|
||||
AssetLink.Equals(other.AssetLink))
|
||||
)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -115,14 +111,14 @@ namespace IO.Swagger.Models.RequestDto
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
var hashCode = 41;
|
||||
int hashCode = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (CollectionId != null)
|
||||
hashCode = hashCode * 59 + CollectionId.GetHashCode();
|
||||
hashCode = (hashCode * 59) + CollectionId.GetHashCode();
|
||||
if (AssetName != null)
|
||||
hashCode = hashCode * 59 + AssetName.GetHashCode();
|
||||
hashCode = (hashCode * 59) + AssetName.GetHashCode();
|
||||
if (AssetLink != null)
|
||||
hashCode = hashCode * 59 + AssetLink.GetHashCode();
|
||||
hashCode = (hashCode * 59) + AssetLink.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
@ -130,15 +126,9 @@ namespace IO.Swagger.Models.RequestDto
|
||||
#region Operators
|
||||
#pragma warning disable 1591
|
||||
|
||||
public static bool operator ==(CurrencyAddAssetBody left, CurrencyAddAssetBody right)
|
||||
{
|
||||
return Equals(left, right);
|
||||
}
|
||||
public static bool operator ==(CurrencyAddAssetBody left, CurrencyAddAssetBody right) => Equals(left, right);
|
||||
|
||||
public static bool operator !=(CurrencyAddAssetBody left, CurrencyAddAssetBody right)
|
||||
{
|
||||
return !Equals(left, right);
|
||||
}
|
||||
public static bool operator !=(CurrencyAddAssetBody left, CurrencyAddAssetBody right) => !Equals(left, right);
|
||||
|
||||
#pragma warning restore 1591
|
||||
#endregion Operators
|
||||
|
||||
Reference in New Issue
Block a user