public override int GetHashCode()
        {
            var otherNumbersHashCodes = otherNumbers?.Aggregate(HashCode.Combine) ?? 0;
            var numbersHashCode       = Numbers?.Aggregate(HashCode.Combine) ?? 0;
            var classesHashCode       = Classes?.Aggregate(0, HashCode.Combine) ?? 0;

            return(HashCode.Combine(otherNumbersHashCodes, numbersHashCode, classesHashCode));
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendFormat("Id={0},", Id);
            sb.AppendFormat("Path={0},", Path);
            sb.AppendFormat("Parent={0},", Parent);
            sb.AppendFormat("Status={0},", Status);
            sb.AppendFormat("Ordinal={0},", Ordinal);
            sb.AppendFormat("Classes={0},", Classes.Count() > 0 ? Classes.Aggregate((current, next) => current + "&" + next): string.Empty);
            sb.AppendFormat("Properties={0}", Properties.Count() > 0 ? Properties.Select(kv => kv.Key + ":" + kv.Value).Aggregate((current, next) => current + "&" + next) : string.Empty);

            return(sb.ToString());
        }