Пример #1
0
        public override bool Equals(Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (!(o is TypedDependency))
            {
                return(false);
            }

            var typedDep = (TypedDependency)o;

            if (Reln != null ? !Reln.Equals(typedDep.Reln) : typedDep.Reln != null)
            {
                return(false);
            }
            if (Gov != null ? !Gov.Equals(typedDep.Gov) : typedDep.Gov != null)
            {
                return(false);
            }
            if (Dep != null ? !Dep.Equals(typedDep.Dep) : typedDep.Dep != null)
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
        public override int GetHashCode()
        {
            int result = (Reln != null ? Reln.GetHashCode() : 17);

            result = 29 * result + (Gov != null ? Gov.GetHashCode() : 0);
            result = 29 * result + (Dep != null ? Dep.GetHashCode() : 0);
            return(result);
        }