Class FhirManager
FHIR version manager.
Inheritance
Namespace: Microsoft.Health.Fhir.SpecManager.Manager
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class FhirManager : IDisposable
Properties
| Improve this Doc View SourceCurrent
Gets the current.
Declaration
public static FhirManager Current { get; }
Property Value
Type | Description |
---|---|
FhirManager |
InfoByDirective
Gets the information by directive.
Declaration
public Dictionary<string, FhirVersionInfo> InfoByDirective { get; }
Property Value
Type | Description |
---|---|
Dictionary<System.String, FhirVersionInfo> |
Methods
| Improve this Doc View SourceDispose(Boolean)
Releases the unmanaged resources used by the FhirCacheService and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
GetLoadedCorePackages()
Gets the loaded core packages in this collection.
Declaration
public List<FhirVersionInfo> GetLoadedCorePackages()
Returns
Type | Description |
---|---|
List<FhirVersionInfo> | An enumerator that allows foreach to be used to process the loaded core packages in this collection. |
GetLoadedPackages()
Gets the loaded core packages in this collection.
Declaration
public List<FhirVersionInfo> GetLoadedPackages()
Returns
Type | Description |
---|---|
List<FhirVersionInfo> | An enumerator that allows foreach to be used to process the loaded core packages in this collection. |
HasLoadedPackage(String, out String)
Test to see if the manager has a package matching a given id.
Declaration
public bool HasLoadedPackage(string packageId, out string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | packageId | |
System.String | version |
Returns
Type | Description |
---|---|
System.Boolean |
Init()
Initializes the FhirManager.
Declaration
public static void Init()
IsLoaded(String)
Query if 'directive' is loaded.
Declaration
public bool IsLoaded(string directive)
Parameters
Type | Name | Description |
---|---|---|
System.String | directive | The directive. |
Returns
Type | Description |
---|---|
System.Boolean | True if loaded, false if not. |
LoadPackages(IEnumerable<String>, Boolean, Boolean, Boolean, Boolean, String, out List<String>, Boolean)
Loads the packages.
Declaration
public void LoadPackages(IEnumerable<string> packageDirectives, bool offlineMode, bool officialExpansionsOnly, bool loadDependencies, bool skipFhirCore, string ciBranch, out List<string> failedPackages, bool areDependencies = false)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | packageDirectives | The package directives. |
System.Boolean | offlineMode | True to allow, false to suppress the download. |
System.Boolean | officialExpansionsOnly | True to official expansions only. |
System.Boolean | loadDependencies | True to load dependencies. |
System.Boolean | skipFhirCore | True to skip loading FHIR core packages. |
System.String | ciBranch | The CI branch. |
List<System.String> | failedPackages | [out] The failed packages. |
System.Boolean | areDependencies | (Optional) True if are dependencies. |
TryGetLoaded(String, out FhirVersionInfo)
Attempts to get loaded a FhirVersionInfo from the given string.
Declaration
public bool TryGetLoaded(string directive, out FhirVersionInfo info)
Parameters
Type | Name | Description |
---|---|---|
System.String | directive | The directive. |
FhirVersionInfo | info | [out] The information. |
Returns
Type | Description |
---|---|
System.Boolean | True if it succeeds, false if it fails. |
TryResolveCanonical(FhirPackageCommon.FhirSequenceEnum, String, String, String, Boolean, out FhirArtifactClassEnum, out Object)
Tries to see if the manager can resolve a canonical URL in any loaded packages.
Declaration
public bool TryResolveCanonical(FhirPackageCommon.FhirSequenceEnum fhirSequence, string serverUrl, string resourceType, string canonical, bool resolveExternal, out FhirArtifactClassEnum canonicalClass, out object resource)
Parameters
Type | Name | Description |
---|---|---|
FhirPackageCommon.FhirSequenceEnum | fhirSequence | |
System.String | serverUrl | |
System.String | resourceType | |
System.String | canonical | |
System.Boolean | resolveExternal | |
FhirArtifactClassEnum | canonicalClass | |
System.Object | resource |
Returns
Type | Description |
---|---|
System.Boolean |
TryResolveCanonicals(String, FhirCapabiltyStatement, Boolean)
Attempts to resolve canonicals.
Declaration
public bool TryResolveCanonicals(string serverUrl, FhirCapabiltyStatement caps, bool resolveExternal)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverUrl | URL of the server. |
FhirCapabiltyStatement | caps | The capabilities. |
System.Boolean | resolveExternal | True to resolve external. |
Returns
Type | Description |
---|---|
System.Boolean | True if it succeeds, false if it fails. |
UnloadPackage(String)
Unload package.
Declaration
public void UnloadPackage(string directive)
Parameters
Type | Name | Description |
---|---|---|
System.String | directive | The directive. |