parent
f1b3811ca7
commit
cab78f40b3
|
@ -1,11 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.Plugins
|
namespace MediaBrowser.Common.Plugins
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Local plugin struct.
|
/// Local plugin class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LocalPlugin : IEquatable<LocalPlugin>
|
public class LocalPlugin : IEquatable<LocalPlugin>
|
||||||
{
|
{
|
||||||
|
@ -106,6 +106,12 @@ namespace MediaBrowser.Common.Plugins
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool Equals(LocalPlugin other)
|
public bool Equals(LocalPlugin other)
|
||||||
{
|
{
|
||||||
|
// Do not use == or != for comparison as this class overrides the operators.
|
||||||
|
if (object.ReferenceEquals(other, null))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return Name.Equals(other.Name, StringComparison.OrdinalIgnoreCase)
|
return Name.Equals(other.Name, StringComparison.OrdinalIgnoreCase)
|
||||||
&& Id.Equals(other.Id);
|
&& Id.Equals(other.Id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user