Beispiel #1
0
        private string GetExtendedDesc(SelectionContext selectContext)
        {
            var context = selectContext.Clone();

            try
            {
                context.Record = this;
                RecordStructure rec;
                if (!RecordStructure.Records.TryGetValue(Name, out rec))
                {
                    return("");
                }
                var s = new StringBuilder();
                s.AppendLine(rec.description);
                foreach (var subrec in 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.Record    = null;
                context.SubRecord = null;
                context.Conditions.Clear();
            }
        }
Beispiel #2
0
 private string GetExtendedDesc(SelectionContext selectContext)
 {
     var context = selectContext.Clone();
     try
     {
         context.Record = this;
         RecordStructure rec;
         if (!RecordStructure.Records.TryGetValue(Name, out rec))
             return "";
         var s = new StringBuilder();
         s.AppendLine(rec.description);
         foreach (var subrec in 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.Record = null;
         context.SubRecord = null;
         context.Conditions.Clear();
     }
 }