Show / Hide Table of Contents

Class FhirCacheService

Manager for package caches.

Inheritance
System.Object
FhirCacheService
Namespace: Microsoft.Health.Fhir.SpecManager.PackageManager
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class FhirCacheService : IDisposable

Properties

| Improve this Doc View Source

Current

Gets the current singleton.

Declaration
public static FhirCacheService Current { get; }
Property Value
Type Description
FhirCacheService
| Improve this Doc View Source

PackagesByDirective

Gets the packages by directive.

Declaration
public Dictionary<string, PackageCacheRecord> PackagesByDirective { get; }
Property Value
Type Description
Dictionary<System.String, PackageCacheRecord>

Methods

| Improve this Doc View Source

DeletePackage(String)

Deletes the package described by packageDirective.

Declaration
public void DeletePackage(string packageDirective)
Parameters
Type Name Description
System.String packageDirective

The package directive.

| Improve this Doc View Source

Dispose(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.

| Improve this Doc View Source

FindOrDownload(String, out String, Boolean, String)

Searches for the first or download.

Declaration
public bool FindOrDownload(string directive, out string directory, bool offlineMode, string branchName = "")
Parameters
Type Name Description
System.String directive

The directive.

System.String directory

[out] Pathname of the directory.

System.Boolean offlineMode

True to enable offline mode, false to disable it.

System.String branchName

(Optional) Name of the branch.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

GetCachedPackages()

Gets the cached packages in this collection.

Declaration
public IEnumerable<NpmPackageDetails> GetCachedPackages()
Returns
Type Description
IEnumerable<NpmPackageDetails>

An enumerator that allows foreach to be used to process the cached packages in this collection.

| Improve this Doc View Source

Init(String)

Initializes the FhirCacheService.

Declaration
public static void Init(string cacheDirectory)
Parameters
Type Name Description
System.String cacheDirectory

Pathname of the cache directory.

| Improve this Doc View Source

StateHasChanged()

State has changed.

Declaration
public void StateHasChanged()
| Improve this Doc View Source

TryDownloadCoreViaCI(String, String, out String)

Attempts to download core via ci a string from the given string.

Declaration
public bool TryDownloadCoreViaCI(string name, string branchName, out string directory)
Parameters
Type Name Description
System.String name

The name.

System.String branchName

Name of the branch.

System.String directory

[out] Pathname of the directory.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryDownloadGuideViaCI(String, String, out String)

Attempts to download guide via ci a string from the given string.

Declaration
public bool TryDownloadGuideViaCI(string name, string branchName, out string directory)
Parameters
Type Name Description
System.String name

The name.

System.String branchName

Name of the branch.

System.String directory

[out] Pathname of the directory.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryDownloadGuideViaCI(String, out String, out String)

Attempts to download guide via ci a string from the given string.

Declaration
public bool TryDownloadGuideViaCI(string branchName, out string name, out string directory)
Parameters
Type Name Description
System.String branchName

Name of the branch.

System.String name

[out] The name.

System.String directory

[out] Pathname of the directory.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryDownloadViaCI(String, String, out String)

Attempts to download via ci a string from the given string.

Declaration
public bool TryDownloadViaCI(string name, string branchName, out string directory)
Parameters
Type Name Description
System.String name

The name.

System.String branchName

Name of the branch.

System.String directory

[out] Pathname of the directory.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryGetCoreCiPackageDetails(String, out NpmPackageDetails)

Attempts to get core ci package details.

Declaration
public bool TryGetCoreCiPackageDetails(string branchName, out NpmPackageDetails details)
Parameters
Type Name Description
System.String branchName

Name of the branch.

NpmPackageDetails details

[out] The details.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryGetGuideCiPackageDetails(String, out NpmPackageDetails)

Attempts to get guide ci package details the NpmPackageDetails from the given string.

Declaration
public bool TryGetGuideCiPackageDetails(string branchName, out NpmPackageDetails details)
Parameters
Type Name Description
System.String branchName

Name of the branch.

NpmPackageDetails details

[out] The details.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryGetPackageManifests(String, out IEnumerable<RegistryPackageManifest>)

Attempts to get a package manifest for a given package.

Declaration
public bool TryGetPackageManifests(string packageName, out IEnumerable<RegistryPackageManifest> manifests)
Parameters
Type Name Description
System.String packageName

Name of the package.

IEnumerable<RegistryPackageManifest> manifests

[out] The manifest.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryGetPackageState(String, out PackageLoadStateEnum)

Attempts to get a package state, returning a default value rather than throwing an exception if it fails.

Declaration
public bool TryGetPackageState(string directive, out PackageLoadStateEnum state)
Parameters
Type Name Description
System.String directive

The directive.

PackageLoadStateEnum state

[out] The state.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

UpdatePackageState(String, String, String, PackageLoadStateEnum)

Updates the package state.

Declaration
public void UpdatePackageState(string directive, string resolvedName, string resolvedVersion, PackageLoadStateEnum toState)
Parameters
Type Name Description
System.String directive

The directive.

System.String resolvedName

Name of the resolved.

System.String resolvedVersion

The resolved version.

PackageLoadStateEnum toState

State of to.

Events

| Improve this Doc View Source

OnChanged

Occurs when On Changed.

Declaration
public event EventHandler<EventArgs> OnChanged
Event Type
Type Description
EventHandler<EventArgs>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX