GetExtensionPackages is used to retrieve packages from the data store.

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

Syntax

C#
IList<PackageInfo> GetExtensionPackages(
	int portalId,
	Func<PackageInfo, bool> predicate
)
Visual Basic
Function GetExtensionPackages ( 
	portalId As Integer,
	predicate As Func(Of PackageInfo, Boolean)
) As IList(Of 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 packages to retrieve. In most cases this will be a simple lambda method e.g. p => p.PackageType == "Module"

Return Value

A list of extension packages

See Also