/
n-dimens
/
pascalabcnet
Обзор
Документация
Войти
/
n-dimens
/
pascalabcnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
VisualPascalABCNET/FormsDesignerBinding/Dependecies/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/SignatureComparer.cs
39 строк
973 B
Бондарев Иван
initial commit
14 май 2015, 22:35
14 май 2015, 22:35
e6e67c1
Код
Авторство
О чём код?
// 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; using System.Diagnostics; using System.Linq; namespace ICSharpCode.SharpDevelop.Dom { public class SignatureComparer : IEqualityComparer<IMember> { ParameterListComparer parameterListComparer = new ParameterListComparer(); public bool Equals(IMember x, IMember y) { if (x.EntityType != y.EntityType) return false; if (x.Name != y.Name) return false; if (x is IMethod && y is IMethod) return parameterListComparer.Equals(x as IMethod, y as IMethod); return true; } public int GetHashCode(IMember obj) { int hashCode = obj.Name.GetHashCode(); if (obj is IMethod) hashCode ^= parameterListComparer.GetHashCode(obj as IMethod); return hashCode; } } }