@@ -489,9 +489,22 @@ namespace Discord
public static bool operator !=(EmbedBuilder left, EmbedBuilder right)
=> !(left == right);
/// <summary>
/// Determines whether the specified object is equals to the current <see cref="EmbedBuilder"/>.
/// </summary>
/// <remarks>
/// If the object passes is an <see cref="EmbedBuilder"/>, <see cref="Equals(EmbedBuilder)"/> will be called to compare the 2 instances
/// </remarks>
/// <param name="obj">The object to compare with the current <see cref="EmbedBuilder"/></param>
/// <returns></returns>
public override bool Equals(object obj)
=> obj is not null && GetType() == obj.GetType() && Equals(obj as EmbedBuilder);
=> obj is EmbedBuilder embedBuilder && Equals(e mbedBuilder);
/// <summary>
/// Determines whether the specified <see cref="EmbedBuilder"/> is equals to the current <see cref="EmbedBuilder"/>
/// </summary>
/// <param name="embedBuilder">The <see cref="EmbedBuilder"/> to compare with the current <see cref="EmbedBuilder"/></param>
/// <returns></returns>
public bool Equals(EmbedBuilder embedBuilder)
{
if (Fields.Count != embedBuilder.Fields.Count)
@@ -512,6 +525,7 @@ namespace Discord
&& Url == embedBuilder?.Url;
}
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();
}
@@ -637,14 +651,28 @@ namespace Discord
public static bool operator !=(EmbedFieldBuilder left, EmbedFieldBuilder right)
=> !(left == right);
/// <summary>
/// Determines whether the specified object is equals to the current <see cref="EmbedFieldBuilder"/>.
/// </summary>
/// <remarks>
/// If the object passes is an <see cref="EmbedFieldBuilder"/>, <see cref="Equals(EmbedFieldBuilder)"/> will be called to compare the 2 instances
/// </remarks>
/// <param name="obj">The object to compare with the current <see cref="EmbedFieldBuilder"/></param>
/// <returns></returns>
public override bool Equals(object obj)
=> obj is not null && GetType() == obj.GetType() && Equals(obj as EmbedFieldBuilder);
=> obj is EmbedFieldBuilder embedFieldBuilder && Equals(e mbedFieldBuilder);
/// <summary>
/// Determines whether the specified <see cref="EmbedFieldBuilder"/> is equals to the current <see cref="EmbedFieldBuilder"/>
/// </summary>
/// <param name="embedFieldBuilder">The <see cref="EmbedFieldBuilder"/> to compare with the current <see cref="EmbedFieldBuilder"/></param>
/// <returns></returns>
public bool Equals(EmbedFieldBuilder embedFieldBuilder)
=> _name == embedFieldBuilder?._name
&& _value == embedFieldBuilder?._value
&& IsInline == embedFieldBuilder?.IsInline;
&& IsInline == embedFieldBuilder?.IsInline;
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();
}
@@ -754,14 +782,28 @@ namespace Discord
public static bool operator !=(EmbedAuthorBuilder left, EmbedAuthorBuilder right)
=> !(left == right);
/// <summary>
/// Determines whether the specified object is equals to the current <see cref="EmbedAuthorBuilder"/>.
/// </summary>
/// <remarks>
/// If the object passes is an <see cref="EmbedAuthorBuilder"/>, <see cref="Equals(EmbedAuthorBuilder)"/> will be called to compare the 2 instances
/// </remarks>
/// <param name="obj">The object to compare with the current <see cref="EmbedAuthorBuilder"/></param>
/// <returns></returns>
public override bool Equals(object obj)
=> obj is not null && GetType() == obj.GetType() && Equals(obj as EmbedAuthorBuilder);
=> obj is EmbedAuthorBuilder embedAuthorBuilder && Equals(e mbedAuthorBuilder);
/// <summary>
/// Determines whether the specified <see cref="EmbedAuthorBuilder"/> is equals to the current <see cref="EmbedAuthorBuilder"/>
/// </summary>
/// <param name="embedAuthorBuilder">The <see cref="EmbedAuthorBuilder"/> to compare with the current <see cref="EmbedAuthorBuilder"/></param>
/// <returns></returns>
public bool Equals(EmbedAuthorBuilder embedAuthorBuilder)
=> _name == embedAuthorBuilder?._name
&& Url == embedAuthorBuilder?.Url
&& IconUrl == embedAuthorBuilder?.IconUrl;
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();
}
@@ -851,13 +893,27 @@ namespace Discord
public static bool operator !=(EmbedFooterBuilder left, EmbedFooterBuilder right)
=> !(left == right);
/// <summary>
/// Determines whether the specified object is equals to the current <see cref="EmbedFooterBuilder"/>.
/// </summary>
/// <remarks>
/// If the object passes is an <see cref="EmbedFooterBuilder"/>, <see cref="Equals(EmbedFooterBuilder)"/> will be called to compare the 2 instances
/// </remarks>
/// <param name="obj">The object to compare with the current <see cref="EmbedFooterBuilder"/></param>
/// <returns></returns>
public override bool Equals(object obj)
=> obj is not null && GetType() == obj.GetType() && Equals(obj as EmbedFooterBuilder);
=> obj is EmbedFooterBuilder embedFooterBuilder && Equals(e mbedFooterBuilder);
/// <summary>
/// Determines whether the specified <see cref="EmbedFooterBuilder"/> is equals to the current <see cref="EmbedFooterBuilder"/>
/// </summary>
/// <param name="embedFooterBuilder">The <see cref="EmbedFooterBuilder"/> to compare with the current <see cref="EmbedFooterBuilder"/></param>
/// <returns></returns>
public bool Equals(EmbedFooterBuilder embedFooterBuilder)
=> _text == embedFooterBuilder?._text
&& IconUrl == embedFooterBuilder?.IconUrl;
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();
}
}