GetExtensionPackage is used to retrieve a specific package from the data store.

Namespace: DotNetNuke.Services.Installer.Packages
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
PackageInfo GetExtensionPackage(
	int portalId,
	Func<PackageInfo, bool> predicate
)
Visual Basic
Function GetExtensionPackage ( 
	portalId As Integer,
	predicate As Func(Of PackageInfo, Boolean)
) As PackageInfo

Parameters

portalId
Type: System..::..Int32
The Id of the portal. Most extension packages do not belong to a specific portal so in most situations developers will need to pass -1 to indicate this. The main situation where the portal Id will have a specific value is for skins which have been installed for a spcific portal/site.
predicate
Type: System..::..Func<(Of <(<'PackageInfo, Boolean>)>)>
The "search criteria" to use to identify the extension package to retrieve. In most cases this will be a simple lambda method e.g. p => p.Name == "Name"

Return Value

The extension package

See Also