Class AppPackage
- Namespace
- Skyline.AppInstaller
- Assembly
- Skyline.DataMiner.Core.AppPackageCreator.dll
Represents a DataMiner application package. Use an instance of AppPackage.AppPackageBuilder to create this.
public class AppPackage : IAppPackage
- Inheritance
-
AppPackage
- Implements
- Extension Methods
Examples
The following examples illustrate how to create an application package containing a connector and an Automation script:
var protocolBuilder = new AppPackageProtocol.AppPackageProtocolBuilder("<ConnectorName>", "<ConnectorVersion>", "<ConnectorFilePath>")
.WithInformationTemplate("<InformationTemplateFilePath>", false);
IAppPackageProtocol protocol = protocolBuilder.Build();
var automationScriptBuilder = new AppPackageAutomationScript.AppPackageAutomationScriptBuilder("<scriptName>", "<scriptVersion>", "<scriptFilePath>");
var automationScript = automationScriptBuilder.Build();
var builder = new AppPackage.AppPackageBuilder("<packageName>", "<packageVersion>", "<minimumRequiredDataMinerVersion>");
builder.WithProtocol(protocol, true, false);
builder.WithAutomationScript(automationScript);
var applicationPackage = builder.Build();
applicationPackage.CreatePackage("<destinationDmappFilePath>");
The example above creates an application package that contains the default install script. This install script will only install the contents of the install package.
In case you need to perform custom actions during the installation (e.g. create elements), you can provide a custom installation script.
The following example illustrates how to create an application package that makes use of a custom installation script.
List<string> installScriptDependencies = new List<string> { Path.Combine("<assemblyFolderPath>", @"Skyline.DataMiner.Core.AppPackageInstaller.dll") };
IAppPackageScript installScript = new AppPackageScript("<InstallScriptFilePath>"), installScriptDependencies);
var protocolBuilder = new AppPackageProtocol.AppPackageProtocolBuilder("<ConnectorName>", "<ConnectorVersion>", "<ConnectorFilePath>")
.WithInformationTemplate("<InformationTemplateFilePath>", false);
IAppPackageProtocol protocol = protocolBuilder.Build();
var automationScriptBuilder = new AppPackageAutomationScript.AppPackageAutomationScriptBuilder("<scriptName>", "<scriptVersion>", "<scriptFilePath>");
var automationScript = automationScriptBuilder.Build();
var builder = new AppPackage.AppPackageBuilder("<packageName>", "<packageVersion>", "<minimumRequiredDataMinerVersion>", installScript);
builder.WithProtocol(protocol, true, false);
builder.WithAutomationScript(automationScript);
var applicationPackage = builder.Build();
applicationPackage.CreatePackage("<destinationDmappFilePath>");
Properties
- AppPackages
Gets the app packages included in this package.
- Assemblies
Gets the assemblies included in this package.
- AutomationScriptPackages
Gets the Automation script packages included in this package.
- AutomationScripts
Gets the Automation scripts included in this package.
- BuildIdentifier
Gets or sets the build identifier.
- CompanionFiles
Gets the companion files included in this package.
- ConfigurationScript
Gets the configuration script.
- DashboardPackages
Gets the dashboard packages included in this package.
- Dashboards
Gets the dashboards included in this package.
- DeploymentActions
Gets the deployment actions.
- Description
Gets or sets the package description.
- DisplayName
Gets the display name of the package.
- Functions
Gets the functions included in this package.
- InstallationScript
Gets the installation script of this package.
- MinimumRequiredDataMinerVersion
Gets the minimum required DataMiner version.
- Name
Gets the name of the package.
- Protocols
Gets the protocols included in this package.
- SetupContentFiles
Gets the installer files included in this package.
- SupportsMultipleInstalledVersions
Gets or sets a value indicating whether multiple versions of the package can be installed.
- Version
Gets the version of the package.
- Visuals
Gets the Visio files included in this package.
Methods
- CreatePackage()
Creates the application package and stores it in memory.
- CreatePackage(string)
Creates the application package and stores it in the specified destination file path.