Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ public override string ToString()
/// <summary>
/// Compares the API version value in ApiVersionsBase object and the one in object.
/// </summary>
/// <param name="obj"> The object to compare. </param>
/// <param name="other"> The object to compare. </param>
/// <returns> Comparison result in boolean. Equal returns true otherwise returns false. </returns>
public override bool Equals(object obj)
public override bool Equals(object other)
{
if (obj is ApiVersionsBase)
return Equals(obj as ApiVersionsBase);
if (obj is string)
return Equals(obj as string);
if (other is ApiVersionsBase)
return Equals(other as ApiVersionsBase);
if (other is string)
return Equals(other as string);

return false;
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,29 @@ public static implicit operator string(ResourceType other)
/// <summary>
/// Compares two <see cref="ResourceType"/> objects.
/// </summary>
/// <param name="source"> First <see cref="ResourceType"/> object. </param>
/// <param name="target"> Second <see cref="ResourceType"/> object. </param>
/// <param name="left"> First <see cref="ResourceType"/> object. </param>
/// <param name="right"> Second <see cref="ResourceType"/> object. </param>
/// <returns> True if they are equal, otherwise False. </returns>
public static bool operator ==(ResourceType source, ResourceType target)
public static bool operator ==(ResourceType left, ResourceType right)
{
if (source is null)
return target is null;
if (left is null)
return right is null;

return source.Equals(target);
return left.Equals(right);
}

/// <summary>
/// Compares two <see cref="ResourceType"/> objects.
/// </summary>
/// <param name="source"> First <see cref="ResourceType"/> object. </param>
/// <param name="target"> Second <see cref="ResourceType"/> object. </param>
/// <param name="left"> First <see cref="ResourceType"/> object. </param>
/// <param name="right"> Second <see cref="ResourceType"/> object. </param>
/// <returns> False if they are equal, otherwise True. </returns>
public static bool operator !=(ResourceType source, ResourceType target)
public static bool operator !=(ResourceType left, ResourceType right)
{
if (source is null)
return !(target is null);
if (left is null)
return !(right is null);

return !source.Equals(target);
return !left.Equals(right);
}

/// <summary>
Expand Down Expand Up @@ -184,22 +184,22 @@ public override string ToString()
}

/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object other)
{
if (obj is null)
if (other is null)
return false;

var resourceObj = obj as ResourceType;
var resourceObj = other as ResourceType;

if (!(resourceObj is null))
return Equals(resourceObj);

var stringObj = obj as string;
var stringObj = other as string;

if (stringObj != null)
return Equals(stringObj);

return base.Equals(obj);
return base.Equals(other);
}

/// <inheritdoc/>
Expand Down
Loading