Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
web
Type: Microsoft.SharePoint.SPWebThe SPWeb object containing the SPAppInstance object.
app
Type: Microsoft.SharePoint.Administration.SPAppThe SPApp object of which the SPAppInstance is an instance.
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. |