C# Class Warehouse.PackageHandling.PackageManager

Responsable for: * Unpack (Deploy and unpacking packages) * Delete deployed packages
显示文件 Open project: Starcounter/Warehouse

Public Methods

Method Description
Delete ( DeployedConfigFile config, string imageResourceFolder ) : void

Delete unpacked package

GetInstallApps ( string path ) : IList

Get a list of installed apps configurations TODO: Rename to GetDepolyedApps

GetInstalledApp ( string id, string path, DeployedConfigFile &installedConfig ) : void

Get installed App in a folder

ReadConfiguration ( ZipArchive archive, PackageConfigFile &config ) : void

Get App configuration from zipped package

ReadConfiguration ( string packageZip, PackageConfigFile &config ) : void

Get App configuration from zipped package

Unpack ( Stream packageZip, string sourceUrl, string storeUrl, string appRootFolder, string imageResourceFolder, DeployedConfigFile &config ) : void

Unpack zipped package stream

Unpack ( string packageZip, string appRootFolder, string imageResourceFolder, DeployedConfigFile &config ) : void

Install zipped package

UnpackFile ( ZipArchive archive, string file, string destinationFileName ) : void

Unpack file from an archive

VerifyPacket ( Stream package ) : void
VerifyPacket ( string packageZip ) : void

Private Methods

Method Description
CreateConfig ( PackageConfigFile packageConfig, string sourceUrl, string storeUrl, string imageUri, DeployedConfigFile &config ) : void

Create App configuration from package configuration

GetAppConfigs ( string path, System searchOptions ) : IList

Get Installed application configuration files

GetInstalledApp ( string path ) : DeployedConfigFile

Get installed App in a folder

UnpackAppImage ( ZipArchive archive, PackageConfigFile config, string imageResourceFolder, string &imageUri ) : void

ValidateConfiguration ( ZipArchive archive, PackageConfigFile config ) : void

Validate app configuration

VerifyPackageEntry ( ZipArchive archive, string entryName ) : void

Verify Package entry

Method Details

Delete() public static method

Delete unpacked package
public static Delete ( DeployedConfigFile config, string imageResourceFolder ) : void
config DeployedConfigFile
imageResourceFolder string
return void

GetInstallApps() public static method

Get a list of installed apps configurations TODO: Rename to GetDepolyedApps
public static GetInstallApps ( string path ) : IList
path string
return IList

GetInstalledApp() public static method

Get installed App in a folder
public static GetInstalledApp ( string id, string path, DeployedConfigFile &installedConfig ) : void
id string
path string
installedConfig DeployedConfigFile
return void

ReadConfiguration() public static method

Get App configuration from zipped package
public static ReadConfiguration ( ZipArchive archive, PackageConfigFile &config ) : void
archive System.IO.Compression.ZipArchive
config PackageConfigFile
return void

ReadConfiguration() public static method

Get App configuration from zipped package
public static ReadConfiguration ( string packageZip, PackageConfigFile &config ) : void
packageZip string
config PackageConfigFile
return void

Unpack() public static method

Unpack zipped package stream
public static Unpack ( Stream packageZip, string sourceUrl, string storeUrl, string appRootFolder, string imageResourceFolder, DeployedConfigFile &config ) : void
packageZip Stream Zipped package stream
sourceUrl string
storeUrl string
appRootFolder string
imageResourceFolder string Folder where app image will be created
config DeployedConfigFile
return void

Unpack() public static method

Install zipped package
public static Unpack ( string packageZip, string appRootFolder, string imageResourceFolder, DeployedConfigFile &config ) : void
packageZip string Zipped package
appRootFolder string
imageResourceFolder string Folder where app image will be created
config DeployedConfigFile
return void

UnpackFile() public static method

Unpack file from an archive
public static UnpackFile ( ZipArchive archive, string file, string destinationFileName ) : void
archive System.IO.Compression.ZipArchive
file string
destinationFileName string
return void

VerifyPacket() public static method

public static VerifyPacket ( Stream package ) : void
package Stream
return void

VerifyPacket() public static method

public static VerifyPacket ( string packageZip ) : void
packageZip string
return void