Class LocalInstallation
Represents a local installation - facilitates working with locally installed packages
Inheritance
System.Object
LocalInstallation
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
public class LocalInstallation : DisposableObject, IDisposable
Constructors
LocalInstallation(IApplication, String, String)
Initializes local installation, tries to read local manifest from rootPath or localManifestDir if it is !=null
Declaration
public LocalInstallation(IApplication app, string rootPath, string localManifestDir = null)
Parameters
Type |
Name |
Description |
IApplication |
app |
|
System.String |
rootPath |
|
System.String |
localManifestDir |
|
Properties
App
Declaration
public IApplication App { get; }
Property Value
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
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
Declaration
public IEnumerable<IConfigSectionNode> PackageManifests { get; }
Property Value
PackageNames
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
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
Returns
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
Implements
System.IDisposable
Extension Methods