internal static string GetExtendedDesc(this Record rec, ISelectionContext selectContext) { var context = selectContext.Clone(); try { context.Record = rec; RecordStructure structure = rec.GetStructure(); if (structure == null) { return(string.Empty); } var s = new StringBuilder(); s.AppendLine(structure.description); foreach (var subrec in rec.SubRecords) { if (subrec.Structure == null) { continue; } if (subrec.Structure.elements == null) { return(s.ToString()); } if (subrec.Structure.notininfo) { continue; } s.AppendLine(); s.Append(subrec.GetFormattedData()); } return(s.ToString()); } finally { context.Reset(); } }
private string GetExtendedDesc(ISelectionContext selectContext) { var context = selectContext.Clone(); try { context.Record = this; RecordStructure rec; if (!RecordStructure.Records.TryGetValue(Name, out rec)) { return(string.Empty); } var s = new StringBuilder(); s.AppendLine(rec.description); foreach (var subrec in this.SubRecords) { if (subrec.Structure == null) { continue; } if (subrec.Structure.elements == null) { return(s.ToString()); } if (subrec.Structure.notininfo) { continue; } s.AppendLine(); s.Append(subrec.GetFormattedData()); } return(s.ToString()); } finally { context.Reset(); } }
internal static string GetExtendedDesc(this Record rec, ISelectionContext selectContext) { var context = selectContext.Clone(); try { context.Record = rec; RecordStructure structure = rec.GetStructure(); if (structure == null) return string.Empty; var s = new StringBuilder(); s.AppendLine(structure.description); foreach (var subrec in rec.SubRecords) { if (subrec.Structure == null) { continue; } if (subrec.Structure.elements == null) { return s.ToString(); } if (subrec.Structure.notininfo) { continue; } s.AppendLine(); s.Append(subrec.GetFormattedData()); } return s.ToString(); } finally { context.Reset(); } }
private string GetExtendedDesc(ISelectionContext selectContext) { var context = selectContext.Clone(); try { context.Record = this; RecordStructure rec; if (!RecordStructure.Records.TryGetValue(Name, out rec)) { return string.Empty; } var s = new StringBuilder(); s.AppendLine(rec.description); foreach (var subrec in this.SubRecords) { if (subrec.Structure == null) { continue; } if (subrec.Structure.elements == null) { return s.ToString(); } if (subrec.Structure.notininfo) { continue; } s.AppendLine(); s.Append(subrec.GetFormattedData()); } return s.ToString(); } finally { context.Reset(); } }