Share via


SPAppCatalog.GetAppInstance method (SPWeb, SPApp)

Gets all the SPAppInstance objects installed at a given SPWeb.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetAppInstance ( _
    web As SPWeb, _
    app As SPApp _
) As SPAppInstance
'Usage
Dim web As SPWeb
Dim app As SPApp
Dim returnValue As SPAppInstance

returnValue = SPAppCatalog.GetAppInstance(web, _
    app)
public static SPAppInstance GetAppInstance(
    SPWeb web,
    SPApp app
)

Parameters

Return value

Type: Microsoft.SharePoint.Administration.SPAppInstance
All SPAppInstance objects for the given web and app values.

Exceptions

Exception Condition
System.ArgumentNullException

The web parameter or the app parameter values are a null reference (Nothing in Visual Basic).

System.InvalidOperationException

No SPAppInstance objects were found.

See also

Reference

SPAppCatalog class

SPAppCatalog members

GetAppInstance overload

Microsoft.SharePoint.Administration namespace