SPAppCatalog.GetAppInstancesByProductId method
Gets all of the app instances on the specified site with the specified product identifier.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetAppInstancesByProductId ( _
web As SPWeb, _
productId As Guid _
) As IList(Of SPAppInstance)
'Usage
Dim web As SPWeb
Dim productId As Guid
Dim returnValue As IList(Of SPAppInstance)
returnValue = SPAppCatalog.GetAppInstancesByProductId(web, _
productId)
public static IList<SPAppInstance> GetAppInstancesByProductId(
SPWeb web,
Guid productId
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe SPWeb object containing the SPAppInstance object.
productId
Type: System.GuidThe identifier of the of the product instance.
Return value
Type: System.Collections.Generic.IList<SPAppInstance>
A collection of app instances.
Remarks
It is typical for the returned collection to only have zero or one entries.
If the app instances have any localizable properties (like Title), they will be localized based on the current thread's CurrentUICulture.