mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
51 lines
1.4 KiB
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) |
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) |
|
|
|
using System; |
|
using System.Collections.Generic; |
|
|
|
namespace ICSharpCode.SharpDevelop.Dom |
|
{ |
|
public sealed class ExplicitInterfaceImplementation : Immutable, IEquatable<ExplicitInterfaceImplementation> |
|
{ |
|
readonly IReturnType interfaceReference; |
|
readonly string memberName; |
|
|
|
public ExplicitInterfaceImplementation(IReturnType interfaceReference, string memberName) |
|
{ |
|
this.interfaceReference = interfaceReference; |
|
this.memberName = memberName; |
|
} |
|
|
|
public IReturnType InterfaceReference { |
|
get { return interfaceReference; } |
|
} |
|
|
|
public string MemberName { |
|
get { return memberName; } |
|
} |
|
|
|
public ExplicitInterfaceImplementation Clone() |
|
{ |
|
return this; // object is immutable, no Clone() required |
|
} |
|
|
|
public override int GetHashCode() |
|
{ |
|
return interfaceReference.GetHashCode() ^ memberName.GetHashCode(); |
|
} |
|
|
|
public override bool Equals(object obj) |
|
{ |
|
return Equals(obj as ExplicitInterfaceImplementation); |
|
} |
|
|
|
public bool Equals(ExplicitInterfaceImplementation other) |
|
{ |
|
if (other == null) |
|
return false; |
|
else |
|
return this.interfaceReference == other.interfaceReference && this.memberName == other.memberName; |
|
} |
|
} |
|
}
|
|
|