-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from FirelyTeam/main
Changes because of firely-net-sdk 5.3.0
- Loading branch information
Showing
10 changed files
with
15,221 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Xml.Serialization; | ||
|
||
namespace Ncqa.Cql.Model | ||
{ | ||
internal static class CqlModels | ||
{ | ||
private static readonly XmlSerializer xmlSerializer = new(typeof(ModelInfo)); | ||
|
||
public static IDictionary<string, ClassInfo> ClassesByName(ModelInfo model) | ||
{ | ||
var result = model.typeInfo.OfType<ClassInfo>() | ||
.ToDictionary(classInfo => classInfo.name); | ||
return result; | ||
} | ||
|
||
public static ModelInfo LoadFromStream(System.IO.Stream stream) | ||
{ | ||
return xmlSerializer.Deserialize(stream) as ModelInfo | ||
?? throw new ArgumentException($"This resource is not a valid {nameof(ModelInfo)}"); | ||
} | ||
|
||
public static ModelInfo LoadEmbeddedResource(string resourceName) | ||
{ | ||
var stream = typeof(CqlModels).Assembly.GetManifestResourceStream(resourceName) | ||
?? throw new ArgumentException($"Manifest resource stream {resourceName} is not included in this assembly."); | ||
return LoadFromStream(stream); | ||
} | ||
} | ||
} |
12,082 changes: 12,082 additions & 0 deletions
12,082
src/Microsoft.Health.Fhir.SpecManager/Cql/Models/fhir-modelinfo-4.0.1.xml
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.