Ejemplo n.º 1
0
        /// <summary>
        /// Gets back a resource from a definition file.
        /// </summary>
        /// <typeparam name="T">The resource type.</typeparam>
        /// <param name="fileName">The JSON filename, omit the extension</param>
        public static Bundle GetDefinition(string fileName)
        {
            var json = EmbeddedResourceManager.GetStringContent(EmbeddedResourceSubNamespace, fileName, "json");

            var parser = new Hl7.Fhir.Serialization.FhirJsonParser();

            return((Bundle)parser.Parse(json, typeof(Bundle)));
        }
Ejemplo n.º 2
0
 public static string GetXml(string fileName)
 {
     return(EmbeddedResourceManager.GetStringContent(EmbeddedResourceSubNamespace, fileName, "xml"));
 }
Ejemplo n.º 3
0
 public static string GetNdJson(string fileName)
 {
     return(EmbeddedResourceManager.GetStringContent(EmbeddedResourceSubNamespace, fileName, "ndjson"));
 }