public override string ToString() { var builder = new StringBuilder(); builder.Append($"{nameof(Description)}: {Description}\n"); if (!string.IsNullOrEmpty(Link)) { builder.Append($"{nameof(Link)}: {Link}\n"); } foreach (var include in Includes.Select((value, i) => new { i, value })) { builder.Append($"{nameof(Includes)}[{include.i}]: {include.value}\n"); } foreach (var delete in Deletes.Select((value, i) => new { i, value })) { builder.Append($"{nameof(Deletes)}[{delete.i}]: {delete.value}\n"); } foreach (var arg in Arguments.Select((value, i) => new { i, value })) { builder.Append($"{nameof(Arguments)}[{arg.i}]: {arg.value}\n"); } return(builder.ToString()); }
public override int GetSimpleHashCode() { StringBuilder sb = new StringBuilder(); sb.Append(Id); sb.Append(Name); sb.Append("Adds:" + string.Join(",", Adds.Select(c => c.IntegerValue))); sb.Append("Deletes:" + string.Join(",", Deletes.Select(c => c.IntegerValue))); sb.Append(ImplementationInfo.StartTime); sb.Append(ImplementationInfo.ExposureTime); sb.Append(ImplementationInfo.EndTime); sb.Append(ImplementationInfo.IsConflicted); return(sb.ToString().GetHashCode()); }