Esempio n. 1
0
 public static byte[] SerializeToXmlBytes(Base instance, SummaryType summary = SummaryType.False, string root = null)
 {
     // [WMR 20160421] Explicit disposal
     return(xmlWriterToBytes(xw => {
         using (var writer = new XmlFhirWriter(xw))
         {
             Serialize(instance, writer, summary, root);
             xw.Flush();
         }
     }));
 }
Esempio n. 2
0
 // [WMR 20180409] NEW
 // https://github.com/ewoutkramer/fhir-net-api/issues/545
 public XDocument SerializeToDocument(Base instance, SummaryType summary = SummaryType.False, string root = null)
 {
     return(xmlWriterToDocument(xw =>
     {
         using (var writer = new XmlFhirWriter(xw))
         {
             Serialize(instance, writer, summary, root);
             xw.Flush();
         }
     }));
 }
Esempio n. 3
0
 public static string SerializeToXml(Base data, SummaryType summary = SummaryType.False, string root = null)
 {
     // [WMR 20160421] Explicit disposal
     return(xmlWriterToString(xw => {
         using (var writer = new XmlFhirWriter(xw))
         {
             Serialize(data, writer, summary, root);
             xw.Flush();
         }
     }));
 }