Class LocalInstallation
Represents the local installation - facilitates working with locally installed packages
Implements
Inherited Members
Namespace: NFX.IO.FileSystem.Packaging
Assembly: NFX.dll
Syntax
public class LocalInstallation : DisposableObject, IDisposable
Constructors
LocalInstallation(String, String)
Initializes local installation, tries to read local manifest from rootPath or localManifestDir if it is !=null
Declaration
public LocalInstallation(string rootPath, string localManifestDir = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | rootPath | |
| System.String | localManifestDir |
Properties
InstallationStarted
Returns true to indicate that BeginInstallation() has been called
Declaration
public bool InstallationStarted { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Item[String]
Returns installed package manifest by name or null
Declaration
public IConfigSectionNode this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name |
Property Value
| Type | Description |
|---|---|
| IConfigSectionNode |
Modified
Returns true to indicate that local installation has changed as the result of package installation
Declaration
public bool Modified { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PackageManifests
Gets package manifests
Declaration
public IEnumerable<IConfigSectionNode> PackageManifests { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IConfigSectionNode> |
PackageNames
Gets package names
Declaration
public IEnumerable<string> PackageNames { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> |
RootPath
Root path of the installation
Declaration
public string RootPath { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
BeginInstallation()
Starts the installation so InstallPackage() can be called
Declaration
public void BeginInstallation()
CheckLocalAndInstallIfNeeded(IEnumerable<LocalInstallation.PackageInfo>, Boolean)
Checks local installation first for missing of different packages and if there are no differences then returns false, otherwise re-installs all packages defined by in install-set locally and returns true. Pass force=true to re-install regardless of manifest comparison (false by default)
Declaration
public bool CheckLocalAndInstallIfNeeded(IEnumerable<LocalInstallation.PackageInfo> installSet, bool force = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<LocalInstallation.PackageInfo> | installSet | |
| System.Boolean | force |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Destructor()
Declaration
protected override void Destructor()
Overrides
EndInstallation()
Updates local installation manifest if changes have been made (Modified=true)
Declaration
public void EndInstallation()
FindMissingOrDifferentPackage(IEnumerable<LocalInstallation.PackageInfo>)
Finds a package form the install set which is either missing on local machine or is not the same as the one in installSet. Returns the package info from install set
Declaration
public LocalInstallation.PackageInfo FindMissingOrDifferentPackage(IEnumerable<LocalInstallation.PackageInfo> installSet)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<LocalInstallation.PackageInfo> | installSet |
Returns
| Type | Description |
|---|---|
| LocalInstallation.PackageInfo |
InstallPackage(LocalInstallation.PackageInfo)
Unconditionally installs a package - copies a set of files contained in the FileSystemDirectory assigning it some mnemonic name
Declaration
public void InstallPackage(LocalInstallation.PackageInfo package)
Parameters
| Type | Name | Description |
|---|---|---|
| LocalInstallation.PackageInfo | package |