private void BuildTraceString <T>(DelegateFormatString dfs) { string sObjectListName = LineContainer.ContentTypeToObjectListName(typeof(T)); SerializableObjectList lObjects = m_di.SafelyGetValue(sObjectListName); if (lObjects != null && lObjects.Count > 0) { List <string> l = new List <string>(); foreach (ISerializableObject so in lObjects) { string sData = dfs(so); l.Add(sData); } m_sTrace += string.Format("{0} (Count={1}): {2}\r\n", sObjectListName, l.Count, string.Join(", ", l.ToArray())); } }
public static LineContainer FromStream(Stream st) { try { using (XmlTextReader tr = new XmlTextReader(st)) { LineContainer lc = new LineContainer(); lc.FromXml(tr); return(lc); // 4369910973073 } } catch (Exception excp) { m_logger.Excp(excp, "FromStream() ERROR"); throw; } return(null); }
public static LineContainer FromXml(string sXml) { try { using (StringReader sr = new StringReader(sXml)) { using (XmlTextReader tr = new XmlTextReader(sr)) { LineContainer lc = new LineContainer(); lc.FromXml(tr); lc.OriginalXml = sXml; return(lc); // 4369910973073 } } } catch (Exception excp) { m_logger.Excp(excp, "FromXml() ERROR"); throw; } return(null); }